public class Resolve extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
ACE
determines range of mentions which participate in reference resolution.
|
static boolean |
linkAppositesAndPredComps
set to true if apposites and predicate complements should be
linked coreferentially.
|
static boolean |
nameTypeMatch
set to true if a pair of names can be linked only if they have been
assigned the same named entity type.
|
static SentenceSet |
sentenceSet
the set of sentences in the document
|
static boolean |
trace
true to produce trace messages for the reference resolution process
|
static boolean |
useMaxEnt
true to use the Max Ent resolver
|
| Constructor and Description |
|---|
Resolve() |
| Modifier and Type | Method and Description |
|---|---|
static String |
concat(String[] s)
append strings in 's', separated by blanks
|
static boolean |
equalArray(Object[] first,
Object[] second) |
static Vector<Annotation> |
gatherClauses(Document doc,
Span span)
returns the set of all clauses (constituents of category s, rn-wh,
or rn-vingo) within Span
span of Document doc. |
static Vector<Annotation> |
gatherMentions(Document doc,
Span span)
returns the set of all mentions -- constituents which are
subject to reference resolution.
|
static HashMap<Annotation,Annotation> |
gatherSyntacticCoref(Document doc,
Vector<Annotation> mentions,
Vector<Annotation> clauses)
gatherSyntacticCoref looks for particular syntactic patterns in the
text which indicate coreference, and returns a Map with one entry
for each such syntactic coreference, linking the anaphor to the
antecedent.
|
static Annotation |
getHeadC(Annotation ann)
returns the head constituent associated with constituent 'ann'.
|
static String[] |
getHeadTokens(Document doc,
Annotation constit) |
static String[] |
getNameTokens(Document doc,
Annotation constit)
returns the name associated with a noun phrase, as an array of token
strings, or null if the np does not have a name.
|
static Annotation |
getNgHead(Annotation ng) |
static boolean |
in(Object o,
Object[] array) |
static boolean |
intersect(Object[] setA,
Object[] setB) |
static int |
isAbbreviation(String[] name,
String abbrev)
returns true if 'abbrev' is an acronym-style abbreviation for 'name'
-- i.e., an acronym with periods, such as U.S.A.
|
static int |
isAcronym(String[] name,
String acronym)
returns true if 'acronym' is a possible acronym for 'name', such
as 'USA' for 'United States of America'.
|
static boolean |
isName(Annotation constit)
returns true if 'consit' is a name.
|
static void |
markMentions(Vector mentions)
for all constituents on
mentions, set the feature
mention to true. |
static int |
matchFullName(String[] mentionName,
String mentionHead,
String[] entityName,
String entityHead)
returns true if 'mentionName' is a possible reference to 'entityName'.
|
static boolean |
matchPronoun(Document doc,
Annotation anaphor,
String mentionHead,
Annotation ent)
return true if pronoun 'mentionHead' is a possible anaphor for
entity 'ent' (this also includes possessive pronouns of category
'det', and headless noun phrases of category 'np').
|
static boolean |
nameNomCoref(Document doc,
String det,
String mentionHead,
Annotation mention,
Annotation entity)
return true if a common noun phrase headed by 'mentionHead' is a possible
anaphoric reference to the (named) entity 'entity'.
|
static boolean |
nomInName(Document doc,
Annotation mention,
Annotation entity) |
static String[] |
normalizeGazName(String[] name,
boolean notNP,
boolean trace)
returns a standardized country name, using the gazetteer.
|
static String |
normalizeName(String name)
replaces whitespace between tokens with a single blank.
|
static void |
readGenderDict(String dataPath,
Properties config)
if property NameGender.fileName is specified in config, reads the
name gender dictionary from the specified file.
|
static void |
references(Document doc,
Span span)
Resolve.references resolves the mentions (noun groups) in
span of Document doc. |
static void |
references(Document doc,
Span span,
Vector<Annotation> mentions,
Vector<Annotation> clauses) |
static void |
updateEvents(Document doc,
Span span,
Map mentionToEntity)
updates events based on reference resolution.
|
public static SentenceSet sentenceSet
public static boolean linkAppositesAndPredComps
public static boolean nameTypeMatch
public static boolean trace
public static boolean useMaxEnt
public static boolean ACE
public static void references(Document doc, Span span)
Resolve.references resolves the mentions (noun groups) in
span of Document doc. It generates
entity annotations, corresponding to one or more mentions in the
document which are coreferential. In addition, for every event
annotation in span, it generates an r-event
annotation in which each feature pointing to a mention is replaced by
the entity to which that mention has been resolved.public static void references(Document doc, Span span, Vector<Annotation> mentions, Vector<Annotation> clauses)
public static Vector<Annotation> gatherMentions(Document doc, Span span)
public static Vector<Annotation> gatherClauses(Document doc, Span span)
span of Document doc.public static void markMentions(Vector mentions)
mentions, set the feature
mention to true.public static HashMap<Annotation,Annotation> gatherSyntacticCoref(Document doc, Vector<Annotation> mentions, Vector<Annotation> clauses)
public static void updateEvents(Document doc, Span span, Map mentionToEntity)
public static void readGenderDict(String dataPath, Properties config)
public static String[] normalizeGazName(String[] name, boolean notNP, boolean trace)
public static Annotation getNgHead(Annotation ng)
public static boolean nameNomCoref(Document doc, String det, String mentionHead, Annotation mention, Annotation entity)
public static boolean nomInName(Document doc, Annotation mention, Annotation entity)
public static int matchFullName(String[] mentionName, String mentionHead, String[] entityName, String entityHead)
public static int isAcronym(String[] name, String acronym)
public static int isAbbreviation(String[] name, String abbrev)
public static boolean matchPronoun(Document doc, Annotation anaphor, String mentionHead, Annotation ent)
public static String normalizeName(String name)
public static boolean isName(Annotation constit)
public static Annotation getHeadC(Annotation ann)
public static String[] getNameTokens(Document doc, Annotation constit)
public static String[] getHeadTokens(Document doc, Annotation constit)
Copyright © 2016 New York University. All rights reserved.