use of com.joliciel.talismane.machineLearning.features.FunctionDescriptorParser in project talismane by joliciel-informatique.
the class TokenPatternMatchFeatureParser method getTokenPatternMatchFeatureSet.
public Set<TokenPatternMatchFeature<?>> getTokenPatternMatchFeatureSet(List<String> featureDescriptors) {
Set<TokenPatternMatchFeature<?>> features = new TreeSet<TokenPatternMatchFeature<?>>();
FunctionDescriptorParser descriptorParser = new FunctionDescriptorParser();
for (String featureDescriptor : featureDescriptors) {
if (featureDescriptor.length() > 0 && !featureDescriptor.startsWith("#")) {
FunctionDescriptor functionDescriptor = descriptorParser.parseDescriptor(featureDescriptor);
List<TokenPatternMatchFeature<?>> myFeatures = this.parseDescriptor(functionDescriptor);
features.addAll(myFeatures);
}
}
return features;
}
use of com.joliciel.talismane.machineLearning.features.FunctionDescriptorParser in project talismane by joliciel-informatique.
the class SentenceDetectorFeatureParser method getFeatureSet.
public Set<SentenceDetectorFeature<?>> getFeatureSet(List<String> featureDescriptors) {
Set<SentenceDetectorFeature<?>> features = new TreeSet<SentenceDetectorFeature<?>>();
FunctionDescriptorParser descriptorParser = new FunctionDescriptorParser();
for (String featureDescriptor : featureDescriptors) {
if (featureDescriptor.length() > 0 && !featureDescriptor.startsWith("#")) {
FunctionDescriptor functionDescriptor = descriptorParser.parseDescriptor(featureDescriptor);
List<SentenceDetectorFeature<?>> myFeatures = this.parseDescriptor(functionDescriptor);
features.addAll(myFeatures);
}
}
return features;
}
use of com.joliciel.talismane.machineLearning.features.FunctionDescriptorParser in project jochre by urieli.
the class MergeFeatureParser method getMergeFeatureSet.
public Set<MergeFeature<?>> getMergeFeatureSet(List<String> featureDescriptors) {
Set<MergeFeature<?>> features = new TreeSet<MergeFeature<?>>();
FunctionDescriptorParser descriptorParser = new FunctionDescriptorParser();
for (String featureDescriptor : featureDescriptors) {
LOG.trace(featureDescriptor);
if (featureDescriptor.length() > 0 && !featureDescriptor.startsWith("#")) {
FunctionDescriptor functionDescriptor = descriptorParser.parseDescriptor(featureDescriptor);
List<MergeFeature<?>> myFeatures = this.parseDescriptor(functionDescriptor);
features.addAll(myFeatures);
}
}
return features;
}
use of com.joliciel.talismane.machineLearning.features.FunctionDescriptorParser in project jochre by urieli.
the class SplitFeatureParser method getSplitFeatureSet.
public Set<SplitFeature<?>> getSplitFeatureSet(List<String> featureDescriptors) {
Set<SplitFeature<?>> features = new TreeSet<SplitFeature<?>>();
FunctionDescriptorParser descriptorParser = new FunctionDescriptorParser();
for (String featureDescriptor : featureDescriptors) {
LOG.trace(featureDescriptor);
if (featureDescriptor.length() > 0 && !featureDescriptor.startsWith("#")) {
FunctionDescriptor functionDescriptor = descriptorParser.parseDescriptor(featureDescriptor);
List<SplitFeature<?>> myFeatures = this.parseDescriptor(functionDescriptor);
features.addAll(myFeatures);
}
}
return features;
}
Aggregations