semeval.coreference
Class CoreferenceChain

java.lang.Object
  extended by semeval.coreference.CoreferenceChain

public class CoreferenceChain
extends java.lang.Object

Represents a coreference chain in the semeval-SalsaXML corpora.

Author:
The SALSA Project team

Constructor Summary
CoreferenceChain(Corpus corpus)
          Default constructor that takes the Corpus as an argument.
 
Method Summary
 boolean addCoreferenceAnnotation(SingleCoreferenceAnnotation newAnnotation)
          Returns true if the annotation matches one of the single coreferences that are already contained in singleCoreferences.
 void addCoreferenceAnnotationWithoutChecking(SingleCoreferenceAnnotation newAnnotation)
          Adds 'newAnnotation' to this CoreferenceChain without checking if it really suits to this chain.
 boolean annotationsMatch(SingleCoreferenceAnnotation firstAnnotation, SingleCoreferenceAnnotation secondAnnotation)
          Two references of the 'Coreference' frame match if at least one lemma covered by the 'Coreferent' FE of firstAnnotation overlaps with a lemma covered by the 'Current' FE of secondAnnotation, or the other way round.
 java.util.ArrayList<SingleCoreferenceAnnotation> getSingleCoreferences()
          Returns the list of SingleCoreferenceAnnotation elements.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoreferenceChain

public CoreferenceChain(Corpus corpus)
Default constructor that takes the Corpus as an argument.

Parameters:
corpus -
Method Detail

addCoreferenceAnnotation

public boolean addCoreferenceAnnotation(SingleCoreferenceAnnotation newAnnotation)
Returns true if the annotation matches one of the single coreferences that are already contained in singleCoreferences. Returns also true if no annotation has been set yet.

Parameters:
newAnnotation -
Returns:

addCoreferenceAnnotationWithoutChecking

public void addCoreferenceAnnotationWithoutChecking(SingleCoreferenceAnnotation newAnnotation)
Adds 'newAnnotation' to this CoreferenceChain without checking if it really suits to this chain. Please use this method only if you are sure that in the end this CoreferenceChain will still be a connected chain.

Parameters:
newAnnotation -

annotationsMatch

public boolean annotationsMatch(SingleCoreferenceAnnotation firstAnnotation,
                                SingleCoreferenceAnnotation secondAnnotation)
Two references of the 'Coreference' frame match if at least one lemma covered by the 'Coreferent' FE of firstAnnotation overlaps with a lemma covered by the 'Current' FE of secondAnnotation, or the other way round.

Parameters:
firstAnnotation -
secondAnnotation -
Returns:

getSingleCoreferences

public java.util.ArrayList<SingleCoreferenceAnnotation> getSingleCoreferences()
Returns the list of SingleCoreferenceAnnotation elements.

Returns:
the singleCoreferences

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object