ABL4J (Alignment Based Learning for Java) - 0.9.7

org.schwiebert.abl4j.distance
Class EditOperation.Substitute

java.lang.Object
  extended by org.schwiebert.abl4j.distance.EditOperation.Substitute
All Implemented Interfaces:
EditOperation
Direct Known Subclasses:
EditOperation.SubDis
Enclosing interface:
EditOperation

public static class EditOperation.Substitute
extends Object
implements EditOperation


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.schwiebert.abl4j.distance.EditOperation
EditOperation.Biased, EditOperation.Default, EditOperation.Delete, EditOperation.Insert, EditOperation.SubDis, EditOperation.Substitute
 
Field Summary
protected  int begin1
           
protected  int begin2
           
protected  int end1
           
protected  int end2
           
protected  ISentence sentence1
           
protected  ISentence sentence2
           
 
Constructor Summary
EditOperation.Substitute(ISentence s1, int b1, int e1, ISentence s2, int b2, int e2)
           
 
Method Summary
 Pair<Float,EditOperation> gamma(Pair<Integer,Integer> pair)
          return the gamma value of the operation (the pair of ints are indices in the sentences and 1 is the first word in the sentence)
(package private)  boolean match(Pair<Integer,Integer> p)
           
 Pair<Integer,Integer> nextCoordinates(Pair<Integer,Integer> p)
          return the next coordinates (when the operation is applied)
 Pair<Integer,Integer> previousCoordinates(Pair<Integer,Integer> p)
          return the previous coordinates (when the operation was applied)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

begin1

protected final int begin1

end1

protected final int end1

begin2

protected final int begin2

end2

protected final int end2

sentence1

protected final ISentence sentence1

sentence2

protected final ISentence sentence2
Constructor Detail

EditOperation.Substitute

public EditOperation.Substitute(ISentence s1,
                                int b1,
                                int e1,
                                ISentence s2,
                                int b2,
                                int e2)
Method Detail

gamma

public Pair<Float,EditOperation> gamma(Pair<Integer,Integer> pair)
Description copied from interface: EditOperation
return the gamma value of the operation (the pair of ints are indices in the sentences and 1 is the first word in the sentence)

Specified by:
gamma in interface EditOperation

previousCoordinates

public Pair<Integer,Integer> previousCoordinates(Pair<Integer,Integer> p)
Description copied from interface: EditOperation
return the previous coordinates (when the operation was applied)

Specified by:
previousCoordinates in interface EditOperation

nextCoordinates

public Pair<Integer,Integer> nextCoordinates(Pair<Integer,Integer> p)
Description copied from interface: EditOperation
return the next coordinates (when the operation is applied)

Specified by:
nextCoordinates in interface EditOperation

match

boolean match(Pair<Integer,Integer> p)

ABL4J (Alignment Based Learning for Java) - 0.9.7

© 2007 Stephan Schwiebert