public class Mention extends Object implements CoreAnnotation<Mention>, Serializable
| Constructor and Description |
|---|
Mention() |
Mention(int mentionID,
int startIndex,
int endIndex,
SemanticGraph dependency) |
Mention(int mentionID,
int startIndex,
int endIndex,
SemanticGraph dependency,
List<CoreLabel> mentionSpan) |
Mention(int mentionID,
int startIndex,
int endIndex,
SemanticGraph dependency,
List<CoreLabel> mentionSpan,
Tree mentionTree) |
| Modifier and Type | Method and Description |
|---|---|
void |
addApposition(Mention m)
Find apposition
|
void |
addBelongsToList(Mention m) |
void |
addListMember(Mention m) |
void |
addPredicateNominatives(Mention m)
Find predicate nominatives
|
void |
addRelativePronoun(Mention m)
Find relative pronouns
|
boolean |
animaciesAgree(Mention m) |
boolean |
animaciesAgree(Mention m,
boolean strict) |
boolean |
appearEarlierThan(Mention m)
Find which mention appears first in a document
|
boolean |
attributesAgree(Mention potentialAntecedent,
Dictionaries dict)
Detects if the mention and candidate antecedent agree on all attributes respectively.
|
static String |
buildQueryText(List<String> terms) |
boolean |
entityTypesAgree(Mention m,
Dictionaries dict) |
boolean |
entityTypesAgree(Mention m,
Dictionaries dict,
boolean strict) |
boolean |
gendersAgree(Mention m) |
boolean |
gendersAgree(Mention m,
boolean strict) |
List<String> |
getContext() |
int |
getCoordination() |
int |
getModal(Dictionaries dict) |
int |
getModifiers(Dictionaries dict) |
int |
getNegation(Dictionaries dict) |
String |
getPattern() |
String |
getPattern(List<AbstractCoreLabel> pTokens) |
String |
getPosition() |
ArrayList<ArrayList<IndexedWord>> |
getPostmodifiers() |
List<String> |
getPremodifierContext() |
ArrayList<ArrayList<IndexedWord>> |
getPremodifiers() |
String |
getQuantification(Dictionaries dict) |
String |
getRelation() |
int |
getReportEmbedding(Dictionaries dict) |
protected ArrayList<String> |
getSingletonFeatures(Dictionaries dict)
Returns the features used by the singleton predictor (logistic
classifier) to decide whether the mention belongs to a singleton entity
|
String[] |
getSplitPattern() |
Class<Mention> |
getType()
Returns the type associated with this annotation.
|
protected boolean |
headsAgree(Mention m) |
boolean |
includedIn(Mention m)
Verifies if this mention's tree is dominated by the tree of the given mention
|
boolean |
insideIn(Mention m) |
boolean |
isApposition(Mention m)
Check apposition
|
boolean |
isCoordinated() |
boolean |
isDemonym(Mention m,
Dictionaries dict) |
boolean |
isListMemberOf(Mention m)
Check list member? True if this mention is inside the other mention and the other mention is a list
|
boolean |
isMemberOfSameList(Mention m) |
boolean |
isPredicateNominatives(Mention m)
Check predicate nominatives
|
boolean |
isPronominal() |
boolean |
isRelativePronoun(Mention m)
Check relative pronouns
|
boolean |
isRoleAppositive(Mention m,
Dictionaries dict) |
protected boolean |
isTheCommonNoun() |
String |
longestNNPEndsWithHead() |
String |
lowercaseNormalizedSpanString() |
String |
lowestNPIncludesHead() |
boolean |
moreRepresentativeThan(Mention m) |
String |
nerName() |
List<CoreLabel> |
nerTokens() |
boolean |
numbersAgree(Mention m) |
List<String> |
preprocessSearchTerm() |
void |
process(Dictionaries dict,
Semantics semantics,
MentionExtractor mentionExtractor)
Set attributes of a mention:
head string, mention type, NER label, Number, Gender, Animacy
|
void |
process(Dictionaries dict,
Semantics semantics,
MentionExtractor mentionExtractor,
LogisticClassifier<String,String> singletonPredictor) |
static String |
removeParenthesis(String text) |
String |
removePhraseAfterHead()
Remove any clause after headword
|
boolean |
sameSentence(Mention m) |
protected void |
setNumber(Dictionaries dict) |
String |
spanToString() |
String |
stringWithoutArticle(String str) |
String |
toString() |
public Dictionaries.MentionType mentionType
public Dictionaries.Number number
public Dictionaries.Gender gender
public Dictionaries.Animacy animacy
public Dictionaries.Person person
public String headString
public String nerString
public int startIndex
public int endIndex
public int headIndex
public int mentionID
public int originalRef
public IndexedWord headIndexedWord
public int goldCorefClusterID
public int corefClusterID
public int sentNum
public int utter
public int paragraph
public boolean isSubject
public boolean isDirectObject
public boolean isIndirectObject
public boolean isPrepositionObject
public IndexedWord dependingVerb
public boolean twinless
public boolean generic
public boolean isSingleton
public Tree mentionSubTree
public Tree contextParseTree
public CoreLabel headWord
public SemanticGraph dependency
public Object synsets
public Set<Mention> appositions
public Set<Mention> listMembers
public Set<Mention> belongToLists
public SpeakerInfo speakerInfo
public Mention()
public Mention(int mentionID,
int startIndex,
int endIndex,
SemanticGraph dependency)
public Mention(int mentionID,
int startIndex,
int endIndex,
SemanticGraph dependency,
List<CoreLabel> mentionSpan)
public Mention(int mentionID,
int startIndex,
int endIndex,
SemanticGraph dependency,
List<CoreLabel> mentionSpan,
Tree mentionTree)
public Class<Mention> getType()
CoreAnnotationgetType in interface CoreAnnotation<Mention>public boolean isPronominal()
public String spanToString()
public String lowercaseNormalizedSpanString()
public String nerName()
public void process(Dictionaries dict, Semantics semantics, MentionExtractor mentionExtractor) throws Exception
Exceptionpublic void process(Dictionaries dict, Semantics semantics, MentionExtractor mentionExtractor, LogisticClassifier<String,String> singletonPredictor) throws Exception
Exceptionprotected ArrayList<String> getSingletonFeatures(Dictionaries dict)
public boolean isListMemberOf(Mention m)
public void addListMember(Mention m)
public void addBelongsToList(Mention m)
public boolean isMemberOfSameList(Mention m)
protected void setNumber(Dictionaries dict)
public boolean sameSentence(Mention m)
protected boolean headsAgree(Mention m)
public boolean numbersAgree(Mention m)
public boolean gendersAgree(Mention m)
public boolean gendersAgree(Mention m, boolean strict)
public boolean animaciesAgree(Mention m)
public boolean animaciesAgree(Mention m, boolean strict)
public boolean entityTypesAgree(Mention m, Dictionaries dict)
public boolean entityTypesAgree(Mention m, Dictionaries dict, boolean strict)
public boolean includedIn(Mention m)
public boolean attributesAgree(Mention potentialAntecedent, Dictionaries dict)
potentialAntecedent - public void addApposition(Mention m)
public boolean isApposition(Mention m)
public void addPredicateNominatives(Mention m)
public boolean isPredicateNominatives(Mention m)
public void addRelativePronoun(Mention m)
public boolean appearEarlierThan(Mention m)
public String longestNNPEndsWithHead()
public String lowestNPIncludesHead()
public String removePhraseAfterHead()
protected boolean isTheCommonNoun()
public boolean insideIn(Mention m)
public boolean moreRepresentativeThan(Mention m)
public ArrayList<ArrayList<IndexedWord>> getPremodifiers()
public ArrayList<ArrayList<IndexedWord>> getPostmodifiers()
public String[] getSplitPattern()
public String getPattern()
public String getPattern(List<AbstractCoreLabel> pTokens)
public boolean isCoordinated()
public boolean isRelativePronoun(Mention m)
public boolean isRoleAppositive(Mention m, Dictionaries dict)
public boolean isDemonym(Mention m, Dictionaries dict)
public String getPosition()
public String getRelation()
public int getModifiers(Dictionaries dict)
public String getQuantification(Dictionaries dict)
public int getNegation(Dictionaries dict)
public int getModal(Dictionaries dict)
public int getReportEmbedding(Dictionaries dict)
public int getCoordination()