List of all members.
Public Member Functions |
| | JoshuaDecoder (String configFile) |
| void | changeBaselineFeatureWeights (double[] weights) |
| void | changeDiscrminativeModelOnly (String discrminativeModelFile) |
| void | changeFeatureWeightVector (double[] weights, String discrminativeModelFile) |
| void | decodeTestSet (String testFile, String nbestFile, String oracleFile) throws IOException |
| void | decodeTestSet (String testFile, String nbestFile) |
| void | decodeSentence (String testSentence, String[] nbests) |
| void | cleanUp () |
| void | visualizeHyperGraphForSentence (String sentence) |
| JoshuaDecoder | initialize (String configFile) |
Static Public Member Functions |
| static JoshuaDecoder | getUninitalizedDecoder () |
| static void | writeConfigFile (double[] newWeights, String template, String outputFile, String newDiscriminativeModel) |
| static void | main (String[] args) throws IOException |
Private Member Functions |
| | JoshuaDecoder () |
| void | initializeLanguageModel () throws IOException |
| void | initializeGlueGrammar () throws IOException |
| void | initializeMainTranslationGrammar () throws IOException |
| void | initializeStateComputers (int nGramOrder, int ngramStateID) |
| void | initializeFeatureFunctions () |
Private Attributes |
| DecoderFactory | decoderFactory |
| List< GrammarFactory > | grammarFactories |
| ArrayList< FeatureFunction > | featureFunctions |
| ArrayList< NGramLanguageModel > | languageModels |
| List< StateComputer > | stateComputers |
| Map< String, Integer > | ruleStringToIDTable |
Static Private Attributes |
| static final Logger | logger = Logger.getLogger(JoshuaDecoder.class.getName()) |
Detailed Description
Constructor & Destructor Documentation
Constructs a new decoder using the specified configuration file.
- Parameters:
-
| configFile | Name of configuration file. |
Constructs an uninitialized decoder for use in testing.
This method is private because it should only ever be called by the getUninitalizedDecoder() method to provide an uninitialized decoder for use in testing.
Member Function Documentation
Sets the feature weight values used by the decoder.
This method assumes that the order of the provided weights is the same as their order in the decoder's configuration file.
- Parameters:
-
| weights | Feature weight values |
Decode a sentence. This must be non-parallel.
Decode a whole test set. This may be parallel.
- Parameters:
-
| testFile | |
| nbestFile | |
| oracleFile | |
Gets an uninitialized decoder for use in testing.
This method is called by unit tests or any outside packages (e.g., MERT) relying on the decoder.
Initialize all parts of the JoshuaDecoder.
- Parameters:
-
| configFile | File containing configuration options |
- Returns:
- An initialized decoder
Member Data Documentation