gate.util
Class AnnotationDiffer.PairingImpl
java.lang.Object
gate.util.AnnotationDiffer.PairingImpl
- All Implemented Interfaces:
- AnnotationDiffer.Pairing
- Enclosing class:
- AnnotationDiffer
- public class AnnotationDiffer.PairingImpl
- extends Object
- implements AnnotationDiffer.Pairing
Represents a pairing of a key annotation with a response annotation and
the associated score for that pairing.
Method Summary |
(package private) void |
calculateScore()
Calculates the score for this choice as:
type - sum of all the types of all OTHER mutually exclusive choices |
void |
consume()
Removes all mutually exclusive OTHER choices possible from
the data structures.
|
Annotation |
getKey()
|
Annotation |
getResponse()
|
int |
getScore()
|
int |
getType()
|
protected void |
remove()
Removes this choice from the two lists it belongs to |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keyIndex
int keyIndex
responseIndex
int responseIndex
type
int type
score
int score
scoreCalculated
boolean scoreCalculated
AnnotationDiffer.PairingImpl
AnnotationDiffer.PairingImpl(int keyIndex,
int responseIndex,
int type)
getScore
public int getScore()
getKey
public Annotation getKey()
- Specified by:
getKey
in interface AnnotationDiffer.Pairing
getResponse
public Annotation getResponse()
- Specified by:
getResponse
in interface AnnotationDiffer.Pairing
getType
public int getType()
- Specified by:
getType
in interface AnnotationDiffer.Pairing
consume
public void consume()
- Removes all mutually exclusive OTHER choices possible from
the data structures.
this gets removed from
AnnotationDiffer.possibleChoices
as well.
remove
protected void remove()
- Removes this choice from the two lists it belongs to
calculateScore
void calculateScore()
- Calculates the score for this choice as:
type - sum of all the types of all OTHER mutually exclusive choices