org.cogroo.analyzer
Class POSTagger

java.lang.Object
  extended by 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)
           
 
Method Summary
 void analyze(Document document)
          Analyzes part of a text or a word.
static List<opennlp.tools.util.Span> createSpanList(String[] toks, String[] tags)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POSTagger

public POSTagger(opennlp.tools.postag.POSTaggerME tagger)
Method Detail

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.