|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Classes | |
| enum | Type |
Public Member Functions | |
| Type | type () |
| String | lhs () |
| String | nativeRhs () |
| String | foreignRhs () |
| float[] | features () |
This interface is for an individual (partial) item to seed the chart with. All rules should be flat (no hierarchical nonterminals).
The Segment, ConstraintSpan, and ConstraintRule interfaces are for defining an interchange format between a SegmentFileParser and the Chart class. These interfaces <emph>should not</emph> be used internally by the Chart. The objects returned by a SegmentFileParser will not be optimal for use during decoding. The Chart should convert each of these objects into its own internal representation during construction. That is the contract described by these interfaces.
| float [] joshua.decoder.segment_file.ConstraintRule.features | ( | ) |
Return the grammar feature values for the RULE. The length of this array must be the same as for the regular grammar. We cannot enforce this requirement, but the joshua.decoder.chart_parser.Chart must throw an error if there is a mismatch.
Return the foreign right hand side of the constraint rule. This must be consistent with the sentence for the associated span, and is provided as a convenience method.
Return the left hand side of the constraint rule. If this is null, then this object is specifying a translation for the span, but that translation may be derived from any nonterminal. The nonterminal here must be one used by the regular grammar.
Return the native right hand side of the constraint rule. If this is null, then the regular grammar will be used to fill in the derivation from the lhs.