Search in sources :

Example 1 with SplitFeature

use of com.joliciel.jochre.boundaries.features.SplitFeature in project jochre by urieli.

the class RecursiveShapeSplitterTest method testSplitShape.

/**
 * Make sure we get 5 equally weighted sequences in the case of a 50/50 prob for
 * splitting each time.
 */
@SuppressWarnings("unchecked")
@Test
public void testSplitShape() throws Exception {
    System.setProperty("config.file", "src/test/resources/test.conf");
    ConfigFactory.invalidateCaches();
    Config config = ConfigFactory.load();
    JochreSession jochreSession = new JochreSession(config);
    BufferedImage originalImage = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
    final JochreImage jochreImage = new JochreImage(originalImage, jochreSession);
    final Shape shape = new Shape(jochreImage, 0, 0, 63, 15, jochreSession);
    shape.setBaseLine(12);
    shape.setMeanLine(4);
    final Shape shape1 = new Shape(jochreImage, 0, 0, 31, 15, jochreSession);
    shape1.setBaseLine(12);
    shape1.setMeanLine(4);
    final Shape shape2 = new Shape(jochreImage, 32, 0, 63, 15, jochreSession);
    shape2.setBaseLine(12);
    shape2.setMeanLine(4);
    final SplitCandidateFinder splitCandidateFinder = mock(SplitCandidateFinder.class);
    final DecisionMaker decisionMaker = mock(DecisionMaker.class);
    Split split = new Split(shape, jochreSession);
    split.setPosition(31);
    List<Split> splits = new ArrayList<>();
    splits.add(split);
    when(splitCandidateFinder.findSplitCandidates(shape)).thenReturn(splits);
    Decision yesDecision = new Decision(SplitOutcome.DO_SPLIT.name(), 0.5);
    Decision noDecision = new Decision(SplitOutcome.DO_NOT_SPLIT.name(), 0.5);
    List<Decision> decisions = new ArrayList<>();
    decisions.add(yesDecision);
    decisions.add(noDecision);
    when(decisionMaker.decide(anyList())).thenReturn(decisions);
    Split split1 = new Split(shape1, jochreSession);
    split1.setPosition(15);
    List<Split> splits1 = new ArrayList<>();
    splits1.add(split1);
    when(splitCandidateFinder.findSplitCandidates(shape1)).thenReturn(splits1);
    Split split2 = new Split(shape2, jochreSession);
    split2.setPosition(15);
    List<Split> splits2 = new ArrayList<>();
    splits2.add(split2);
    when(splitCandidateFinder.findSplitCandidates(shape2)).thenReturn(splits2);
    Set<SplitFeature<?>> splitFeatures = new TreeSet<>();
    RecursiveShapeSplitter splitter = new RecursiveShapeSplitter(splitCandidateFinder, splitFeatures, decisionMaker, jochreSession);
    splitter.setBeamWidth(10);
    splitter.setMaxDepth(2);
    splitter.setMinWidthRatio(1.0);
    List<ShapeSequence> shapeSequences = splitter.split(shape);
    assertEquals(5, shapeSequences.size());
    for (ShapeSequence shapeSequence : shapeSequences) {
        assertEquals(1.0, shapeSequence.getScore(), 0.0001);
    }
}
Also used : JochreImage(com.joliciel.jochre.graphics.JochreImage) Shape(com.joliciel.jochre.graphics.Shape) Config(com.typesafe.config.Config) ArrayList(java.util.ArrayList) DecisionMaker(com.joliciel.talismane.machineLearning.DecisionMaker) SplitFeature(com.joliciel.jochre.boundaries.features.SplitFeature) BufferedImage(java.awt.image.BufferedImage) Decision(com.joliciel.talismane.machineLearning.Decision) TreeSet(java.util.TreeSet) JochreSession(com.joliciel.jochre.JochreSession) Test(org.junit.Test)

Example 2 with SplitFeature

use of com.joliciel.jochre.boundaries.features.SplitFeature in project jochre by urieli.

the class Jochre method doCommandEvaluateFull.

/**
 * Evaluate a suite of split/merge models and letter guessing model.
 *  @param criteria
 *          for selecting the evaluation corpus
 * @param save
 *          whether or not the letter guesses should be saved
 */
