|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Classes | |
| class | AlignmentBuffer |
| class | FeatureBuffer |
| class | PackingBuffer< T > |
| class | PackingFileTuple |
| class | PackingTrie< D extends PackingTrieValue > |
| interface | PackingTrieValue |
| class | SourceValue |
| class | TargetValue |
Public Member Functions | |
| GrammarPacker (String config_filename, String grammar_filename, String alignments_filename) throws IOException | |
| void | pack () throws IOException |
Static Public Member Functions | |
| static void | main (String[] args) throws IOException |
Static Package Functions | |
| [static initializer] | |
Private Member Functions | |
| void | readConfig (String config_filename) throws IOException |
| void | explore (LineReader grammar) |
| void | binarize (LineReader grammar_reader, LineReader alignment_reader, Queue< PackingFileTuple > slices) throws IOException |
| PackingFileTuple | flush (PackingTrie< SourceValue > source_trie, PackingTrie< TargetValue > target_trie, FeatureBuffer feature_buffer, AlignmentBuffer alignment_buffer, int id) throws IOException |
Private Attributes | |
| String | grammar |
| boolean | have_alignments |
| String | alignments |
| QuantizerConfiguration | quantization |
Static Private Attributes | |
| static final Logger | logger = Logger.getLogger(GrammarPacker.class.getName()) |
| static int | SLICE_SIZE |
| static int | DATA_SIZE_LIMIT |
| static int | DATA_SIZE_ESTIMATE |
| static String | WORKING_DIRECTORY |
| joshua.tools.GrammarPacker.GrammarPacker | ( | String | config_filename, |
| String | grammar_filename, | ||
| String | alignments_filename | ||
| ) | throws IOException |
| joshua.tools.GrammarPacker.[static initializer] | ( | ) | [static, package] |
| void joshua.tools.GrammarPacker.binarize | ( | LineReader | grammar_reader, |
| LineReader | alignment_reader, | ||
| Queue< PackingFileTuple > | slices | ||
| ) | throws IOException [private] |
| void joshua.tools.GrammarPacker.explore | ( | LineReader | grammar | ) | [private] |
| PackingFileTuple joshua.tools.GrammarPacker.flush | ( | PackingTrie< SourceValue > | source_trie, |
| PackingTrie< TargetValue > | target_trie, | ||
| FeatureBuffer | feature_buffer, | ||
| AlignmentBuffer | alignment_buffer, | ||
| int | id | ||
| ) | throws IOException [private] |
Serializes the source, target and feature data structures into interlinked binary files. Target is written first, into a skeletal (node don't carry any data) upward-pointing trie, updating the linking source trie nodes with the position once it is known. Source and feature data are written simultaneously. The source structure is written into a downward-pointing trie and stores the rule's lhs as well as links to the target and feature stream. The feature stream is prompted to write out a block
| source_trie | |
| target_trie | |
| feature_buffer | |
| id |
| IOException |
| static void joshua.tools.GrammarPacker.main | ( | String[] | args | ) | throws IOException [static] |
| void joshua.tools.GrammarPacker.pack | ( | ) | throws IOException |
Executes the packing.
| IOException |
| void joshua.tools.GrammarPacker.readConfig | ( | String | config_filename | ) | throws IOException [private] |
String joshua.tools.GrammarPacker.alignments [private] |
int joshua.tools.GrammarPacker.DATA_SIZE_ESTIMATE [static, private] |
int joshua.tools.GrammarPacker.DATA_SIZE_LIMIT [static, private] |
String joshua.tools.GrammarPacker.grammar [private] |
boolean joshua.tools.GrammarPacker.have_alignments [private] |
final Logger joshua.tools.GrammarPacker.logger = Logger.getLogger(GrammarPacker.class.getName()) [static, private] |
int joshua.tools.GrammarPacker.SLICE_SIZE [static, private] |
String joshua.tools.GrammarPacker.WORKING_DIRECTORY [static, private] |