org.cleartk.syntax.opennlp.parser
Class CasPosTagger<TOKEN_TYPE extends org.apache.uima.jcas.tcas.Annotation,SENTENCE_TYPE extends org.apache.uima.jcas.tcas.Annotation>

java.lang.Object
  extended by org.cleartk.syntax.opennlp.parser.CasPosTagger<TOKEN_TYPE,SENTENCE_TYPE>
All Implemented Interfaces:
opennlp.tools.postag.POSTagger

public class CasPosTagger<TOKEN_TYPE extends org.apache.uima.jcas.tcas.Annotation,SENTENCE_TYPE extends org.apache.uima.jcas.tcas.Annotation>
extends Object
implements opennlp.tools.postag.POSTagger


Copyright (c) 2007-2008, Regents of the University of Colorado
All rights reserved.

Author:
Philipp Wetzler, Phili Ogren

This class provides a simple implementation of the OpenNLP POSTagger interface. This implementation doesn't perform part-of-speech tagging, per se. Instead, it retrieves part-of-speech tags from the CAS using the InputTypesHelper that it is instantiated with. This class is not intended for use outside of the ParserAnnotator.


Constructor Summary
CasPosTagger(InputTypesHelper<TOKEN_TYPE,SENTENCE_TYPE> inputTypesHelper)
           
 
Method Summary
 void setTokens(List<TOKEN_TYPE> tokens)
           
 List<String> tag(List<String> sentence)
           
 String tag(String sentence)
           
 String[] tag(String[] sentence)
           
 opennlp.tools.util.Sequence[] topKSequences(List<String> sentence)
           
 opennlp.tools.util.Sequence[] topKSequences(String[] sentence)
          This method will only return a single sequence corresponding to the part-of-speech tags that have already been assigned to the tokens in the CAS as part of some upstream processing that precedes running of the ParserAnnotator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CasPosTagger

public CasPosTagger(InputTypesHelper<TOKEN_TYPE,SENTENCE_TYPE> inputTypesHelper)
Method Detail

setTokens

public void setTokens(List<TOKEN_TYPE> tokens)

topKSequences

public opennlp.tools.util.Sequence[] topKSequences(List<String> sentence)
Specified by:
topKSequences in interface opennlp.tools.postag.POSTagger

topKSequences

public opennlp.tools.util.Sequence[] topKSequences(String[] sentence)
This method will only return a single sequence corresponding to the part-of-speech tags that have already been assigned to the tokens in the CAS as part of some upstream processing that precedes running of the ParserAnnotator.

Specified by:
topKSequences in interface opennlp.tools.postag.POSTagger

tag

public List<String> tag(List<String> sentence)
Specified by:
tag in interface opennlp.tools.postag.POSTagger

tag

public String[] tag(String[] sentence)
Specified by:
tag in interface opennlp.tools.postag.POSTagger

tag

public String tag(String sentence)
Specified by:
tag in interface opennlp.tools.postag.POSTagger


Copyright © 2013. All Rights Reserved.