edu.illinois.cs.cogcomp.lbj.coref.alignment
Class DefaultAligner<T>

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.alignment.Aligner<T>
      extended by edu.illinois.cs.cogcomp.lbj.coref.alignment.DefaultAligner<T>
Type Parameters:
T - The type of object to be aligned.
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DefaultEMAligner, WordOverlapChunkAligner

public abstract class DefaultAligner<T>
extends Aligner<T>
implements java.io.Serializable

Aligns objects based on maximizing overlap.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Constructor Summary
DefaultAligner()
          Default Constructor.
 
Method Summary
 java.util.Map<T,T> getAlignment(java.util.Collection<T> sources, java.util.Collection<T> targets)
          Aligns each source element to some target element or to itself if no alignment can be found.
 T getBestMatch(T m, java.util.Set<T> targets)
          Finds the best match between a mention and a target.
abstract  int getOverlap(T a, T b)
           
 
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

DefaultAligner

public DefaultAligner()
Default Constructor.

Method Detail

getAlignment

public java.util.Map<T,T> getAlignment(java.util.Collection<T> sources,
                                       java.util.Collection<T> targets)
Aligns each source element to some target element or to itself if no alignment can be found. Alignment is 1-to-1 (each target element is linked to by at most one source element).

Specified by:
getAlignment in class Aligner<T>
Parameters:
sources - A collection of source elements.
targets - A collection of target elements.
Returns:
A map that aligns each source element with either a target element or itself.

getBestMatch

public T getBestMatch(T m,
                      java.util.Set<T> targets)
Finds the best match between a mention and a target. The best match is defined as the target with the greatest overlap.

Parameters:
m - The mention to match.
targets - The possible targets.
Returns:
The best target for m.

getOverlap

public abstract int getOverlap(T a,
                               T b)