public void doCommandEvaluateFull(CorpusSelectionCriteria criteria, boolean save, File outputDir, MostLikelyWordChooser wordChooser, String suffix, List<DocumentObserver> observers) throws IOException {
    String baseName = jochreSession.getLetterModelPath().substring(0, jochreSession.getLetterModelPath().indexOf("."));
    if (baseName.lastIndexOf("/") > 0)
        baseName = baseName.substring(baseName.lastIndexOf("/") + 1);
    ClassificationModel letterModel = jochreSession.getLetterModel();
    List<String> letterFeatureDescriptors = letterModel.getFeatureDescriptors();
    LetterFeatureParser letterFeatureParser = new LetterFeatureParser();
    Set<LetterFeature<?>> letterFeatures = letterFeatureParser.getLetterFeatureSet(letterFeatureDescriptors);
    LetterGuesser letterGuesser = new LetterGuesser(letterFeatures, letterModel.getDecisionMaker());
    ClassificationModel splitModel = jochreSession.getSplitModel();
    if (splitModel == null)
        throw new IllegalArgumentException("Missing parameter: jochre.image-analyser.split-model");
    List<String> splitFeatureDescriptors = splitModel.getFeatureDescriptors();
    SplitFeatureParser splitFeatureParser = new SplitFeatureParser();
    Set<SplitFeature<?>> splitFeatures = splitFeatureParser.getSplitFeatureSet(splitFeatureDescriptors);
    SplitCandidateFinder splitCandidateFinder = new SplitCandidateFinder(jochreSession);
    splitCandidateFinder.setMinDistanceBetweenSplits(5);
    ShapeSplitter shapeSplitter = new RecursiveShapeSplitter(splitCandidateFinder, splitFeatures, splitModel.getDecisionMaker(), jochreSession);
    ClassificationModel mergeModel = jochreSession.getMergeModel();
    if (mergeModel == null)
        throw new IllegalArgumentException("Missing parameter: jochre.image-analyser.merge-model");
    List<String> mergeFeatureDescriptors = mergeModel.getFeatureDescriptors();
    MergeFeatureParser mergeFeatureParser = new MergeFeatureParser();
    Set<MergeFeature<?>> mergeFeatures = mergeFeatureParser.getMergeFeatureSet(mergeFeatureDescriptors);
    ShapeMerger shapeMerger = new ShapeMerger(mergeFeatures, mergeModel.getDecisionMaker());
    BoundaryDetector boundaryDetector = null;
    String boundaryDetectorTypeName = jochreSession.getConfig().getConfig("jochre.boundaries").getString("boundary-detector-type");
    BoundaryDetectorType boundaryDetectorType = BoundaryDetectorType.valueOf(boundaryDetectorTypeName);
    switch(boundaryDetectorType) {
        case LetterByLetter:
            boundaryDetector = new LetterByLetterBoundaryDetector(shapeSplitter, shapeMerger, jochreSession);
            break;
        case Deterministic:
            boundaryDetector = new DeterministicBoundaryDetector(shapeSplitter, shapeMerger, jochreSession);
            break;
    }
    ImageAnalyser imageAnalyser = new BeamSearchImageAnalyser(boundaryDetector, letterGuesser, wordChooser, jochreSession);
    LetterValidator letterValidator = new ComponentCharacterValidator(jochreSession);
    OriginalShapeLetterAssigner shapeLetterAssigner = new OriginalShapeLetterAssigner();
    shapeLetterAssigner.setEvaluate(true);
    shapeLetterAssigner.setSave(save);
    shapeLetterAssigner.setLetterValidator(letterValidator);
    shapeLetterAssigner.setSingleLetterMethod(false);
    imageAnalyser.addObserver(shapeLetterAssigner);
    ErrorLogger errorLogger = new ErrorLogger(jochreSession);
    Writer errorWriter = null;
    File errorFile = new File(outputDir, baseName + suffix + "errors.txt");
    errorFile.delete();
    errorWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(errorFile, true), "UTF8"));
    errorLogger.setErrorWriter(errorWriter);
    imageAnalyser.addObserver(errorLogger);
    JochreCorpusImageProcessor imageProcessor = new JochreCorpusImageProcessor(criteria, jochreSession);
    imageProcessor.addObserver(imageAnalyser);
    for (DocumentObserver observer : observers) imageProcessor.addObserver(observer);
    imageProcessor.process();
    LOG.debug("F-score for " + jochreSession.getLetterModelPath() + ": " + shapeLetterAssigner.getFScoreCalculator().getTotalFScore());
    String modelFileName = baseName + suffix + "_full";
    File fscoreFile = new File(outputDir, modelFileName + "_fscores.csv");
    Writer fscoreWriter = errorWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fscoreFile, true), jochreSession.getCsvEncoding()));
    shapeLetterAssigner.getFScoreCalculator().writeScoresToCSV(fscoreWriter);
}
Also used : LetterByLetterBoundaryDetector(com.joliciel.jochre.boundaries.LetterByLetterBoundaryDetector) RecursiveShapeSplitter(com.joliciel.jochre.boundaries.RecursiveShapeSplitter) OriginalShapeLetterAssigner(com.joliciel.jochre.analyser.OriginalShapeLetterAssigner) BeamSearchImageAnalyser(com.joliciel.jochre.analyser.BeamSearchImageAnalyser) ImageAnalyser(com.joliciel.jochre.analyser.ImageAnalyser) DeterministicBoundaryDetector(com.joliciel.jochre.boundaries.DeterministicBoundaryDetector) SplitFeature(com.joliciel.jochre.boundaries.features.SplitFeature) BufferedWriter(java.io.BufferedWriter) MergeFeatureParser(com.joliciel.jochre.boundaries.features.MergeFeatureParser) LetterValidator(com.joliciel.jochre.letterGuesser.LetterValidator) JochreCorpusImageProcessor(com.joliciel.jochre.graphics.JochreCorpusImageProcessor) LetterFeature(com.joliciel.jochre.letterGuesser.features.LetterFeature) LetterFeatureParser(com.joliciel.jochre.letterGuesser.features.LetterFeatureParser) RecursiveShapeSplitter(com.joliciel.jochre.boundaries.RecursiveShapeSplitter) TrainingCorpusShapeSplitter(com.joliciel.jochre.boundaries.TrainingCorpusShapeSplitter) ShapeSplitter(com.joliciel.jochre.boundaries.ShapeSplitter) SplitCandidateFinder(com.joliciel.jochre.boundaries.SplitCandidateFinder) MergeFeature(com.joliciel.jochre.boundaries.features.MergeFeature) OriginalBoundaryDetector(com.joliciel.jochre.boundaries.OriginalBoundaryDetector) BoundaryDetector(com.joliciel.jochre.boundaries.BoundaryDetector) LetterByLetterBoundaryDetector(com.joliciel.jochre.boundaries.LetterByLetterBoundaryDetector) DeterministicBoundaryDetector(com.joliciel.jochre.boundaries.DeterministicBoundaryDetector) DocumentObserver(com.joliciel.jochre.doc.DocumentObserver) SplitFeatureParser(com.joliciel.jochre.boundaries.features.SplitFeatureParser) LetterGuesser(com.joliciel.jochre.letterGuesser.LetterGuesser) ErrorLogger(com.joliciel.jochre.analyser.ErrorLogger) TrainingCorpusShapeMerger(com.joliciel.jochre.boundaries.TrainingCorpusShapeMerger) ShapeMerger(com.joliciel.jochre.boundaries.ShapeMerger) FileOutputStream(java.io.FileOutputStream) BeamSearchImageAnalyser(com.joliciel.jochre.analyser.BeamSearchImageAnalyser) OutputStreamWriter(java.io.OutputStreamWriter) ComponentCharacterValidator(com.joliciel.jochre.letterGuesser.ComponentCharacterValidator) File(java.io.File) ClassificationModel(com.joliciel.talismane.machineLearning.ClassificationModel) UnknownWordListWriter(com.joliciel.jochre.lexicon.UnknownWordListWriter) BufferedWriter(java.io.BufferedWriter) Writer(java.io.Writer) LexiconErrorWriter(com.joliciel.jochre.lexicon.LexiconErrorWriter) OutputStreamWriter(java.io.OutputStreamWriter)

