module documentation

Undocumented

Class AlignedSent Return an aligned sentence object, which encapsulates two sentences along with an Alignment between them.
Class Alignment A storage class for representing alignment between two sequences, s1, s2. In general, an alignment is a set of tuples of the form (i, j, ...) representing an alignment between the i-th element of s1 and the j-th element of s2...
Class PhraseTable In-memory store of translations for a given phrase, and the log probability of the those translations
Variable PhraseTableEntry Undocumented
Function _check_alignment Check whether the alignments are legal.
Function _giza2pair Undocumented
Function _naacl2pair Undocumented
PhraseTableEntry = (source)

Undocumented

def _check_alignment(num_words, num_mots, alignment): (source)

Check whether the alignments are legal.

Parameters
num_words:intthe number of source language words
num_mots:intthe number of target language words
alignment:Alignmentalignment to be checked
Raises
IndexErrorif alignment falls outside the sentence
def _giza2pair(pair_string): (source)

Undocumented

def _naacl2pair(pair_string): (source)

Undocumented