|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| MonolingualRule (int lhs, int[] sourceRhs, float[] featureScores, int arity, int owner, float latticeCost, int ruleID) | |
| MonolingualRule (int lhs_, int[] source_rhs, float[] feature_scores, int arity_) | |
| final void | setRuleID (int id) |
| final int | getRuleID () |
| final void | setArity (int arity) |
| final int | getArity () |
| final void | setOwner (int owner) |
| final int | getOwner () |
| final void | setLHS (int lhs) |
| final int | getLHS () |
| void | setEnglish (int[] eng) |
| int[] | getEnglish () |
| final void | setFrench (int[] french) |
| final int[] | getFrench () |
| final void | setFeatureScores (float[] scores) |
| final float[] | getFeatureScores () |
| final void | setLatticeCost (float cost) |
| final float | getLatticeCost () |
| final float | getEstCost () |
| final void | setEstCost (float cost) |
| final float | estimateRuleCost (List< FeatureFunction > featureFunctions) |
| float | incrementFeatureScore (int column, double score) |
| void | setFeatureCost (int column, float score) |
| float | getFeatureCost (int column) |
| String | toString (Map< Integer, String > ntVocab) |
| String | toString () |
| String | toStringWithoutFeatScores () |
| String | convertToString (int[] words) |
Static Public Attributes | |
| static final int | DUMMY_RULE_ID = 1 |
| static final int | DUMMY_OWNER = 1 |
Private Attributes | |
| int | ruleID |
| int | lhs |
| int[] | pFrench |
| int | arity |
| float[] | featScores |
| int | owner |
| float | latticeCost |
| float | est_cost = 0 |
| transient String | cachedToString = null |
Static Private Attributes | |
| static final Logger | logger = Logger.getLogger(MonolingualRule.class.getName()) |
this class implements MonolingualRule
| joshua.decoder.ff.tm.MonolingualRule.MonolingualRule | ( | int | lhs, |
| int[] | sourceRhs, | ||
| float[] | featureScores, | ||
| int | arity, | ||
| int | owner, | ||
| float | latticeCost, | ||
| int | ruleID | ||
| ) |
Constructs a new rule using the provided parameters. The owner and rule id for this rule are undefined.
| lhs | Left-hand side of the rule. |
| sourceRhs | Source language right-hand side of the rule. |
| featureScores | Feature value scores for the rule. |
| arity | Number of nonterminals in the source language right-hand side. |
| owner | |
| latticeCost | |
| ruleID |
| joshua.decoder.ff.tm.MonolingualRule.MonolingualRule | ( | int | lhs_, |
| int[] | source_rhs, | ||
| float[] | feature_scores, | ||
| int | arity_ | ||
| ) |
| String joshua.decoder.ff.tm.MonolingualRule.convertToString | ( | int[] | words | ) |
| final float joshua.decoder.ff.tm.MonolingualRule.estimateRuleCost | ( | List< FeatureFunction > | featureFunctions | ) |
Set a lower-bound estimate inside the rule returns full estimate.
Implements joshua.decoder.ff.tm.Rule.
| final int joshua.decoder.ff.tm.MonolingualRule.getArity | ( | ) |
Implements joshua.decoder.ff.tm.Rule.
Reimplemented in joshua.decoder.ff.tm.BilingualRule.
| final float joshua.decoder.ff.tm.MonolingualRule.getEstCost | ( | ) |
Implements joshua.decoder.ff.tm.Rule.
| float joshua.decoder.ff.tm.MonolingualRule.getFeatureCost | ( | int | column | ) |
Implements joshua.decoder.ff.tm.Rule.
| final float [] joshua.decoder.ff.tm.MonolingualRule.getFeatureScores | ( | ) |
| final int [] joshua.decoder.ff.tm.MonolingualRule.getFrench | ( | ) |
| final float joshua.decoder.ff.tm.MonolingualRule.getLatticeCost | ( | ) |
Implements joshua.decoder.ff.tm.Rule.
| final int joshua.decoder.ff.tm.MonolingualRule.getLHS | ( | ) |
| final int joshua.decoder.ff.tm.MonolingualRule.getOwner | ( | ) |
| final int joshua.decoder.ff.tm.MonolingualRule.getRuleID | ( | ) |
| float joshua.decoder.ff.tm.MonolingualRule.incrementFeatureScore | ( | int | column, |
| double | score | ||
| ) |
Implements joshua.decoder.ff.tm.Rule.
| final void joshua.decoder.ff.tm.MonolingualRule.setArity | ( | int | arity | ) |
Implements joshua.decoder.ff.tm.Rule.
| void joshua.decoder.ff.tm.MonolingualRule.setEnglish | ( | int[] | eng | ) |
Implements joshua.decoder.ff.tm.Rule.
Reimplemented in joshua.decoder.ff.tm.BilingualRule.
| final void joshua.decoder.ff.tm.MonolingualRule.setEstCost | ( | float | cost | ) |
Implements joshua.decoder.ff.tm.Rule.
| void joshua.decoder.ff.tm.MonolingualRule.setFeatureCost | ( | int | column, |
| float | cost | ||
| ) |
| column | start from zero |
Implements joshua.decoder.ff.tm.Rule.
| final void joshua.decoder.ff.tm.MonolingualRule.setFeatureScores | ( | float[] | scores | ) |
Implements joshua.decoder.ff.tm.Rule.
| final void joshua.decoder.ff.tm.MonolingualRule.setFrench | ( | int[] | french | ) |
Implements joshua.decoder.ff.tm.Rule.
| final void joshua.decoder.ff.tm.MonolingualRule.setLatticeCost | ( | float | cost | ) |
Implements joshua.decoder.ff.tm.Rule.
| final void joshua.decoder.ff.tm.MonolingualRule.setLHS | ( | int | lhs | ) |
Implements joshua.decoder.ff.tm.Rule.
| final void joshua.decoder.ff.tm.MonolingualRule.setOwner | ( | int | owner | ) |
| final void joshua.decoder.ff.tm.MonolingualRule.setRuleID | ( | int | id | ) |
| String joshua.decoder.ff.tm.MonolingualRule.toString | ( | Map< Integer, String > | ntVocab | ) |
Implements joshua.decoder.ff.tm.Rule.
Reimplemented in joshua.decoder.ff.tm.BilingualRule.
Implements joshua.decoder.ff.tm.Rule.
Reimplemented in joshua.decoder.ff.tm.BilingualRule.
Implements joshua.decoder.ff.tm.Rule.
Reimplemented in joshua.decoder.ff.tm.BilingualRule.
int joshua.decoder.ff.tm.MonolingualRule.arity [private] |
transient String joshua.decoder.ff.tm.MonolingualRule.cachedToString = null [private] |
Reimplemented in joshua.decoder.ff.tm.BilingualRule.
final int joshua.decoder.ff.tm.MonolingualRule.DUMMY_OWNER = 1 [static] |
final int joshua.decoder.ff.tm.MonolingualRule.DUMMY_RULE_ID = 1 [static] |
float joshua.decoder.ff.tm.MonolingualRule.est_cost = 0 [private] |
estimate_cost depends on rule itself: statelesscost + transition_cost(non-stateless/non-contexual* models), we need this variable in order to provide sorting for cube-pruning
float [] joshua.decoder.ff.tm.MonolingualRule.featScores [private] |
float joshua.decoder.ff.tm.MonolingualRule.latticeCost [private] |
int joshua.decoder.ff.tm.MonolingualRule.lhs [private] |
final Logger joshua.decoder.ff.tm.MonolingualRule.logger = Logger.getLogger(MonolingualRule.class.getName()) [static, private] |
int joshua.decoder.ff.tm.MonolingualRule.owner [private] |
int [] joshua.decoder.ff.tm.MonolingualRule.pFrench [private] |
int joshua.decoder.ff.tm.MonolingualRule.ruleID [private] |