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

List of all members.

Classes

class  DotCell
class  DotNode

Public Member Functions

DotCell getDotCell (int i, int j)
 DotChart (Lattice< Integer > input, Grammar grammar, Chart chart)

Package Functions

void seed ()
void expandDotCell (int i, int j)
void startDotItems (int i, int j)

Private Member Functions

void extendDotItemsWithProvedItems (int i, int k, int j, boolean startDotItems)
void addDotItem (Trie tnode, int i, int j, List< SuperNode > antSuperNodesIn, SuperNode curSuperNode, SourcePath srcPath)

Private Attributes

DotCell[][] dotcells
Chart dotChart
Grammar pGrammar
final int sentLen
final Lattice< Integer > input

Static Private Attributes

static final Logger logger = Logger.getLogger(DotChart.class.getName())

Detailed Description

The DotChart handles the building of the -LM forest. The set of (Dot)Items over a span represent the rules that have been completely applied through the implicit binarization. These DotItems are available to be incorporated into the main chart after the LM score has been applied (assuming they pass pruning).

DotItem represent (possibly partial) application of synchronous rules that have been implicitly binarized. As spans are considered, the next symbol in the rule's source right-hand side is matched against proved items (items in the +LM chart, Chart.java) or input symbols. Once the rule is complete, it is entered into the DotChart.

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

Constructor & Destructor Documentation

joshua.decoder.chart_parser.DotChart.DotChart ( Lattice< Integer >  input,
Grammar  grammar,
Chart  chart 
)

Constructs a new dot chart from a specified input lattice, a translation grammar, and a parse chart.

Parameters:
inputA lattice which represents an input sentence.
grammarA translation grammar.
chartA CKY+ style chart in which completed span entries are stored.

Here is the call graph for this function:


Member Function Documentation

void joshua.decoder.chart_parser.DotChart.addDotItem ( Trie  tnode,
int  i,
int  j,
List< SuperNode antSuperNodesIn,
SuperNode  curSuperNode,
SourcePath  srcPath 
) [private]

Creates a dot item and adds it into the cell(i,j) of this dot chart.

Parameters:
tnode
i
j
ant_s_items_in
curSuperNode

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.decoder.chart_parser.DotChart.expandDotCell ( int  i,
int  j 
) [package]

two kinds of symbols in the foreign side: (1) non-terminal (e.g., X or NP); (2) CN-side terminal therefore, two ways to extend the dot postion.

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.decoder.chart_parser.DotChart.extendDotItemsWithProvedItems ( int  i,
int  k,
int  j,
boolean  startDotItems 
) [private]

Attempt to combine an item in the dot chart with an item in the chart to create a new item in the dot chart.

In other words, this method looks for (proved) theorems or axioms in the completed chart that may apply and extend the dot position.

Parameters:
iStart index of a dot chart item
kEnd index of a dot chart item; start index of a completed chart item
jEnd index of a completed chart item
startDotItems

Here is the call graph for this function:

Here is the caller graph for this function:

DotCell joshua.decoder.chart_parser.DotChart.getDotCell ( int  i,
int  j 
)

Here is the caller graph for this function:

Constructs a new dot chart from a specified input sentence, a translation grammar, and a parse chart.

Parameters:
inputAn array of integers which represents an input sentence.
grammarA translation grammar.
chartA CKY+ style chart in which completed span entries are stored. add intial dot items: dot-items pointer to the root of the grammar trie.

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.decoder.chart_parser.DotChart.startDotItems ( int  i,
int  j 
) [package]

note: (i,j) is a non-terminal, this cannot be a cn-side terminal, which have been handled in case2 of dotchart.expand_cell add dotitems that start with the complete super-items in cell(i,j)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Two-dimensional chart of cells. Some cells might be null. This could definitely be represented more efficiently, especially since access is already mitigated through an accessor function.

CKY+ style parse chart in which completed span entries are stored.

final Lattice<Integer> joshua.decoder.chart_parser.DotChart.input [private]

Represents the input sentence being translated.

final Logger joshua.decoder.chart_parser.DotChart.logger = Logger.getLogger(DotChart.class.getName()) [static, private]

Translation grammar which contains the translation rules.

Length of input sentence.