public class TokenFeatureExtractor extends Object implements FeatureExtractor<CharSequence>, Serializable
TokenFeatureExtractor produces feature vectors from
character sequences representing token counts.
The token feature extractors implement the Serializable
interface. A token feature extractor will actually be serializable
if the underlying tokenizer factory is serializable, either by
implementing the Serializable interface or the Compilable interface. If it is not, attempting to serialize the
feature extractor will throw an exception.
| Constructor and Description |
|---|
TokenFeatureExtractor(TokenizerFactory factory)
Construct a token-based feature extractor from the
specified tokenizer factory.
|
public TokenFeatureExtractor(TokenizerFactory factory)
factory - Tokenizer factory to use for tokenization.public Map<String,Counter> features(CharSequence in)
features in interface FeatureExtractor<CharSequence>in - Character sequence from which to extract features.public String toString()
toString() method of the contained tokenizer factory.Copyright © 2016 Alias-i, Inc.. All rights reserved.