|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| void | setRuleID (int id) |
| int | getRuleID () |
| void | setArity (int arity) |
| int | getArity () |
| void | setOwner (int ow) |
| int | getOwner () |
| void | setLHS (int lhs) |
| int | getLHS () |
| void | setEnglish (int[] eng) |
| int[] | getEnglish () |
| void | setFrench (int[] french) |
| int[] | getFrench () |
| void | setFeatureScores (float[] scores) |
| float[] | getFeatureScores () |
| void | setFeatureCost (int column, float cost) |
| float | getFeatureCost (int column) |
| float | incrementFeatureScore (int column, double score) |
| void | setLatticeCost (float cost) |
| float | getLatticeCost () |
| void | setEstCost (float cost) |
| float | getEstCost () |
| float | estimateRuleCost (List< FeatureFunction > featureFunctions) |
| String | toString (Map< Integer, String > ntVocab) |
| String | toString () |
| String | toStringWithoutFeatScores () |
Public Attributes | |
| Comparator< Rule > | NegtiveCostComparator |
This class define the interface for Rule. Normally, the feature score in the rule should be cost (i.e., -LogP), so that the feature weight should be positive.
| float joshua.decoder.ff.tm.Rule.estimateRuleCost | ( | List< FeatureFunction > | featureFunctions | ) |
Set a lower-bound estimate inside the rule returns full estimate.
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| int [] joshua.decoder.ff.tm.Rule.getEnglish | ( | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule, and joshua.decoder.ff.tm.BilingualRule.
| float joshua.decoder.ff.tm.Rule.getEstCost | ( | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| float joshua.decoder.ff.tm.Rule.getFeatureCost | ( | int | column | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| float [] joshua.decoder.ff.tm.Rule.getFeatureScores | ( | ) |
| int [] joshua.decoder.ff.tm.Rule.getFrench | ( | ) |
| float joshua.decoder.ff.tm.Rule.getLatticeCost | ( | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| int joshua.decoder.ff.tm.Rule.getLHS | ( | ) |
| float joshua.decoder.ff.tm.Rule.incrementFeatureScore | ( | int | column, |
| double | score | ||
| ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| void joshua.decoder.ff.tm.Rule.setArity | ( | int | arity | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| void joshua.decoder.ff.tm.Rule.setEnglish | ( | int[] | eng | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule, and joshua.decoder.ff.tm.BilingualRule.
| void joshua.decoder.ff.tm.Rule.setEstCost | ( | float | cost | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| void joshua.decoder.ff.tm.Rule.setFeatureCost | ( | int | column, |
| float | cost | ||
| ) |
| column | start from zero |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| void joshua.decoder.ff.tm.Rule.setFeatureScores | ( | float[] | scores | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| void joshua.decoder.ff.tm.Rule.setFrench | ( | int[] | french | ) |
| void joshua.decoder.ff.tm.Rule.setLatticeCost | ( | float | cost | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| void joshua.decoder.ff.tm.Rule.setLHS | ( | int | lhs | ) |
| void joshua.decoder.ff.tm.Rule.setOwner | ( | int | ow | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| void joshua.decoder.ff.tm.Rule.setRuleID | ( | int | id | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule.
| String joshua.decoder.ff.tm.Rule.toString | ( | Map< Integer, String > | ntVocab | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule, and joshua.decoder.ff.tm.BilingualRule.
| String joshua.decoder.ff.tm.Rule.toString | ( | ) |
Implemented in joshua.decoder.ff.tm.MonolingualRule, and joshua.decoder.ff.tm.BilingualRule.
Implemented in joshua.decoder.ff.tm.MonolingualRule, and joshua.decoder.ff.tm.BilingualRule.
| Comparator<Rule> joshua.decoder.ff.tm.Rule.NegtiveCostComparator |
new Comparator<Rule>() { public int compare(Rule rule1, Rule rule2) { float cost1 = rule1.getEstCost(); float cost2 = rule2.getEstCost(); if (cost1 > cost2) { return -1; } else if (cost1 == cost2) { return 0; } else { return 1; } } }
In order to provide sorting for cube-pruning, we need to provide this Comparator.