|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cogroo.analyzer.Pipe
public class Pipe
The Pipe
class contains a sequence of analyzers.
It follows the composite pattern to manage the analyzers. Uses the method
add(Analyzer)
to add analyzers into the pipe.
analyze(Document)
method is thread-safe, if all analyzers in it
are also thread-safe, which is the case of the default analyzers.
Constructor Summary | |
---|---|
Pipe()
|
Method Summary | |
---|---|
void |
add(Analyzer aAnalyzer)
Adds an analyzer into the pipe. |
void |
analyze(Document document)
Analyzes part of a text or a word. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pipe()
Method Detail |
---|
public void add(Analyzer aAnalyzer)
Follows the composite pattern standards.
aAnalyzer
- is the analyzer to be added in the pipe.public void analyze(Document document)
Analyzer
For example, it can search all the sentences in the text or tag every word in a sentence.
analyze
in interface Analyzer
document
- contains the whole text given by the user. After an analysis it can store the text's sentences, words or its tags.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |