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

List of all members.

Classes

class  PhrasePair

Public Member Functions

 SimilarityAnnotator (String grammar_file, String alignment_file) throws IOException

Static Public Member Functions

static void usage ()
static void main (String[] args) throws Exception

Static Public Attributes

static boolean labeled = false
static boolean sparse = false

Private Member Functions

void initialize (String connection_string) throws NumberFormatException, UnknownHostException, IOException
void annotate () throws IOException
List< PhrasePairgeneratePhrasePairs (String[] src, String[] tgt, ArrayList< Integer >[] src_alignment, ArrayList< Integer >[] tgt_alignment)
int expandMin (int index, ArrayList< Integer > aligned)
int expandMax (int index, ArrayList< Integer > aligned)
double getSimilarity (PhrasePair phrase_pair) throws IOException
void cleanup () throws IOException

Private Attributes

LineReader grammarReader
LineReader alignmentReader
Socket socket
PrintWriter out
BufferedReader in
String glue = null

Static Private Attributes

static Logger logger = Logger.getLogger(SimilarityAnnotator.class.getName())
static final int MAX_LENGTH = 4

Constructor & Destructor Documentation

joshua.tools.SimilarityAnnotator.SimilarityAnnotator ( String  grammar_file,
String  alignment_file 
) throws IOException

Here is the caller graph for this function:


Member Function Documentation

void joshua.tools.SimilarityAnnotator.annotate ( ) throws IOException [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void joshua.tools.SimilarityAnnotator.cleanup ( ) throws IOException [private]

Here is the call graph for this function:

Here is the caller graph for this function:

int joshua.tools.SimilarityAnnotator.expandMax ( int  index,
ArrayList< Integer >  aligned 
) [private]

Here is the caller graph for this function:

int joshua.tools.SimilarityAnnotator.expandMin ( int  index,
ArrayList< Integer >  aligned 
) [private]

Here is the caller graph for this function:

List<PhrasePair> joshua.tools.SimilarityAnnotator.generatePhrasePairs ( String[]  src,
String[]  tgt,
ArrayList< Integer >[]  src_alignment,
ArrayList< Integer >[]  tgt_alignment 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

double joshua.tools.SimilarityAnnotator.getSimilarity ( PhrasePair  phrase_pair) throws IOException [private]

Here is the caller graph for this function:

void joshua.tools.SimilarityAnnotator.initialize ( String  connection_string) throws NumberFormatException, UnknownHostException, IOException [private]

Here is the caller graph for this function:

static void joshua.tools.SimilarityAnnotator.main ( String[]  args) throws Exception [static]

Here is the call graph for this function:

static void joshua.tools.SimilarityAnnotator.usage ( ) [static]

Here is the caller graph for this function:


Member Data Documentation

String joshua.tools.SimilarityAnnotator.glue = null [private]
BufferedReader joshua.tools.SimilarityAnnotator.in [private]
boolean joshua.tools.SimilarityAnnotator.labeled = false [static]
Logger joshua.tools.SimilarityAnnotator.logger = Logger.getLogger(SimilarityAnnotator.class.getName()) [static, private]
final int joshua.tools.SimilarityAnnotator.MAX_LENGTH = 4 [static, private]
PrintWriter joshua.tools.SimilarityAnnotator.out [private]
boolean joshua.tools.SimilarityAnnotator.sparse = false [static]