Package com.yahoo.language.opennlp
Class OpenNlpLinguistics
- java.lang.Object
-
- com.yahoo.language.simple.SimpleLinguistics
-
- com.yahoo.language.opennlp.OpenNlpLinguistics
-
- All Implemented Interfaces:
Linguistics
public class OpenNlpLinguistics extends SimpleLinguistics
Returns a linguistics implementation based on OpenNlp.- Author:
- bratseth, jonmv
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.yahoo.language.Linguistics
Linguistics.Component
-
-
Constructor Summary
Constructors Constructor Description OpenNlpLinguistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Linguistics other)
Check if another instance is equivalent to this oneDetector
getDetector()
Returns a thread-unsafe detector.Tokenizer
getTokenizer()
Returns a thread-unsafe tokenizer.-
Methods inherited from class com.yahoo.language.simple.SimpleLinguistics
getCharacterClasses, getGramSplitter, getNormalizer, getSegmenter, getStemmer, getTransformer
-
-
-
-
Method Detail
-
getTokenizer
public Tokenizer getTokenizer()
Description copied from interface:Linguistics
Returns a thread-unsafe tokenizer. This is used at indexing time to produce a optionally stemmed and transformed (accent normalized) stream of indexable tokens.- Specified by:
getTokenizer
in interfaceLinguistics
- Overrides:
getTokenizer
in classSimpleLinguistics
-
getDetector
public Detector getDetector()
Description copied from interface:Linguistics
Returns a thread-unsafe detector. The language of the text is a parameter to other linguistic operations. This is used to determine the language of a query or document field when not specified explicitly.- Specified by:
getDetector
in interfaceLinguistics
- Overrides:
getDetector
in classSimpleLinguistics
-
equals
public boolean equals(Linguistics other)
Description copied from interface:Linguistics
Check if another instance is equivalent to this one- Specified by:
equals
in interfaceLinguistics
- Overrides:
equals
in classSimpleLinguistics
-
-