public class Mention extends java.lang.Object implements CoreAnnotation<Mention>, java.io.Serializable
Constructor and Description |
---|
Mention() |
Mention(int mentionID,
int startIndex,
int endIndex,
java.util.List<CoreLabel> sentenceWords,
SemanticGraph basicDependency,
SemanticGraph enhancedDependency) |
Mention(int mentionID,
int startIndex,
int endIndex,
java.util.List<CoreLabel> sentenceWords,
SemanticGraph basicDependency,
SemanticGraph enhancedDependency,
java.util.List<CoreLabel> mentionSpan) |
Mention(int mentionID,
int startIndex,
int endIndex,
java.util.List<CoreLabel> sentenceWords,
SemanticGraph basicDependency,
SemanticGraph enhancedDependency,
java.util.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 java.lang.String |
buildQueryText(java.util.List<java.lang.String> terms) |
boolean |
entityTypesAgree(Mention m,
Dictionaries dict) |
boolean |
entityTypesAgree(Mention m,
Dictionaries dict,
boolean strict) |
boolean |
equals(java.lang.Object obj) |
boolean |
gendersAgree(Mention m) |
boolean |
gendersAgree(Mention m,
boolean strict) |
java.util.List<java.lang.String> |
getContext() |
int |
getCoordination() |
int |
getModal(Dictionaries dict) |
int |
getModifiers(Dictionaries dict) |
int |
getNegation(Dictionaries dict) |
java.lang.String |
getPattern() |
java.lang.String |
getPattern(java.util.List<AbstractCoreLabel> pTokens) |
java.lang.String |
getPosition() |
java.util.ArrayList<java.util.ArrayList<IndexedWord>> |
getPostmodifiers() |
java.util.List<java.lang.String> |
getPremodifierContext() |
java.util.ArrayList<java.util.ArrayList<IndexedWord>> |
getPremodifiers() |
java.lang.String |
getQuantification(Dictionaries dict) |
java.lang.String |
getRelation() |
int |
getReportEmbedding(Dictionaries dict) |
java.util.ArrayList<java.lang.String> |
getSingletonFeatures(Dictionaries dict)
Returns the features used by the singleton predictor (logistic
classifier) to decide whether the mention belongs to a singleton entity
|
java.lang.String[] |
getSplitPattern() |
java.lang.Class<Mention> |
getType()
Returns the type associated with this annotation.
|
int |
hashCode() |
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)
Returns true if this mention is contained inside 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() |
java.lang.String |
longestNNPEndsWithHead() |
java.lang.String |
lowercaseNormalizedSpanString() |
java.lang.String |
lowestNPIncludesHead() |
boolean |
moreRepresentativeThan(Mention m) |
java.lang.String |
nerName() |
java.util.List<CoreLabel> |
nerTokens() |
boolean |
numbersAgree(Mention m) |
java.util.List<java.lang.String> |
preprocessSearchTerm() |
void |
process(Dictionaries dict,
Semantics semantics)
Set attributes of a mention:
head string, mention type, NER label, Number, Gender, Animacy
|
void |
process(Dictionaries dict,
Semantics semantics,
LogisticClassifier<java.lang.String,java.lang.String> singletonPredictor) |
static java.lang.String |
removeParenthesis(java.lang.String text) |
java.lang.String |
removePhraseAfterHead()
Remove any clause after headword
|
boolean |
sameSentence(Mention m) |
protected void |
setNumber(Dictionaries dict) |
java.lang.String |
spanToString() |
java.lang.String |
stringWithoutArticle(java.lang.String str) |
java.lang.String |
toString() |
public Dictionaries.MentionType mentionType
public Dictionaries.Number number
public Dictionaries.Gender gender
public Dictionaries.Animacy animacy
public Dictionaries.Person person
public java.lang.String headString
public java.lang.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 mentionNum
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 hasTwin
public boolean generic
public boolean isSingleton
public java.util.List<CoreLabel> sentenceWords
public java.util.List<CoreLabel> originalSpan
public Tree mentionSubTree
public Tree contextParseTree
public CoreLabel headWord
public SemanticGraph basicDependency
public SemanticGraph enhancedDependency
public java.util.Set<java.lang.String> dependents
public java.util.List<java.lang.String> preprocessedTerms
public java.lang.Object synsets
public java.util.Set<Mention> appositions
public java.util.Set<Mention> predicateNominatives
public java.util.Set<Mention> relativePronouns
public java.util.Set<Mention> listMembers
public java.util.Set<Mention> belongToLists
public SpeakerInfo speakerInfo
public IntCounter<java.lang.Integer> antecedentOrdering
public Mention()
public Mention(int mentionID, int startIndex, int endIndex, java.util.List<CoreLabel> sentenceWords, SemanticGraph basicDependency, SemanticGraph enhancedDependency)
public Mention(int mentionID, int startIndex, int endIndex, java.util.List<CoreLabel> sentenceWords, SemanticGraph basicDependency, SemanticGraph enhancedDependency, java.util.List<CoreLabel> mentionSpan)
public Mention(int mentionID, int startIndex, int endIndex, java.util.List<CoreLabel> sentenceWords, SemanticGraph basicDependency, SemanticGraph enhancedDependency, java.util.List<CoreLabel> mentionSpan, Tree mentionTree)
public java.lang.Class<Mention> getType()
CoreAnnotation
getType
in interface CoreAnnotation<Mention>
public boolean isPronominal()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String spanToString()
public java.lang.String lowercaseNormalizedSpanString()
public java.util.List<CoreLabel> nerTokens()
public java.lang.String nerName()
public void process(Dictionaries dict, Semantics semantics) throws java.lang.Exception
java.lang.Exception
public void process(Dictionaries dict, Semantics semantics, LogisticClassifier<java.lang.String,java.lang.String> singletonPredictor) throws java.lang.Exception
java.lang.Exception
public java.util.ArrayList<java.lang.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)
public 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 java.lang.String longestNNPEndsWithHead()
public java.lang.String lowestNPIncludesHead()
public java.lang.String stringWithoutArticle(java.lang.String str)
public java.util.List<java.lang.String> preprocessSearchTerm()
public static java.lang.String buildQueryText(java.util.List<java.lang.String> terms)
public java.lang.String removePhraseAfterHead()
public static java.lang.String removeParenthesis(java.lang.String text)
protected boolean isTheCommonNoun()
public boolean insideIn(Mention m)
public boolean moreRepresentativeThan(Mention m)
public java.util.ArrayList<java.util.ArrayList<IndexedWord>> getPremodifiers()
public java.util.ArrayList<java.util.ArrayList<IndexedWord>> getPostmodifiers()
public java.lang.String[] getSplitPattern()
public java.lang.String getPattern()
public java.lang.String getPattern(java.util.List<AbstractCoreLabel> pTokens)
public boolean isCoordinated()
public java.util.List<java.lang.String> getContext()
public java.util.List<java.lang.String> getPremodifierContext()
public boolean isRelativePronoun(Mention m)
public boolean isRoleAppositive(Mention m, Dictionaries dict)
public boolean isDemonym(Mention m, Dictionaries dict)
public java.lang.String getPosition()
public java.lang.String getRelation()
public int getModifiers(Dictionaries dict)
public java.lang.String getQuantification(Dictionaries dict)
public int getNegation(Dictionaries dict)
public int getModal(Dictionaries dict)
public int getReportEmbedding(Dictionaries dict)
public int getCoordination()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object