@Beta public class CasPosTagger<TOKEN_TYPE extends Annotation,SENTENCE_TYPE extends Annotation> extends Object implements POSTagger
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 and Description |
|---|
CasPosTagger(InputTypesHelper<TOKEN_TYPE,SENTENCE_TYPE> inputTypesHelper) |
| Modifier and Type | Method and Description |
|---|---|
void |
setTokens(List<TOKEN_TYPE> tokens) |
List<String> |
tag(List<String> sentence) |
String |
tag(String sentence) |
String[] |
tag(String[] sentence) |
String[] |
tag(String[] arg0,
Object[] arg1) |
Sequence[] |
topKSequences(List<String> sentence) |
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. |
Sequence[] |
topKSequences(String[] arg0,
Object[] arg1) |
public CasPosTagger(InputTypesHelper<TOKEN_TYPE,SENTENCE_TYPE> inputTypesHelper)
public void setTokens(List<TOKEN_TYPE> tokens)
public Sequence[] topKSequences(List<String> sentence)
topKSequences in interface POSTaggerpublic Sequence[] topKSequences(String[] sentence)
ParserAnnotator.topKSequences in interface POSTaggerpublic Sequence[] topKSequences(String[] arg0, Object[] arg1)
topKSequences in interface POSTaggerCopyright © 2014. All rights reserved.