Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.decoder.ff.tm.MonolingualRule Class Reference
Inheritance diagram for joshua.decoder.ff.tm.MonolingualRule:
[legend]
Collaboration diagram for joshua.decoder.ff.tm.MonolingualRule:
[legend]

List of all members.

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())

Detailed Description

this class implements MonolingualRule

Author:
Zhifei Li, zhife.nosp@m.i.wo.nosp@m.rk@gm.nosp@m.ail..nosp@m.com
Version:
$LastChangedDate$

Constructor & Destructor Documentation

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.

Parameters:
lhsLeft-hand side of the rule.
sourceRhsSource language right-hand side of the rule.
featureScoresFeature value scores for the rule.
arityNumber 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_ 
)

Member Function Documentation

Here is the call graph for this function:

Here is the caller graph for this function:

Set a lower-bound estimate inside the rule returns full estimate.

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the call graph for this function:

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

float joshua.decoder.ff.tm.MonolingualRule.incrementFeatureScore ( int  column,
double  score 
)

Implements joshua.decoder.ff.tm.Rule.

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.decoder.ff.tm.MonolingualRule.setFeatureCost ( int  column,
float  cost 
)
Parameters:
columnstart from zero

Implements joshua.decoder.ff.tm.Rule.

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Here is the caller graph for this function:

String joshua.decoder.ff.tm.MonolingualRule.toString ( Map< Integer, String >  ntVocab)

Implements joshua.decoder.ff.tm.Rule.

Reimplemented in joshua.decoder.ff.tm.BilingualRule.

Here is the call graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Reimplemented in joshua.decoder.ff.tm.BilingualRule.

Here is the call graph for this function:

Here is the caller graph for this function:

Implements joshua.decoder.ff.tm.Rule.

Reimplemented in joshua.decoder.ff.tm.BilingualRule.

Here is the call graph for this function:


Member Data Documentation

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

final Logger joshua.decoder.ff.tm.MonolingualRule.logger = Logger.getLogger(MonolingualRule.class.getName()) [static, private]