public void initialize(UimaContext context) throws ResourceInitializationException {
simpleExtractors = Lists.newArrayList();
FeatureExtractor1<Token> wordExtractor = new CoveredTextExtractor<Token>();
CharacterNgramFeatureFunction.Orientation fromLeft = CharacterNgramFeatureFunction.Orientation.LEFT_TO_RIGHT;
CharacterNgramFeatureFunction.Orientation fromRight = CharacterNgramFeatureFunction.Orientation.RIGHT_TO_LEFT;
simpleExtractors.add(new FeatureFunctionExtractor<Token>(
wordExtractor,
new LowerCaseFeatureFunction(),
new CapitalTypeFeatureFunction(),
new NumericTypeFeatureFunction(),
new CharacterNgramFeatureFunction(fromLeft, 0, 1),
new CharacterNgramFeatureFunction(fromLeft, 0, 2),
new CharacterNgramFeatureFunction(fromLeft, 0, 3),
new CharacterNgramFeatureFunction(fromRight, 0, 1),
new CharacterNgramFeatureFunction(fromRight, 0, 2),
new CharacterNgramFeatureFunction(fromRight, 0, 3),
new CharacterNgramFeatureFunction(fromRight, 0, 4),
new CharacterNgramFeatureFunction(fromRight, 0, 5),
new CharacterNgramFeatureFunction(fromRight, 0, 6)));
windowExtractors = Lists.newArrayList();
windowExtractors.add(new CleartkExtractor<Token, Token>(
Token.class,
wordExtractor,
new Preceding(2),
new Following(2)));
windowNGramExtractors = Lists.newArrayList();
windowNGramExtractors.add(new CleartkExtractor<Token, Token>(Token.class, wordExtractor, new Ngram(
new Preceding(2)), new Ngram(new Following(2))));
}