Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.util.CompareGrammars Class Reference
Collaboration diagram for joshua.util.CompareGrammars:
[legend]

List of all members.

Static Public Member Functions

static Set< String > getFields (File grammarFile, String fieldDelimiter, int fieldNumber) throws FileNotFoundException
static void compareValues (File grammarFile1, File grammarFile2, String fieldDelimiter, int fieldNumber, String scoresDelimiter, int scoresFieldNumber, float delta) throws FileNotFoundException
static void main (String[] args) throws FileNotFoundException

Static Private Attributes

static final Logger logger = Logger.getLogger(CompareGrammars.class.getName())

Detailed Description

This class allows two grammars (loaded from disk) to be compared.

Author:
Lane Schwartz

Member Function Documentation

static void joshua.util.CompareGrammars.compareValues ( File  grammarFile1,
File  grammarFile2,
String  fieldDelimiter,
int  fieldNumber,
String  scoresDelimiter,
int  scoresFieldNumber,
float  delta 
) throws FileNotFoundException [static]

Here is the caller graph for this function:

static Set<String> joshua.util.CompareGrammars.getFields ( File  grammarFile,
String  fieldDelimiter,
int  fieldNumber 
) throws FileNotFoundException [static]

Gets a set containing all unique instances of the specified field.

Parameters:
grammarFileFile containing a grammar.
fieldDelimiterRegular expression to split each line
fieldNumberField from each rule to extract
Returns:
set containing all unique instances of the specified field
Exceptions:
FileNotFoundException

Here is the caller graph for this function:

static void joshua.util.CompareGrammars.main ( String[]  args) throws FileNotFoundException [static]

Main method.

Parameters:
argsnames of the two grammars to be compared
Exceptions:
FileNotFoundException

Here is the call graph for this function:


Member Data Documentation

final Logger joshua.util.CompareGrammars.logger = Logger.getLogger(CompareGrammars.class.getName()) [static, private]

Logger for this class.