|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.coref.BooleanMatcherAdapter
com.aliasi.coref.matchers.SynonymMatch
public class SynonymMatch
Implements a matching function that returns the score specified in
the constructor if the mention has a synonym in the mention set as
specified by the synonym dictionary. Synonyms are defined over
normalized phrases of the mention and the phrases of the mentions
in the mention chains. Pairs of synonymous phrases are added to
the matcher with the method addSynonym(String,String).
| Field Summary |
|---|
| Fields inherited from interface com.aliasi.coref.Matcher |
|---|
MAX_DISTANCE_SCORE, MAX_SCORE, MAX_SEMANTIC_SCORE, NO_MATCH_SCORE |
| Constructor Summary | |
|---|---|
SynonymMatch(int score)
Construct an instance of synonym matching that returns the specified score in the case of a synonym match. |
|
| Method Summary | |
|---|---|
void |
addSynonym(String phrase1,
String phrase2)
Adds the two phrases as synonyms for one another. |
void |
clearSynonyms()
Removes all synonym pairs from this synonym matcher. |
boolean |
matchBoolean(Mention mention,
MentionChain chain)
Returns true if the mention's normal phrase has a
synonym that is the normal phrase of one of the chain's mentions. |
void |
removeSynonym(String phrase1,
String phrase2)
Ensure sthat the two phrases are no longer synonyms of each other. |
| Methods inherited from class com.aliasi.coref.BooleanMatcherAdapter |
|---|
match |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SynonymMatch(int score)
score - Score to return in case of a match.| Method Detail |
|---|
public boolean matchBoolean(Mention mention,
MentionChain chain)
true if the mention's normal phrase has a
synonym that is the normal phrase of one of the chain's mentions.
matchBoolean in class BooleanMatcherAdaptermention - Mention to test.chain - Mention chain to test.
true if there is a sequence substring
match between the mention and chain.
public void addSynonym(String phrase1,
String phrase2)
phrase1 - First phrase in the synonym pair.phrase2 - Second phrase in the synonym pair.
public void removeSynonym(String phrase1,
String phrase2)
phrase1 - First phrase in the synonym pair.phrase2 - Second phrase in the synonym pair.public void clearSynonyms()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||