Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
PhraseChart (PhraseTable[] tables, List< FeatureFunction > features, Sentence source, int num_options) | |
int | SentenceLength () |
int | MaxSourcePhraseLength () |
TargetPhrases | getRange (int begin, int end) |
Package Attributes | |
int | numOptions = 20 |
Private Member Functions | |
int | offset (int i, int j) |
void | addToRange (int begin, int end, RuleCollection to) |
Private Attributes | |
int | sentence_length |
int | max_source_phrase_length |
List< TargetPhrases > | entries |
List< FeatureFunction > | features |
This class represents a bundle of phrase tables that have been read in, reporting some stats about them. Probably could be done away with.
joshua.decoder.phrase.PhraseChart.PhraseChart | ( | PhraseTable[] | tables, |
List< FeatureFunction > | features, | ||
Sentence | source, | ||
int | num_options | ||
) |
Create a new PhraseChart object, which represents all phrases that are applicable against the current input sentence. These phrases are extracted from all available grammars.
tables | |
source |
void joshua.decoder.phrase.PhraseChart.addToRange | ( | int | begin, |
int | end, | ||
RuleCollection | to | ||
) | [private] |
Add a set of phrases from a grammar to the current span.
begin | |
end | |
to |
TargetPhrases joshua.decoder.phrase.PhraseChart.getRange | ( | int | begin, |
int | end | ||
) |
Returns phrases from all grammars that match the span.
begin | |
end |
int joshua.decoder.phrase.PhraseChart.offset | ( | int | i, |
int | j | ||
) | [private] |
Maps two-dimensional span into a one-dimensional array.
i | |
j |
List<TargetPhrases> joshua.decoder.phrase.PhraseChart.entries [private] |
List<FeatureFunction> joshua.decoder.phrase.PhraseChart.features [private] |
int joshua.decoder.phrase.PhraseChart.numOptions = 20 [package] |
int joshua.decoder.phrase.PhraseChart.sentence_length [private] |