Modifier and Type | Field and Description |
---|---|
KBPRelationExtractor |
extractor
The extractor implementation.
|
DEFAULT_REQUIREMENTS, STANFORD_CDC_TOKENIZE, 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 and Description |
---|
KBPAnnotator(java.util.Properties properties) |
KBPAnnotator(java.lang.String name,
java.util.Properties props)
Create a new KBP annotator from the given properties.
|
Modifier and Type | Method and Description |
---|---|
void |
annotate(Annotation annotation)
Annotate this document for KBP relations.
|
Pair<java.util.List<CoreMap>,CoreMap> |
corefChainToKBPMentions(CorefChain corefChain,
Annotation ann,
java.util.HashMap<Pair<java.lang.Integer,java.lang.Integer>,CoreMap> kbpMentions)
Helper method to find best kbp mention in a coref chain
This is defined as longest kbp mention or null if
the coref chain does not contain a kbp mention
|
static void |
main(java.lang.String[] args)
A debugging method to try relation extraction from the console.
|
java.util.Set<java.lang.Class<? extends CoreAnnotation>> |
requirementsSatisfied()
Returns a set of requirements for which tasks this annotator can
provide.
|
java.util.Set<java.lang.Class<? extends CoreAnnotation>> |
requires()
Returns the set of tasks which this annotator requires in order
to perform.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exactRequirements, unmount
public final KBPRelationExtractor extractor
public KBPAnnotator(java.lang.String name, java.util.Properties props)
props
- The properties to use when creating this extractor.public KBPAnnotator(java.util.Properties properties)
KBPAnnotator(String, Properties)
public Pair<java.util.List<CoreMap>,CoreMap> corefChainToKBPMentions(CorefChain corefChain, Annotation ann, java.util.HashMap<Pair<java.lang.Integer,java.lang.Integer>,CoreMap> kbpMentions)
ann
- the annotationcorefChain
- CorefChain containing potential KBP mentions to search throughkbpMentions
- HashMap mapping character offsets to KBP mentionspublic void annotate(Annotation annotation)
public java.util.Set<java.lang.Class<? extends CoreAnnotation>> requirementsSatisfied()
requirementsSatisfied
in interface Annotator
public java.util.Set<java.lang.Class<? extends CoreAnnotation>> requires()
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
- If any IO problem