org.schwiebert.abl4j.distance
Class EditDistance
java.lang.Object
org.schwiebert.abl4j.distance.EditDistance
- Direct Known Subclasses:
- WagnerFisher
public class EditDistance
- extends Object
This file contains the base class of Edit Distance Algorithms. Specific instances
of the edit distance algorithm may be derived from this class.
- Author:
- Menno van Zaanen (menno@ics.mq.edu.au) (original C++ Version), Stephan Schwiebert (sschwieb@spinfo.uni-koeln.de)
(Java-Implementation)
- See Also:
WagnerFisher,
WFBiased,
WFDefault
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
alignment
protected final Alignment alignment
matrix
protected float[][] matrix
operations
protected final List<EditOperation> operations
EditDistance
public EditDistance(List<EditOperation> op)
getOperations
public List<EditOperation> getOperations()
minGamma
public Pair<Float,EditOperation> minGamma(Pair<Integer,Integer> p)
throws RuntimeException
- Throws:
RuntimeException
getCost
public final float getCost(int i,
int j)
- Return the edit cost between the two sentences.
© 2007 Stephan Schwiebert