public class FreelingAnalyzer extends java.lang.Object implements Analyzer
libfreeling_API.so
in Unix like systems), which should
be accessible from the application's library path.
Freeling was not designed with concurrency in mind, so instances of this class are not thread-safe.
Constructor and Description |
---|
FreelingAnalyzer(java.lang.String freelingPath,
java.lang.String lang)
Constructs a new analyzer that uses the specified installation of Freeling.
|
public FreelingAnalyzer(java.lang.String freelingPath, java.lang.String lang)
freelingPath
- the path in which Freeling is installed (something like /usr/share/freeling/
).lang
- the language code that corresponds to the directory name that contains the data files to use (something like es
).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