Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.decoder.segment_file.ConstraintRule Interface Reference

List of all members.

Classes

enum  Type

Public Member Functions

Type type ()
String lhs ()
String nativeRhs ()
String foreignRhs ()
float[] features ()

Detailed Description

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.

See also:
Type
Author:
wren ng thornton wren@.nosp@m.user.nosp@m.s.sou.nosp@m.rcef.nosp@m.orge..nosp@m.net
Version:
LastChangedDate:
2009-03-26 15:06:57 -0400 (Thu, 26 Mar 2009)

Member Function Documentation

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.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

Return the type of this ConstraintRule.

Here is the caller graph for this function: