public class SynonymMatch extends BooleanMatcherAdapter
addSynonym(String,String).MAX_DISTANCE_SCORE, MAX_SCORE, MAX_SEMANTIC_SCORE, NO_MATCH_SCORE| Constructor and Description |
|---|
SynonymMatch(int score)
Construct an instance of synonym matching that returns the
specified score in the case of a synonym match.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
matchpublic SynonymMatch(int score)
score - Score to return in case of a match.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()
Copyright © 2019 Alias-i, Inc.. All rights reserved.