edu.illinois.cs.cogcomp.lbj.coref.alignment
Class ExtentToHeadAligner
java.lang.Object
edu.illinois.cs.cogcomp.lbj.coref.alignment.Aligner<T>
edu.illinois.cs.cogcomp.lbj.coref.alignment.DefaultAligner<Chunk>
edu.illinois.cs.cogcomp.lbj.coref.alignment.WordOverlapChunkAligner
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
ExtentToHeadAligner
public ExtentToHeadAligner()
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.