public abstract class CorefMentionFinder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowReparsing |
protected static TregexPattern |
enumerationsMentionPattern
Extract enumerations (A, B, and C)
|
protected HeadFinder |
headFinder |
protected java.util.Locale |
lang |
protected static TregexPattern |
npOrPrpMentionPattern |
protected Annotator |
parserProcessor |
Constructor and Description |
---|
CorefMentionFinder() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addGoldMentions(java.util.List<CoreMap> sentences,
java.util.List<java.util.Set<IntPair>> mentionSpanSetList,
java.util.List<java.util.List<Mention>> predictedMentions,
java.util.List<java.util.List<Mention>> allGoldMentions) |
protected static void |
addNamedEntityStrings(CoreMap s,
java.util.Set<java.lang.String> neStrings,
java.util.Set<IntPair> namedEntitySpanSet) |
protected static void |
extractEnumerations(CoreMap s,
java.util.List<Mention> mentions,
java.util.Set<IntPair> mentionSpanSet,
java.util.Set<IntPair> namedEntitySpanSet) |
protected static void |
extractNamedEntityModifiers(java.util.List<CoreMap> sentences,
java.util.List<java.util.Set<IntPair>> mentionSpanSetList,
java.util.List<java.util.List<Mention>> predictedMentions,
java.util.Set<java.lang.String> neStrings) |
protected static void |
extractPremarkedEntityMentions(CoreMap s,
java.util.List<Mention> mentions,
java.util.Set<IntPair> mentionSpanSet,
java.util.Set<IntPair> namedEntitySpanSet) |
void |
findHead(CoreMap s,
java.util.List<Mention> mentions) |
protected static void |
findHeadChinese(java.util.List<CoreLabel> sent,
Mention m) |
abstract java.util.List<java.util.List<Mention>> |
findMentions(Annotation doc,
Dictionaries dict,
java.util.Properties props)
Get all the predicted mentions for a document.
|
Tree |
findSyntacticHead(Mention m,
Tree root,
java.util.List<CoreLabel> tokens) |
protected static boolean |
insideNE(IntPair mSpan,
java.util.Set<IntPair> namedEntitySpanSet)
Check whether a mention is inside of a named entity
|
static boolean |
inStopList(Mention m) |
static boolean |
isPleonastic(Mention m,
Tree tree) |
static boolean |
isPleonasticDebug(Mention m,
Tree tree,
java.lang.StringBuilder sbLog) |
static boolean |
partitiveRule(Mention m,
java.util.List<CoreLabel> sent,
Dictionaries dict) |
protected void |
removeSpuriousMentions(Annotation doc,
java.util.List<java.util.List<Mention>> predictedMentions,
Dictionaries dict,
boolean removeNested,
java.util.Locale lang) |
protected void |
removeSpuriousMentionsEn(Annotation doc,
java.util.List<java.util.List<Mention>> predictedMentions,
Dictionaries dict) |
protected void |
removeSpuriousMentionsZh(Annotation doc,
java.util.List<java.util.List<Mention>> predictedMentions,
Dictionaries dict,
boolean removeNested) |
protected java.util.Locale lang
protected HeadFinder headFinder
protected Annotator parserProcessor
protected boolean allowReparsing
protected static final TregexPattern npOrPrpMentionPattern
protected static final TregexPattern enumerationsMentionPattern
public abstract java.util.List<java.util.List<Mention>> findMentions(Annotation doc, Dictionaries dict, java.util.Properties props)
doc
- The syntactically annotated documentdict
- Dictionaries for coref.protected static void extractPremarkedEntityMentions(CoreMap s, java.util.List<Mention> mentions, java.util.Set<IntPair> mentionSpanSet, java.util.Set<IntPair> namedEntitySpanSet)
protected static void extractEnumerations(CoreMap s, java.util.List<Mention> mentions, java.util.Set<IntPair> mentionSpanSet, java.util.Set<IntPair> namedEntitySpanSet)
protected static boolean insideNE(IntPair mSpan, java.util.Set<IntPair> namedEntitySpanSet)
public static boolean inStopList(Mention m)
protected void removeSpuriousMentions(Annotation doc, java.util.List<java.util.List<Mention>> predictedMentions, Dictionaries dict, boolean removeNested, java.util.Locale lang)
protected void removeSpuriousMentionsEn(Annotation doc, java.util.List<java.util.List<Mention>> predictedMentions, Dictionaries dict)
protected void removeSpuriousMentionsZh(Annotation doc, java.util.List<java.util.List<Mention>> predictedMentions, Dictionaries dict, boolean removeNested)
protected static void extractNamedEntityModifiers(java.util.List<CoreMap> sentences, java.util.List<java.util.Set<IntPair>> mentionSpanSetList, java.util.List<java.util.List<Mention>> predictedMentions, java.util.Set<java.lang.String> neStrings)
protected static void addNamedEntityStrings(CoreMap s, java.util.Set<java.lang.String> neStrings, java.util.Set<IntPair> namedEntitySpanSet)
protected static void addGoldMentions(java.util.List<CoreMap> sentences, java.util.List<java.util.Set<IntPair>> mentionSpanSetList, java.util.List<java.util.List<Mention>> predictedMentions, java.util.List<java.util.List<Mention>> allGoldMentions)
public Tree findSyntacticHead(Mention m, Tree root, java.util.List<CoreLabel> tokens)
public static boolean partitiveRule(Mention m, java.util.List<CoreLabel> sent, Dictionaries dict)