public class GaleAndChurch<T> extends Object implements AlignmentScorer<T>
| Constructor and Description |
|---|
GaleAndChurch() |
| Modifier and Type | Method and Description |
|---|---|
int |
contractionScore(T p_sourceTuv1,
T p_sourceTuv2,
T p_targetTuv)
Calculate the cost of contracting two source segments to one target segment.
|
int |
deletionScore(T p_sourceTuv)
Calculate the cost of deletion of source segment.
|
int |
expansionScore(T p_sourceTuv,
T p_targetTuv1,
T p_targetTuv2)
Calculate the cost of expanding one source segment to two target segments.
|
int |
insertionScore(T p_targetTuv)
Calculate the cost of insertion of target segment.
|
int |
match(int len1,
int len2)
Return -100 * log probability that an source sentence of length len1 is a translation of a foreign sentence of
length len2.
|
int |
meldingScore(T p_sourceTuv1,
T p_sourceTuv2,
T p_targetTuv1,
T p_targetTuv2)
Calculate the cost of melding of two source segments to two target segments.
|
double |
prob(int len1,
int len2)
Return the probability that an source sentence of length len1 is a translation of a foreign sentence of
length len2.
|
void |
setLocales(LocaleId p_sourceLocale,
LocaleId p_targetLocale)
Set source and target locales.
|
int |
substitutionScore(T p_sourceTuv,
T p_targetTuv)
Calculate the cost of substitution of source segment by target segment.
|
public void setLocales(LocaleId p_sourceLocale, LocaleId p_targetLocale)
setLocales in interface AlignmentScorer<T>p_sourceLocale - Source localep_targetLocale - Target localepublic int substitutionScore(T p_sourceTuv, T p_targetTuv)
substitutionScore in interface AlignmentScorer<T>p_sourceTuv - Source TUV. Source is in X sequence in the DP map.p_targetTuv - Target TUV. Target is in Y sequence in the DP map.public int deletionScore(T p_sourceTuv)
deletionScore in interface AlignmentScorer<T>p_sourceTuv - Source TUV. Source is in X sequence in the DP map.public int insertionScore(T p_targetTuv)
insertionScore in interface AlignmentScorer<T>p_targetTuv - Target TUV. Target is in Y sequence in the DP map.public int contractionScore(T p_sourceTuv1, T p_sourceTuv2, T p_targetTuv)
contractionScore in interface AlignmentScorer<T>p_sourceTuv1 - Source TUV1. Source is in X sequence in the DP map.p_sourceTuv2 - Source TUV2. Source is in X sequence in the DP map.p_targetTuv - Target TUV. Target is in Y sequence in the DP map.public int expansionScore(T p_sourceTuv, T p_targetTuv1, T p_targetTuv2)
expansionScore in interface AlignmentScorer<T>p_sourceTuv - Source TUV. Source is in X sequence in the DP map.p_targetTuv1 - Target TUV1. Target is in Y sequence in the DP map.p_targetTuv2 - Target TUV2. Target is in Y sequence in the DP map.public int meldingScore(T p_sourceTuv1, T p_sourceTuv2, T p_targetTuv1, T p_targetTuv2)
meldingScore in interface AlignmentScorer<T>p_sourceTuv1 - Source TUV1. Source is in X sequence in the DP map.p_sourceTuv2 - Source TUV2. Source is in X sequence in the DP map.p_targetTuv1 - Target TUV1. Target is in Y sequence in the DP map.p_targetTuv2 - Target TUV2. Target is in Y sequence in the DP map.public int match(int len1,
int len2)
public double prob(int len1,
int len2)
Copyright © 2021. All rights reserved.