|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcic.wsd.testing.Decision
public class Decision
Class for storing a decision made by the disambiguation algorithm.
Field Summary | |
---|---|
(package private) int[] |
answers
Senses selected by the algorithm. |
(package private) boolean |
attempted
True, if the algorithms sets at least a single weight. |
(package private) java.util.ArrayList<java.util.ArrayList<java.lang.String>> |
decisionWords
Array containing the words used for scoring each sense of the target word. |
(package private) AmbiguousWord |
target
The disambiguated word. |
(package private) double[] |
weights
Array containing sense weights given by the disambiguation algorithm. |
(package private) java.util.ArrayList<AmbiguousWord> |
window
Context words used for disambiguating a word. |
Constructor Summary | |
---|---|
Decision(AmbiguousWord target,
java.util.ArrayList<AmbiguousWord> window)
Prepares a new decision with empty weights. |
Method Summary | |
---|---|
void |
calculateAnswer()
This method is the one who sets the system answers. |
int[] |
getAnswers()
Returns the answers of the algorithm. |
java.lang.String |
getAnswersString()
Returns "( [answer1 [,answerN]*]* )". |
java.util.ArrayList<java.lang.String> |
getDecisionWords(int sense)
Returns the words used for scoring a sense. |
double |
getScore()
Calculates this decision's score following the Senseval score system. |
int |
getSenseCount()
Returns the number of senses disambiguated. |
int |
getSensesAddressedCount()
Returns a count of the number of senses with a score>0 |
AmbiguousWord |
getTarget()
Returns the target word. |
double[] |
getWeights()
Returns the scores of each sense. |
java.util.ArrayList<AmbiguousWord> |
getWindow()
Returns the window. |
java.lang.String |
getWindowPrint()
Returns "[windowWord1,... |
boolean |
isAttempted()
Returns true, if the algorithms sets at least a single weight. |
boolean |
isCorrect(int answer)
Returns true if answer is among the correct senses. |
boolean |
isCorrectSenseAddressed()
Returns true, if an algorithm answer are among the correct answers. |
boolean |
isTied()
Returns true, if the algorithm returned more than one correct answer. |
void |
setSense(int sense,
double w,
java.util.ArrayList<java.lang.String> words)
Sets a sense weight and the words used for scoring the sense. |
void |
unTie(Decision tie)
Solves a tie with the answer provided by another disambiguation approach. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int[] answers
AmbiguousWord target
java.util.ArrayList<AmbiguousWord> window
java.util.ArrayList<java.util.ArrayList<java.lang.String>> decisionWords
double[] weights
boolean attempted
Constructor Detail |
---|
public Decision(AmbiguousWord target, java.util.ArrayList<AmbiguousWord> window)
target
- The disambiguated word.window
- Words used for disambiguating the target.Method Detail |
---|
public void setSense(int sense, double w, java.util.ArrayList<java.lang.String> words)
sense
- Measured sense.w
- Weight given by the disambiguation algorithm.words
- The words used for scoring this sense. words must be an empty ArrayList if w=0.public java.util.ArrayList<java.lang.String> getDecisionWords(int sense)
sense
- Target sense number.
public boolean isAttempted()
public void calculateAnswer()
public int[] getAnswers()
public AmbiguousWord getTarget()
public java.util.ArrayList<AmbiguousWord> getWindow()
public double[] getWeights()
public java.lang.String getWindowPrint()
public int getSenseCount()
public int getSensesAddressedCount()
public boolean isCorrectSenseAddressed()
public boolean isTied()
public void unTie(Decision tie)
tie
- answer provided by another disambiguation approach.public double getScore()
public boolean isCorrect(int answer)
answer
- Answer to be checked.
public java.lang.String getAnswersString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |