|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Static Public Member Functions | |
| static double | computeSentenceBleu (String[] refSents, String hypSent) |
| static double | computeSentenceBleu (String[] refSents, String hypSent, boolean doNgramClip, int bleuOrder, boolean useShortestRef) |
| static double | computeEffectiveLen (int[] refLens, boolean useShortestRef) |
| static HashMap< String, Integer > | constructMaxRefCountTable (String[] refSents, int bleuOrder) |
| static HashMap< String, Integer > | computeMaxRefCountTbl (List< HashMap< String, Integer >> listRefNgramTbl) |
| static double | computeSentenceBleu (double effectiveRefLen, HashMap< String, Integer > maxRefCountTbl, int hypLen, HashMap< String, Integer > hypNgramTbl, boolean doNgramClip, int bleuOrder) |
| static double | computeSentenceBleu (String refSent, String hypSent, boolean doNgramClip, int bleuOrder) |
| static double | computeSentenceBleu (int refLen, HashMap< String, Integer > refNgramTbl, int hypLen, HashMap< String, Integer > hypNgramTbl, boolean doNgramClip, int bleuOrder) |
| static double | computeBleu (int hypLen, double refLen, int[] numNgramMatch, int bleuOrder) |
| static HashMap< String, Integer > | constructNgramTable (String sentence, int bleuOrder) |
| static double | computeLinearCorpusGain (double[] linearCorpusGainThetas, String[] refSents, String hypSent) |
| static double | computeLinearCorpusGain (double[] linearCorpusGainThetas, int hypLength, Map< String, Integer > hypNgramTable, Map< String, Integer > referenceNgramTable) |
| static int[] | computeNgramMatches (String[] refSents, String hypSent) |
| static int[] | computeNgramMatches (int hypLength, Map< String, Integer > hypNgramTable, Map< String, Integer > referenceNgramTable, int highestOrder) |
| static double[] | computeLinearCorpusThetas (int numUnigramTokens, double unigramPrecision, double decayRatio) |
this class implements: (1) sentence-level bleu, with smoothing
| static double joshua.decoder.BLEU.computeBleu | ( | int | hypLen, |
| double | refLen, | ||
| int[] | numNgramMatch, | ||
| int | bleuOrder | ||
| ) | [static] |
| static double joshua.decoder.BLEU.computeEffectiveLen | ( | int[] | refLens, |
| boolean | useShortestRef | ||
| ) | [static] |
| static double joshua.decoder.BLEU.computeLinearCorpusGain | ( | double[] | linearCorpusGainThetas, |
| String[] | refSents, | ||
| String | hypSent | ||
| ) | [static] |
| static double joshua.decoder.BLEU.computeLinearCorpusGain | ( | double[] | linearCorpusGainThetas, |
| int | hypLength, | ||
| Map< String, Integer > | hypNgramTable, | ||
| Map< String, Integer > | referenceNgramTable | ||
| ) | [static] |
speed consideration: assume hypNgramTable has a smaller size than referenceNgramTable does
| static double [] joshua.decoder.BLEU.computeLinearCorpusThetas | ( | int | numUnigramTokens, |
| double | unigramPrecision, | ||
| double | decayRatio | ||
| ) | [static] |
| static HashMap<String, Integer> joshua.decoder.BLEU.computeMaxRefCountTbl | ( | List< HashMap< String, Integer >> | listRefNgramTbl | ) | [static] |
compute max_ref_count for each ngram in the reference sentences
| static int [] joshua.decoder.BLEU.computeNgramMatches | ( | String[] | refSents, |
| String | hypSent | ||
| ) | [static] |
| static int [] joshua.decoder.BLEU.computeNgramMatches | ( | int | hypLength, |
| Map< String, Integer > | hypNgramTable, | ||
| Map< String, Integer > | referenceNgramTable, | ||
| int | highestOrder | ||
| ) | [static] |
| static double joshua.decoder.BLEU.computeSentenceBleu | ( | String[] | refSents, |
| String | hypSent | ||
| ) | [static] |
| static double joshua.decoder.BLEU.computeSentenceBleu | ( | String[] | refSents, |
| String | hypSent, | ||
| boolean | doNgramClip, | ||
| int | bleuOrder, | ||
| boolean | useShortestRef | ||
| ) | [static] |
| refSents | |
| hypSent | |
| doNgramClip | Should usually be true |
| bleuOrder | Should usually be 4 |
| useShortestRef | Probably use false |
| static double joshua.decoder.BLEU.computeSentenceBleu | ( | double | effectiveRefLen, |
| HashMap< String, Integer > | maxRefCountTbl, | ||
| int | hypLen, | ||
| HashMap< String, Integer > | hypNgramTbl, | ||
| boolean | doNgramClip, | ||
| int | bleuOrder | ||
| ) | [static] |
| static double joshua.decoder.BLEU.computeSentenceBleu | ( | String | refSent, |
| String | hypSent, | ||
| boolean | doNgramClip, | ||
| int | bleuOrder | ||
| ) | [static] |
| static double joshua.decoder.BLEU.computeSentenceBleu | ( | int | refLen, |
| HashMap< String, Integer > | refNgramTbl, | ||
| int | hypLen, | ||
| HashMap< String, Integer > | hypNgramTbl, | ||
| boolean | doNgramClip, | ||
| int | bleuOrder | ||
| ) | [static] |
| static HashMap<String, Integer> joshua.decoder.BLEU.constructMaxRefCountTable | ( | String[] | refSents, |
| int | bleuOrder | ||
| ) | [static] |
words in the ngrams are using integer symbol ID
| static HashMap<String, Integer> joshua.decoder.BLEU.constructNgramTable | ( | String | sentence, |
| int | bleuOrder | ||
| ) | [static] |