X
- the class of the elements in the left input sequence.Y
- the class of the elements in the right input sequence.N
- the enum listing the nonterminal symbols for the input grammar.public class SoftADPPathModel<X,Y,N extends Enum<N>> extends Object implements DerivableAlignmentDistance<X,Y>
Constructor and Description |
---|
SoftADPPathModel(Comparator<X,Y> comparator,
Grammar<N> grammar,
double beta,
double approxThreshold,
double distance,
EnumMap<N,double[][]> dpTables,
EnumMap<OperationType,double[][]> repMatrices,
EnumMap<OperationType,double[]> delVectors,
EnumMap<OperationType,double[]> insVectors,
List<X> left,
List<Y> right) |
Modifier and Type | Method and Description |
---|---|
double[] |
computeGradient(DerivableComparator<X,Y> comp)
This computes the gradient of this DerivableAlignmentDistance w.r.t.
|
double |
getDistance()
Returns the distance between the two input sequences.
|
List<X> |
getLeft()
Returns the left sequence of this distance.
|
List<Y> |
getRight()
Returns the right sequence of this distance.
|
public SoftADPPathModel(@NonNull Comparator<X,Y> comparator, @NonNull Grammar<N> grammar, double beta, double approxThreshold, double distance, @NonNull EnumMap<N,double[][]> dpTables, @NonNull EnumMap<OperationType,double[][]> repMatrices, @NonNull EnumMap<OperationType,double[]> delVectors, @NonNull EnumMap<OperationType,double[]> insVectors, @NonNull List<X> left, @NonNull List<Y> right)
public List<X> getLeft()
DerivableAlignmentDistance
getLeft
in interface DerivableAlignmentDistance<X,Y>
public List<Y> getRight()
DerivableAlignmentDistance
getRight
in interface DerivableAlignmentDistance<X,Y>
public double getDistance()
DerivableAlignmentDistance
getDistance
in interface DerivableAlignmentDistance<X,Y>
public double[] computeGradient(@NonNull DerivableComparator<X,Y> comp)
DerivableAlignmentDistance
computeGradient
in interface DerivableAlignmentDistance<X,Y>
comp
- the DerivableComparator that was used in computing this distance.Copyright (C) 2016-2018 Benjamin Paaßen, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/