Package opennlp.tools.doccat
Klasse NGramFeatureGenerator
java.lang.Object
opennlp.tools.doccat.NGramFeatureGenerator
- Alle implementierten Schnittstellen:
FeatureGenerator
Generates ngram features for a document.
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungInstantiates anNGramFeatureGenerator
instance with a Bi grams config.NGramFeatureGenerator
(int minGram, int maxGram) Instantiates anNGramFeatureGenerator
instance with configurable ngram parameters. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungextractFeatures
(String[] text, Map<String, Object> extraInfo) Extracts features from giventext
fragments.
-
Konstruktordetails
-
NGramFeatureGenerator
Instantiates anNGramFeatureGenerator
instance with configurable ngram parameters.- Parameter:
minGram
- The minimum words in ngram features.maxGram
- The maximum words in ngram features.- Löst aus:
InvalidFormatException
- Thrown if parameter values are invalid or inconsistent.
-
NGramFeatureGenerator
Instantiates anNGramFeatureGenerator
instance with a Bi grams config.- Löst aus:
InvalidFormatException
- Thrown if parameter values are invalid or inconsistent.
-
-
Methodendetails
-
extractFeatures
Beschreibung aus Schnittstelle kopiert:FeatureGenerator
Extracts features from giventext
fragments.- Angegeben von:
extractFeatures
in SchnittstelleFeatureGenerator
- Parameter:
text
- The text fragments to extract features fromextraInfo
- Optional extra information to be used by theFeatureGenerator
.- Gibt zurück:
- A collection of features.
-