|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| ArpaFile (String arpaFileName) throws IOException | |
| int | size () |
| int | getOrder () throws FileNotFoundException |
| Iterator< ArpaNgram > | iterator () |
Static Public Attributes | |
| static final Regex | BLANK_LINE = new Regex("^\\s*$") |
| static final Regex | NGRAM_HEADER = new Regex("^\\\\\\d-grams:\\s*$") |
| static final Regex | NGRAM_END = new Regex("^\\\\end\\\\s*$") |
Private Attributes | |
| final File | arpaFile |
Static Private Attributes | |
| static final Logger | logger = Logger.getLogger(ArpaFile.class.getName()) |
Utility class for reading ARPA language model files.
| joshua.decoder.ff.lm.ArpaFile.ArpaFile | ( | String | arpaFileName | ) | throws IOException |
Constructs an object that represents an ARPA language model file.
| arpaFileName | File name of an ARPA language model file |
| vocab | Symbol table to be used by this object |
| int joshua.decoder.ff.lm.ArpaFile.getOrder | ( | ) | throws FileNotFoundException |
| Iterator<ArpaNgram> joshua.decoder.ff.lm.ArpaFile.iterator | ( | ) |
Gets an iterator capable of iterating over all n-grams in the ARPA file.
Gets the total number of n-grams in this ARPA language model file.
final File joshua.decoder.ff.lm.ArpaFile.arpaFile [private] |
ARPA file for this object.
final Regex joshua.decoder.ff.lm.ArpaFile.BLANK_LINE = new Regex("^\\s*$") [static] |
Regular expression representing a blank line.
final Logger joshua.decoder.ff.lm.ArpaFile.logger = Logger.getLogger(ArpaFile.class.getName()) [static, private] |
Logger for this class.
final Regex joshua.decoder.ff.lm.ArpaFile.NGRAM_END = new Regex("^\\\\end\\\\s*$") [static] |
Regular expression representing a line ending an ARPA language model file.
final Regex joshua.decoder.ff.lm.ArpaFile.NGRAM_HEADER = new Regex("^\\\\\\d-grams:\\s*$") [static] |
Regular expression representing a line starting a new section of n-grams in an ARPA language model file.