public class CharacterCategoryPatternFunction<T extends Annotation> extends Object implements FeatureFunction
| Modifier and Type | Class and Description |
|---|---|
static class |
CharacterCategoryPatternFunction.PatternType
The type of pattern to generate in feature values.
|
| Constructor and Description |
|---|
CharacterCategoryPatternFunction()
Create the standard feature extractor, where one category is added to the feature value for
each character in the text.
|
CharacterCategoryPatternFunction(CharacterCategoryPatternFunction.PatternType patternType)
Create a feature extractor with the specified pattern type.
|
| Modifier and Type | Method and Description |
|---|---|
List<Feature> |
apply(Feature feature) |
protected String |
classifyChar(char c) |
static <T extends Annotation> |
createExtractor() |
static <T extends Annotation> |
createExtractor(CharacterCategoryPatternFunction.PatternType patternType) |
String |
getFeatureName() |
public CharacterCategoryPatternFunction()
CharacterCategoryPatternFunction.PatternType.ONE_PER_CHAR.public CharacterCategoryPatternFunction(CharacterCategoryPatternFunction.PatternType patternType)
CharacterCategoryPatternFunction.PatternType for the
acceptable pattern types.patternType - The type of pattern to generate in feature values.protected String classifyChar(char c)
public static <T extends Annotation> NamedFeatureExtractor1<T> createExtractor()
public static <T extends Annotation> NamedFeatureExtractor1<T> createExtractor(CharacterCategoryPatternFunction.PatternType patternType)
public String getFeatureName()
Copyright © 2014. All rights reserved.