update
public static Synonyms update(java.util.Map<java.lang.String,java.lang.String> synonymMap,
Synonyms syn,
java.util.HashSet<java.lang.String> stopwords)
Class for finding longest indirect synonyms for a term.
For a synonym syn, get all its co-occurrences co.
From all co, get the term that is not a synonym to syn.
Find the longest synonym to terms and
add it to the co_occurr term set of syn according to frequency
E.g., "Cardinal Joseph Ratzinger" co-occurs with "Benedict_XVI" (freq a)
and "pope" (freq b).
Both "Benedict_XVI" and "pope" map to "Pope_Benedict_XVI" and
so we add "Pope_Benedict_XVI" to "Cardinal Joseph Ratzinger"s co-occurset
with frequency a+b.
- Parameters:
synonymMap - - map that keeps a synonym for each termsyn - - the synonym for which we want to find indirect synonyms
- Returns:
- synonym syn with updated cooccur_set