edu.illinois.cs.cogcomp.lbj.coref.alignment
Class ExtentToHeadAligner

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.alignment.Aligner<T>
      extended by edu.illinois.cs.cogcomp.lbj.coref.alignment.DefaultAligner<Chunk>
          extended by edu.illinois.cs.cogcomp.lbj.coref.alignment.WordOverlapChunkAligner
              extended by edu.illinois.cs.cogcomp.lbj.coref.alignment.ExtentToHeadAligner
All Implemented Interfaces:
java.io.Serializable

public class ExtentToHeadAligner
extends WordOverlapChunkAligner
implements java.io.Serializable

Aligns objects by number of words overlap, then by closeness of last words. Imposes the restriction that to align, a pair of chunks must be nested.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Constructor Summary
ExtentToHeadAligner()
           
 
Method Summary
 Chunk getBestMatch(Chunk m, java.util.Set<Chunk> in)
          Finds the best match between a mention and a target.
protected  int getEndToEndDist(Chunk a, Chunk b)
          Gets the distance, in words, between the last word in a and the last word in b.
 int getOverlap(Chunk a, Chunk b)
          Determines the number of words shared in the heads of the mentions.
 boolean nestedBInA(Chunk a, Chunk b)
           
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.alignment.DefaultAligner
getAlignment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ExtentToHeadAligner

public ExtentToHeadAligner()
Method Detail

getBestMatch

public Chunk getBestMatch(Chunk m,
                          java.util.Set<Chunk> in)
Description copied from class: DefaultAligner
Finds the best match between a mention and a target. The best match is defined as the target with the greatest overlap.

Overrides:
getBestMatch in class DefaultAligner<Chunk>
Parameters:
m - The mention to match.
in - The possible targets.
Returns:
The best target for m.

getOverlap

public int getOverlap(Chunk a,
                      Chunk b)
Description copied from class: WordOverlapChunkAligner
Determines the number of words shared in the heads of the mentions.

Overrides:
getOverlap in class WordOverlapChunkAligner
Returns:
the number of words overlapping, or 0 if the chunks are not nested.

nestedBInA

public boolean nestedBInA(Chunk a,
                          Chunk b)

getEndToEndDist

protected int getEndToEndDist(Chunk a,
                              Chunk b)
Gets the distance, in words, between the last word in a and the last word in b. The distance is the absolute value of the difference between the word locations.