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

List of all members.

Public Member Functions

 BilingualRule (int lhs, int[] sourceRhs, int[] targetRhs, float[] featureScores, int arity, int owner, float latticeCost, int ruleID)
 BilingualRule (int lhs, int[] sourceRhs, int[] targetRhs, float[] featureScores, int arity)
final void setEnglish (int[] eng)
final int[] getEnglish ()
String toString (Map< Integer, String > ntVocab)
String toString ()
String toStringWithoutFeatScores ()
boolean equals (Object o)
int hashCode ()

Private Attributes

int[] english
transient String cachedToString = null

Detailed Description

Normally, the feature score in the rule should be cost (i.e., -LogP), so that the feature weight should be positive

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.BilingualRule.BilingualRule ( int  lhs,
int[]  sourceRhs,
int[]  targetRhs,
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.
targetRhsTarget 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

Here is the caller graph for this function:

joshua.decoder.ff.tm.BilingualRule.BilingualRule ( int  lhs,
int[]  sourceRhs,
int[]  targetRhs,
float[]  featureScores,
int  arity 
)

Member Function Documentation

Two BilingualRules are equal of they have the same LHS, the same source RHS and the same target RHS.

Parameters:
othe object to check for equality
Returns:
true if o is the same BilingualRule as this rule, false otherwise

Here is the call graph for this function:

Reimplemented from joshua.decoder.ff.tm.MonolingualRule.

Here is the caller graph for this function:

Here is the call graph for this function:

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

Reimplemented from joshua.decoder.ff.tm.MonolingualRule.

Here is the call graph for this function:

Reimplemented from joshua.decoder.ff.tm.MonolingualRule.

Here is the call graph for this function:

Reimplemented from joshua.decoder.ff.tm.MonolingualRule.

Here is the call graph for this function:


Member Data Documentation

transient String joshua.decoder.ff.tm.BilingualRule.cachedToString = null [private]