Example 3 with SplitFeature

use of com.joliciel.jochre.boundaries.features.SplitFeature in project jochre by urieli.

the class RecursiveShapeSplitterTest method testSplitShapeNoSplitMoreLikely.

@SuppressWarnings("unchecked")
@Test
public void testSplitShapeNoSplitMoreLikely() throws Exception {
    System.setProperty("config.file", "src/test/resources/test.conf");
    ConfigFactory.invalidateCaches();
    Config config = ConfigFactory.load();
    JochreSession jochreSession = new JochreSession(config);
    BufferedImage originalImage = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
    final JochreImage jochreImage = new JochreImage(originalImage, jochreSession);
    final Shape shape = new Shape(jochreImage, 0, 0, 63, 15, jochreSession);
    shape.setBaseLine(12);
    shape.setMeanLine(4);
    final Shape shape1 = new Shape(jochreImage, 0, 0, 31, 15, jochreSession);
    shape1.setBaseLine(12);
    shape1.setMeanLine(4);
    final Shape shape2 = new Shape(jochreImage, 32, 0, 63, 15, jochreSession);
    shape2.setBaseLine(12);
    shape2.setMeanLine(4);
    final SplitCandidateFinder splitCandidateFinder = mock(SplitCandidateFinder.class);
    final DecisionMaker decisionMaker = mock(DecisionMaker.class);
    Split split = new Split(shape, jochreSession);
    split.setPosition(31);
    List<Split> splits = new ArrayList<>();
    splits.add(split);
    when(splitCandidateFinder.findSplitCandidates(shape)).thenReturn(splits);
    Decision yesDecision = new Decision(SplitOutcome.DO_SPLIT.name(), 0.4);
    Decision noDecision = new Decision(SplitOutcome.DO_NOT_SPLIT.name(), 0.6);
    List<Decision> decisions = new ArrayList<>();
    decisions.add(yesDecision);
    decisions.add(noDecision);
    when(decisionMaker.decide(anyList())).thenReturn(decisions);
    Split split1 = new Split(shape1, jochreSession);
    split1.setPosition(15);
    List<Split> splits1 = new ArrayList<>();
    splits1.add(split1);
    when(splitCandidateFinder.findSplitCandidates(shape1)).thenReturn(splits1);
    Split split2 = new Split(shape2, jochreSession);
    split2.setPosition(15);
    List<Split> splits2 = new ArrayList<>();
    splits2.add(split2);
    when(splitCandidateFinder.findSplitCandidates(shape2)).thenReturn(splits2);
    Set<SplitFeature<?>> splitFeatures = new TreeSet<>();
    RecursiveShapeSplitter splitter = new RecursiveShapeSplitter(splitCandidateFinder, splitFeatures, decisionMaker, jochreSession);
    splitter.setBeamWidth(10);
    splitter.setMaxDepth(2);
    splitter.setMinWidthRatio(1.0);
    List<ShapeSequence> shapeSequences = splitter.split(shape);
    assertEquals(5, shapeSequences.size());
    int i = 0;
    double prob = 1.0;
    double twoThirds = 0.4 / 0.6;
    LOG.debug("twoThirds: " + twoThirds);
    for (ShapeSequence shapeSequence : shapeSequences) {
        LOG.debug("sequence " + i + " decisions:");
        for (Decision decision : shapeSequence.getDecisions()) LOG.debug("" + decision.getProbability());
        if (i == 0) {
            prob = 1.0;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(1, shapeSequence.size());
        } else if (i == 1) {
            prob = 1.0 * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(2, shapeSequence.size());
        } else if (i == 2) {
            prob = 1.0 * twoThirds * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(3, shapeSequence.size());
        } else if (i == 3) {
            prob = 1.0 * twoThirds * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(3, shapeSequence.size());
        } else if (i == 4) {
            prob = 1.0 * twoThirds * twoThirds * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(4, shapeSequence.size());
        }
        i++;
    }
}
Also used : JochreImage(com.joliciel.jochre.graphics.JochreImage) Shape(com.joliciel.jochre.graphics.Shape) Config(com.typesafe.config.Config) ArrayList(java.util.ArrayList) DecisionMaker(com.joliciel.talismane.machineLearning.DecisionMaker) SplitFeature(com.joliciel.jochre.boundaries.features.SplitFeature) BufferedImage(java.awt.image.BufferedImage) Decision(com.joliciel.talismane.machineLearning.Decision) TreeSet(java.util.TreeSet) JochreSession(com.joliciel.jochre.JochreSession) Test(org.junit.Test)

