ABL4J (Alignment Based Learning for Java) - 0.9.7

org.schwiebert.abl4j.distance
Class EditDistance

java.lang.Object
  extended by 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

Field Summary
protected  Alignment alignment
           
protected  float[][] matrix
           
protected  List<EditOperation> operations
           
 
Constructor Summary
EditDistance(List<EditOperation> op)
           
 
Method Summary
 float getCost(int i, int j)
          Return the edit cost between the two sentences.
 List<EditOperation> getOperations()
           
 Pair<Float,EditOperation> minGamma(Pair<Integer,Integer> p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alignment

protected final Alignment alignment

matrix

protected float[][] matrix

operations

protected final List<EditOperation> operations
Constructor Detail

EditDistance

public EditDistance(List<EditOperation> op)
Method Detail

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.


ABL4J (Alignment Based Learning for Java) - 0.9.7

© 2007 Stephan Schwiebert