|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| DecoderFactory (List< GrammarFactory > grammarFactories, boolean useMaxLMCostForOOV, List< FeatureFunction > featureFunctions, List< StateComputer > stateComputers) | |
| void | decodeTestSet (String testFile, String nbestFile, String oracleFile) |
| HyperGraph | getHyperGraphForSentence (String sentence) |
Private Attributes | |
| List< GrammarFactory > | grammarFactories = null |
| List< FeatureFunction > | featureFunctions = null |
| List< StateComputer > | stateComputers |
| boolean | useMaxLMCostForOOV = false |
| Thread[] | decoderThreads |
Static Private Attributes | |
| static final Logger | logger = Logger.getLogger(DecoderFactory.class.getName()) |
this class implements: (1) parallel decoding: split the test file, initiate DecoderThread, wait and merge the decoding results (2) non-parallel decoding is a special case of parallel decoding
| joshua.decoder.DecoderFactory.DecoderFactory | ( | List< GrammarFactory > | grammarFactories, |
| boolean | useMaxLMCostForOOV, | ||
| List< FeatureFunction > | featureFunctions, | ||
| List< StateComputer > | stateComputers | ||
| ) |
| void joshua.decoder.DecoderFactory.decodeTestSet | ( | String | testFile, |
| String | nbestFile, | ||
| String | oracleFile | ||
| ) |
This is the public-facing method to decode a set of sentences. This automatically detects whether we should run the decoder in parallel or not.
(Matt Post, August 2011) This needs to be rewritten. The proper way to do it is to put all the sentences in a queue or wrap access to them in a thread-safe class. Then start the decoder threads. Each thread obtains the sentece to decode and deposits it somewhere. Deposits are then accumulated and output sequentially.
| HyperGraph joshua.decoder.DecoderFactory.getHyperGraphForSentence | ( | String | sentence | ) |
Decode a single sentence and return its hypergraph.
Thread [] joshua.decoder.DecoderFactory.decoderThreads [private] |
List<FeatureFunction> joshua.decoder.DecoderFactory.featureFunctions = null [private] |
List<GrammarFactory> joshua.decoder.DecoderFactory.grammarFactories = null [private] |
final Logger joshua.decoder.DecoderFactory.logger = Logger.getLogger(DecoderFactory.class.getName()) [static, private] |
List<StateComputer> joshua.decoder.DecoderFactory.stateComputers [private] |
boolean joshua.decoder.DecoderFactory.useMaxLMCostForOOV = false [private] |