|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
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()) |
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.
| 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.
| input | A lattice which represents an input sentence. |
| grammar | A translation grammar. |
| chart | A CKY+ style chart in which completed span entries are stored. |
| 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.
| tnode | |
| i | |
| j | |
| ant_s_items_in | |
| curSuperNode |
| 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.
| 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.
| i | Start index of a dot chart item |
| k | End index of a dot chart item; start index of a completed chart item |
| j | End index of a completed chart item |
| startDotItems |
| DotCell joshua.decoder.chart_parser.DotChart.getDotCell | ( | int | i, |
| int | j | ||
| ) |
| void joshua.decoder.chart_parser.DotChart.seed | ( | ) | [package] |
Constructs a new dot chart from a specified input sentence, a translation grammar, and a parse chart.
| input | An array of integers which represents an input sentence. |
| grammar | A translation grammar. |
| chart | A CKY+ style chart in which completed span entries are stored. add intial dot items: dot-items pointer to the root of the grammar trie. |
| 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)
DotCell [][] joshua.decoder.chart_parser.DotChart.dotcells [private] |
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.
final int joshua.decoder.chart_parser.DotChart.sentLen [private] |
Length of input sentence.