Example 4 with SplitFeature

use of com.joliciel.jochre.boundaries.features.SplitFeature in project jochre by urieli.

the class RecursiveShapeSplitterTest method testSplitShapeSplitMoreLikely.

/**
 * If a split is always more likely (e.g. 60% likelihood), ensure the shape
 * sequences are ordered correctly.
 */
@SuppressWarnings("unchecked")
@Test
public void testSplitShapeSplitMoreLikely() throws Exception {
    System.setProperty("config.file", "src/test/resources/test.conf");
    ConfigFactory.invalidateCaches();
    Config config = ConfigFactory.load();
    JochreSession jochreSession = new JochreSession(config);
    BufferedImage originalImage = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
    final JochreImage jochreImage = new JochreImage(originalImage, jochreSession);
    final Shape shape = new Shape(jochreImage, 0, 0, 63, 15, jochreSession);
    shape.setBaseLine(12);
    shape.setMeanLine(4);
    final Shape shape1 = new Shape(jochreImage, 0, 0, 31, 15, jochreSession);
    shape1.setBaseLine(12);
    shape1.setMeanLine(4);
    final Shape shape2 = new Shape(jochreImage, 32, 0, 63, 15, jochreSession);
    shape2.setBaseLine(12);
    shape2.setMeanLine(4);
    final SplitCandidateFinder splitCandidateFinder = mock(SplitCandidateFinder.class);
    final DecisionMaker decisionMaker = mock(DecisionMaker.class);
    Split split = new Split(shape, jochreSession);
    split.setPosition(31);
    List<Split> splits = new ArrayList<>();
    splits.add(split);
    when(splitCandidateFinder.findSplitCandidates(shape)).thenReturn(splits);
    Decision yesDecision = new Decision(SplitOutcome.DO_SPLIT.name(), 0.6);
    Decision noDecision = new Decision(SplitOutcome.DO_NOT_SPLIT.name(), 0.4);
    List<Decision> decisions = new ArrayList<>();
    decisions.add(yesDecision);
    decisions.add(noDecision);
    when(decisionMaker.decide(anyList())).thenReturn(decisions);
    Split split1 = new Split(shape1, jochreSession);
    split1.setPosition(15);
    List<Split> splits1 = new ArrayList<>();
    splits1.add(split1);
    when(splitCandidateFinder.findSplitCandidates(shape1)).thenReturn(splits1);
    Split split2 = new Split(shape2, jochreSession);
    split2.setPosition(15);
    List<Split> splits2 = new ArrayList<>();
    splits2.add(split2);
    when(splitCandidateFinder.findSplitCandidates(shape2)).thenReturn(splits2);
    Set<SplitFeature<?>> splitFeatures = new TreeSet<>();
    RecursiveShapeSplitter splitter = new RecursiveShapeSplitter(splitCandidateFinder, splitFeatures, decisionMaker, jochreSession);
    splitter.setBeamWidth(10);
    splitter.setMaxDepth(2);
    splitter.setMinWidthRatio(1.0);
    List<ShapeSequence> shapeSequences = splitter.split(shape);
    assertEquals(5, shapeSequences.size());
    int i = 0;
    for (ShapeSequence shapeSequence : shapeSequences) {
        LOG.debug("sequence " + i + " shapes:");
        for (ShapeInSequence shapeInSequence : shapeSequence) {
            Shape oneShape = shapeInSequence.getShape();
            LOG.debug("Shape: " + oneShape.getLeft() + "," + oneShape.getRight());
        }
        LOG.debug("" + shapeSequence.getScore());
        i++;
    }
    i = 0;
    double prob = 1.0;
    double twoThirds = 0.4 / 0.6;
    LOG.debug("twoThirds: " + twoThirds);
    for (ShapeSequence shapeSequence : shapeSequences) {
        LOG.debug("sequence " + i + " decisions:");
        for (Decision decision : shapeSequence.getDecisions()) LOG.debug("" + decision.getProbability());
        if (i == 0) {
            prob = 1.0;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(4, shapeSequence.size());
        } else if (i == 1) {
            prob = 1.0 * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(3, shapeSequence.size());
        } else if (i == 2) {
            prob = 1.0 * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(3, shapeSequence.size());
        } else if (i == 3) {
            prob = 1.0 * twoThirds * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(2, shapeSequence.size());
        } else if (i == 4) {
            prob = 1.0 * twoThirds * twoThirds * twoThirds;
            assertEquals(prob, shapeSequence.getScore(), 0.0001);
            assertEquals(1, shapeSequence.size());
        }
        i++;
    }
}
Also used : JochreImage(com.joliciel.jochre.graphics.JochreImage) Shape(com.joliciel.jochre.graphics.Shape) Config(com.typesafe.config.Config) ArrayList(java.util.ArrayList) DecisionMaker(com.joliciel.talismane.machineLearning.DecisionMaker) SplitFeature(com.joliciel.jochre.boundaries.features.SplitFeature) BufferedImage(java.awt.image.BufferedImage) Decision(com.joliciel.talismane.machineLearning.Decision) TreeSet(java.util.TreeSet) JochreSession(com.joliciel.jochre.JochreSession) Test(org.junit.Test)

Example 5 with SplitFeature

use of com.joliciel.jochre.boundaries.features.SplitFeature in project jochre by urieli.

the class Jochre method doCommandTrainSplits.

/**
 * Train the letter splitting model.
 *
 * @param featureDescriptors
 *          the feature descriptors for training this model
 * @param criteria
 *          the criteria used to select the training corpus
 */
public void doCommandTrainSplits(List<String> featureDescriptors, CorpusSelectionCriteria criteria) {
    if (jochreSession.getSplitModelPath() == null)
        throw new RuntimeException("Missing argument: splitModel");
    if (featureDescriptors == null)
        throw new JochreException("features is required");
    File splitModelFile = new File(jochreSession.getSplitModelPath());
    splitModelFile.getParentFile().mkdirs();
    SplitFeatureParser splitFeatureParser = new SplitFeatureParser();
    Set<SplitFeature<?>> splitFeatures = splitFeatureParser.getSplitFeatureSet(featureDescriptors);
    ClassificationEventStream corpusEventStream = new JochreSplitEventStream(criteria, splitFeatures, jochreSession);
    ModelTrainerFactory modelTrainerFactory = new ModelTrainerFactory();
    ClassificationModelTrainer trainer = modelTrainerFactory.constructTrainer(jochreSession.getConfig());
    ClassificationModel splitModel = trainer.trainModel(corpusEventStream, featureDescriptors);
    splitModel.persist(splitModelFile);
}
Also used : ClassificationEventStream(com.joliciel.talismane.machineLearning.ClassificationEventStream) ModelTrainerFactory(com.joliciel.talismane.machineLearning.ModelTrainerFactory) JochreException(com.joliciel.jochre.utils.JochreException) ClassificationModelTrainer(com.joliciel.talismane.machineLearning.ClassificationModelTrainer) SplitFeatureParser(com.joliciel.jochre.boundaries.features.SplitFeatureParser) SplitFeature(com.joliciel.jochre.boundaries.features.SplitFeature) JochreSplitEventStream(com.joliciel.jochre.boundaries.JochreSplitEventStream) File(java.io.File) ClassificationModel(com.joliciel.talismane.machineLearning.ClassificationModel)

