|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcic.wsd.disambiguation.WSDAlgorithm
public abstract class WSDAlgorithm
Generic template for a bag-of-words disambiguation algorithm.
Field Summary | |
---|---|
(package private) java.util.ArrayList<cic.wordnet.pairs.KeyString> |
params
ArrayList for containing extra parameters and its values. |
Constructor Summary | |
---|---|
WSDAlgorithm()
|
Method Summary | |
---|---|
abstract Decision |
disambiguate(AmbiguousWord target,
java.util.ArrayList<AmbiguousWord> window)
Disambiguates target using the window. |
java.lang.String |
getParams()
|
boolean |
overlap(cic.wordnet.ParsedSynset sense,
AmbiguousWord lemma,
java.util.ArrayList<java.lang.String> dwords)
Returns the overlap between a sense and an AmbiguousWord. |
boolean |
overlap(cic.wordnet.ParsedSynset sense,
cic.wordnet.ParsedSynset sense2,
java.util.ArrayList<java.lang.String> dwords)
Returns the overlap between two senses. |
boolean |
overlap(cic.wordnet.ParsedSynset sense,
java.lang.String lemma)
Tells if the overlap between a sense and a lemma exists. |
void |
setParams(java.lang.String string)
Method for setting extra parameters. |
java.util.ArrayList<Decision> |
solve(Input document,
java.util.ArrayList<Condition> conditions,
int windowSize,
WSDAlgorithm backoff,
WSDAlgorithm tie)
Tells the disambiguation algorithm to solve an input document. |
abstract java.lang.String |
toString()
Return the name of the algorithm. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.util.ArrayList<cic.wordnet.pairs.KeyString> params
Constructor Detail |
---|
public WSDAlgorithm()
Method Detail |
---|
public java.util.ArrayList<Decision> solve(Input document, java.util.ArrayList<Condition> conditions, int windowSize, WSDAlgorithm backoff, WSDAlgorithm tie)
document
- The disambiguated document.conditions
- Conditions for window selection.windowSize
- Maximum number of words in the window.backoff
- Back-off strategy.tie
- Algorithm to be used for solving ties.
public abstract Decision disambiguate(AmbiguousWord target, java.util.ArrayList<AmbiguousWord> window)
target
- The AmbiguousWord to be disambiguated.window
- The context window that helps disambiguation process.
public abstract java.lang.String toString()
toString
in class java.lang.Object
public boolean overlap(cic.wordnet.ParsedSynset sense, java.lang.String lemma)
sense
- Target sense.lemma
- Target lemma.
public boolean overlap(cic.wordnet.ParsedSynset sense, cic.wordnet.ParsedSynset sense2, java.util.ArrayList<java.lang.String> dwords)
sense
- Sense 1.sense2
- Sense 2.dwords
- ArrayList for storing the overlapping words.
public boolean overlap(cic.wordnet.ParsedSynset sense, AmbiguousWord lemma, java.util.ArrayList<java.lang.String> dwords)
sense
- Target sense.lemma
- Target AmbiguousWord.dwords
- ArrayList for storing the overlapping words.
public void setParams(java.lang.String string)
string
- String containing the values and names of the extra parameters.public java.lang.String getParams()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |