Class AbstractPosAnnotator
- java.lang.Object
-
- io.outofprintmagazine.nlp.pipeline.annotators.AbstractAnnotator
-
- io.outofprintmagazine.nlp.pipeline.annotators.AbstractPosAnnotator
-
- All Implemented Interfaces:
edu.stanford.nlp.pipeline.Annotator,IOOPAnnotator
- Direct Known Subclasses:
AbstractContextualAnnotator,AbstractTreeAnnotator,ActionlessVerbsAnnotator,AdjectiveCategoriesAnnotator,AdjectivesAnnotator,AdverbCategoriesAnnotator,AdverbsAnnotator,AmericanizeAnnotator,AngliciseAnnotator,BiberAnnotator,BiberDimensionsAnnotator,ColorsAnnotator,CommonWordsAnnotator,FlavorsAnnotator,FleschKincaidAnnotator,FunctionWordsAnnotator,LocationsAnnotator,MyersBriggsAnnotator,NonAffirmativeAnnotator,NounGroupsAnnotator,NounHypernymsAnnotator,NounsAnnotator,PeopleAnnotator,PerfecttenseAnnotator,PointlessAdjectivesAnnotator,PointlessAdverbsAnnotator,PossessivesAnnotator,PrepositionCategoriesAnnotator,PrepositionsAnnotator,PronounAnnotator,PunctuationMarkAnnotator,SVOAnnotator,TemporalNGramsAnnotator,TopicsAnnotator,UncommonWordsAnnotator,VaderSentimentAnnotator,VerbGroupsAnnotator,VerbHypernymsAnnotator,VerblessSentencesAnnotator,VerbnetGroupsAnnotator,VerbsAnnotator,VerbTenseAnnotator,WikipediaCategoriesAnnotator,WikipediaGlossAnnotator,WikipediaPageviewTopicsAnnotator,WordlessWordsAnnotator,WordnetGlossAnnotator,WordsAnnotator
public abstract class AbstractPosAnnotator extends AbstractAnnotator implements edu.stanford.nlp.pipeline.Annotator, IOOPAnnotator
Base class for custom annotators that work with part of speech tags (Core Nlp pos).
tags is conventionally a list of the part of speech tags that the annotator is interested in handling (or ignoring).
- Author:
- Ram Sadasiv
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>tags-
Fields inherited from class io.outofprintmagazine.nlp.pipeline.annotators.AbstractAnnotator
dictionaryPOS, parameterStore, punctuationMarks, scorer, serializer
-
Fields inherited from interface edu.stanford.nlp.pipeline.Annotator
DEFAULT_REQUIREMENTS, STANFORD_CLEAN_XML, STANFORD_COLUMN_DATA_CLASSIFIER, STANFORD_COREF, STANFORD_COREF_MENTION, STANFORD_DEPENDENCIES, STANFORD_DETERMINISTIC_COREF, STANFORD_DOCDATE, STANFORD_ENTITY_MENTIONS, STANFORD_GENDER, STANFORD_KBP, STANFORD_LEMMA, STANFORD_LINK, STANFORD_MWT, STANFORD_NATLOG, STANFORD_NER, STANFORD_OPENIE, STANFORD_PARSE, STANFORD_POS, STANFORD_QUOTE, STANFORD_QUOTE_ATTRIBUTION, STANFORD_REGEXNER, STANFORD_RELATION, STANFORD_SENTIMENT, STANFORD_SSPLIT, STANFORD_TOKENIZE, STANFORD_TOKENSREGEX, STANFORD_TRUECASE, STANFORD_UD_FEATURES
-
-
Constructor Summary
Constructors Constructor Description AbstractPosAnnotator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendTagsFromFile(String fileName)List<String>getTags()Set<Class<? extends edu.stanford.nlp.ling.CoreAnnotation>>requires()StringscoreLemma(edu.stanford.nlp.ling.CoreLabel token)StringscoreLemma(edu.stanford.nlp.ling.CoreLabel token, List<String> tags)StringscoreTag(edu.stanford.nlp.ling.CoreLabel token)StringscoreTag(edu.stanford.nlp.ling.CoreLabel token, List<String> tags)StringscoreToken(edu.stanford.nlp.ling.CoreLabel token)StringscoreToken(edu.stanford.nlp.ling.CoreLabel token, List<String> tags)voidsetTags(List<String> tags)-
Methods inherited from class io.outofprintmagazine.nlp.pipeline.annotators.AbstractAnnotator
addToScoreList, addToScoreMap, annotate, getAnnotationClass, getContextWords, getParameterStore, getScorer, getSerializer, hasPunctuationMark, init, isDictionaryWord, isPunctuationMark, requirementsSatisfied, score, serialize, serializeAggregateDocument, setScorer, setSerializer, toAlphaNumeric
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.stanford.nlp.pipeline.Annotator
annotate, requirementsSatisfied, unmount
-
Methods inherited from interface io.outofprintmagazine.nlp.pipeline.annotators.IOOPAnnotator
getAnnotationClass, getDescription, init, score, serialize, serializeAggregateDocument
-
-
-
-
Method Detail
-
appendTagsFromFile
protected void appendTagsFromFile(String fileName)
-
requires
public Set<Class<? extends edu.stanford.nlp.ling.CoreAnnotation>> requires()
- Specified by:
requiresin interfaceedu.stanford.nlp.pipeline.Annotator- Specified by:
requiresin classAbstractAnnotator
-
scoreToken
public String scoreToken(edu.stanford.nlp.ling.CoreLabel token)
-
scoreLemma
public String scoreLemma(edu.stanford.nlp.ling.CoreLabel token)
-
scoreTag
public String scoreTag(edu.stanford.nlp.ling.CoreLabel token)
-
-