org.cogroo.analyzer
Class POSTagger
java.lang.Object
org.cogroo.analyzer.POSTagger
- All Implemented Interfaces:
- Analyzer
public class POSTagger
- extends Object
- implements Analyzer
The POSTagger
class analyzes each token of a sentence and
classifies it grammatically.
Constructor Summary |
POSTagger(opennlp.tools.postag.POSTaggerME tagger)
|
POSTagger
public POSTagger(opennlp.tools.postag.POSTaggerME tagger)
analyze
public void analyze(Document document)
- Description copied from interface:
Analyzer
- Analyzes part of a text or a word.
For example, it can search all the
sentences in the text or tag every word in a sentence.
- Specified by:
analyze
in interface Analyzer
- Parameters:
document
- contains the whole text given by the user. After an analysis it can store the text's sentences, words or its tags.
createSpanList
public static List<opennlp.tools.util.Span> createSpanList(String[] toks,
String[] tags)
Copyright © 2012-2013 CoGrOO. All Rights Reserved.