Search in sources :

Example 1 with LetterFeatureTester

use of com.joliciel.jochre.letterGuesser.features.LetterFeatureTester in project jochre by urieli.

the class Jochre method doCommandApplyFeatures.

/**
 * Apply a set of features to a given image or a given shape.
 */
public void doCommandApplyFeatures(int imageId, int shapeId, List<String> featureDescriptors) {
    LetterFeatureTester featureTester = new LetterFeatureTester(jochreSession);
    LetterFeatureParser letterFeatureParser = new LetterFeatureParser();
    Set<LetterFeature<?>> features = letterFeatureParser.getLetterFeatureSet(featureDescriptors);
    Set<String> letters = new HashSet<>();
    featureTester.applyFeatures(features, letters, imageId, shapeId);
}
Also used : LetterFeature(com.joliciel.jochre.letterGuesser.features.LetterFeature) LetterFeatureParser(com.joliciel.jochre.letterGuesser.features.LetterFeatureParser) LetterFeatureTester(com.joliciel.jochre.letterGuesser.features.LetterFeatureTester) HashSet(java.util.HashSet)

Aggregations

LetterFeature (com.joliciel.jochre.letterGuesser.features.LetterFeature)1 LetterFeatureParser (com.joliciel.jochre.letterGuesser.features.LetterFeatureParser)1 LetterFeatureTester (com.joliciel.jochre.letterGuesser.features.LetterFeatureTester)1 HashSet (java.util.HashSet)1