Class GenderAnnotator
- java.lang.Object
-
- edu.stanford.nlp.pipeline.GenderAnnotator
-
- io.outofprintmagazine.nlp.pipeline.annotators.GenderAnnotator
-
- All Implemented Interfaces:
edu.stanford.nlp.pipeline.Annotator
,IOOPAnnotator
public class GenderAnnotator extends edu.stanford.nlp.pipeline.GenderAnnotator implements edu.stanford.nlp.pipeline.Annotator, IOOPAnnotator
-
-
Field Summary
Fields Modifier and Type Field Description protected IParameterStore
properties
protected IScorer
scorer
protected ISerializer
serializer
-
Fields inherited from class edu.stanford.nlp.pipeline.GenderAnnotator
FEMALE_FIRST_NAMES_PATH, femaleNames, MALE_FIRST_NAMES_PATH, maleNames
-
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 GenderAnnotator()
GenderAnnotator(String annotatorName, Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
annotate(edu.stanford.nlp.pipeline.Annotation annotation)
void
annotateEntityMention(edu.stanford.nlp.util.CoreMap entityMention, String gender)
Class
getAnnotationClass()
String
getDescription()
protected IScorer
getScorer()
protected ISerializer
getSerializer()
void
init(IParameterStore properties)
Set<Class<? extends edu.stanford.nlp.ling.CoreAnnotation>>
requirementsSatisfied()
void
score(edu.stanford.nlp.pipeline.CoreDocument document)
void
serialize(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode json)
void
serializeAggregateDocument(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode json)
protected void
setScorer(IScorer scorer)
protected void
setSerializer(ISerializer serializer)
-
-
-
Field Detail
-
scorer
protected IScorer scorer
-
serializer
protected ISerializer serializer
-
properties
protected IParameterStore properties
-
-
Constructor Detail
-
GenderAnnotator
public GenderAnnotator(String annotatorName, Properties props)
-
GenderAnnotator
public GenderAnnotator()
-
-
Method Detail
-
init
public void init(IParameterStore properties)
- Specified by:
init
in interfaceIOOPAnnotator
-
getSerializer
protected ISerializer getSerializer()
-
setSerializer
protected void setSerializer(ISerializer serializer)
-
getScorer
protected IScorer getScorer()
-
setScorer
protected void setScorer(IScorer scorer)
-
annotate
public void annotate(edu.stanford.nlp.pipeline.Annotation annotation)
- Specified by:
annotate
in interfaceedu.stanford.nlp.pipeline.Annotator
- Overrides:
annotate
in classedu.stanford.nlp.pipeline.GenderAnnotator
-
annotateEntityMention
public void annotateEntityMention(edu.stanford.nlp.util.CoreMap entityMention, String gender)
- Overrides:
annotateEntityMention
in classedu.stanford.nlp.pipeline.GenderAnnotator
-
requirementsSatisfied
public Set<Class<? extends edu.stanford.nlp.ling.CoreAnnotation>> requirementsSatisfied()
- Specified by:
requirementsSatisfied
in interfaceedu.stanford.nlp.pipeline.Annotator
- Overrides:
requirementsSatisfied
in classedu.stanford.nlp.pipeline.GenderAnnotator
-
getAnnotationClass
public Class getAnnotationClass()
- Specified by:
getAnnotationClass
in interfaceIOOPAnnotator
-
score
public void score(edu.stanford.nlp.pipeline.CoreDocument document)
- Specified by:
score
in interfaceIOOPAnnotator
-
serialize
public void serialize(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode json)
- Specified by:
serialize
in interfaceIOOPAnnotator
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceIOOPAnnotator
-
serializeAggregateDocument
public void serializeAggregateDocument(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode json)
- Specified by:
serializeAggregateDocument
in interfaceIOOPAnnotator
-
-