Aggregations

SplitFeature (com.joliciel.jochre.boundaries.features.SplitFeature)6 JochreSession (com.joliciel.jochre.JochreSession)3 SplitFeatureParser (com.joliciel.jochre.boundaries.features.SplitFeatureParser)3 JochreImage (com.joliciel.jochre.graphics.JochreImage)3 Shape (com.joliciel.jochre.graphics.Shape)3 ClassificationModel (com.joliciel.talismane.machineLearning.ClassificationModel)3 Decision (com.joliciel.talismane.machineLearning.Decision)3 DecisionMaker (com.joliciel.talismane.machineLearning.DecisionMaker)3 Config (com.typesafe.config.Config)3 BufferedImage (java.awt.image.BufferedImage)3 RecursiveShapeSplitter (com.joliciel.jochre.boundaries.RecursiveShapeSplitter)2 ShapeSplitter (com.joliciel.jochre.boundaries.ShapeSplitter)2 SplitCandidateFinder (com.joliciel.jochre.boundaries.SplitCandidateFinder)2 TrainingCorpusShapeSplitter (com.joliciel.jochre.boundaries.TrainingCorpusShapeSplitter)2 File (java.io.File)2 ArrayList (java.util.ArrayList)2 TreeSet (java.util.TreeSet)2 Test (org.junit.Test)2 BeamSearchImageAnalyser (com.joliciel.jochre.analyser.BeamSearchImageAnalyser)1 ErrorLogger (com.joliciel.jochre.analyser.ErrorLogger)1