public class CharacterNgramFeatureFunction extends Object implements FeatureFunction
| Modifier and Type | Class and Description |
|---|---|
static class |
CharacterNgramFeatureFunction.Orientation |
| Constructor and Description |
|---|
CharacterNgramFeatureFunction(CharacterNgramFeatureFunction.Orientation orientation,
int start,
int end) |
CharacterNgramFeatureFunction(CharacterNgramFeatureFunction.Orientation orientation,
int start,
int end,
int minimumValueLength,
boolean lowerCase) |
CharacterNgramFeatureFunction(String featureName,
CharacterNgramFeatureFunction.Orientation orientation,
int start,
int end) |
CharacterNgramFeatureFunction(String featureName,
CharacterNgramFeatureFunction.Orientation orientation,
int start,
int end,
int minimumValueLength,
boolean lowerCase)
This feature function serves up character n-grams based on StringValued features.
|
public CharacterNgramFeatureFunction(CharacterNgramFeatureFunction.Orientation orientation, int start, int end)
public CharacterNgramFeatureFunction(CharacterNgramFeatureFunction.Orientation orientation, int start, int end, int minimumValueLength, boolean lowerCase)
public CharacterNgramFeatureFunction(String featureName, CharacterNgramFeatureFunction.Orientation orientation, int start, int end)
public CharacterNgramFeatureFunction(String featureName, CharacterNgramFeatureFunction.Orientation orientation, int start, int end, int minimumValueLength, boolean lowerCase)
featureName - a user-specified name for the feature function, to be included in all feature names.orientation - must be one of LEFT_TO_RIGHT or RIGHT_TO_LEFT. The orientation determines whether
index 0 corresponds to the first character of the string value or the last. The
orientation does not affect the ordering of the characters in the n-gram which are
always returned in left-to-right order.start - the start of the n-gram (typically 0 for both orientations)end - the end of the n-gram (typically n for both orientations)minimumValueLength - This parameter allows you to skip string values that are too short. It must be greater
than or equal to end.lowerCase - if true than the n-gram used as the feature value will be lowercased.Copyright © 2014. All rights reserved.