public class EntityRecognizerAnalyzer extends java.lang.Object implements Analyzer
EntityRecognizer
after analyzing the text. This
way, this analyzer acts as a container of another Analyzer
and an
EntityRecognizer
. The input text is first analyzed by the later
Analyzer
, and the EntityRecognizer
is then applied.
Instances of this class are thread-safe as long as the underlying
Analyzer
and EntityRecognizer
are thread-safe as well.
Constructor and Description |
---|
EntityRecognizerAnalyzer(Analyzer analyzer,
EntityRecognizer entityRecognizer)
Constructs a new analyzer that contains the given
Analyzer and
EntityRecognizer . |
public EntityRecognizerAnalyzer(Analyzer analyzer, EntityRecognizer entityRecognizer)
Analyzer
and
EntityRecognizer
.analyzer
- the Analyzer
to use for analyzing text.entityRecognizer
- the EntityRecognizer
to apply after analyzing the text.public Text analyze(java.lang.String text, boolean isOneSentence)
Analyzer
Text
representation. This analysis
consists of segmenting the input text into sentences, tokenizing it,
creating its parse tree and identifying entities.analyze
in interface Analyzer
text
- the text to analyze.isOneSentence
- whether the given text is a single sentence or not. If false
, the analyzer will try to segment the input text into sentences by itself, but it might still decide that it consists of a single sentence.Text
representation of the input text.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object