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

List of all members.

Public Member Functions

 ArraySyntaxTree ()
 ArraySyntaxTree (String parsed_line)
Collection< Integer > getConstituentLabels (int from, int to)
int getOneConstituent (int from, int to)
int getOneSingleConcatenation (int from, int to)
int getOneDoubleConcatenation (int from, int to)
int getOneRightSideCCG (int from, int to)
int getOneLeftSideCCG (int from, int to)
Collection< Integer > getConcatenatedLabels (int from, int to)
Collection< Integer > getCcgLabels (int from, int to)
int[] getTerminals ()
int[] getTerminals (int from, int to)
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
void writeExternal (ObjectOutput out) throws IOException
void readExternalText (String file_name) throws IOException
void writeExternalText (String file_name) throws IOException
String toString ()

Private Member Functions

void initialize ()
void appendFromPennFormat (String line)
String adjustMarkup (String nt)

Private Attributes

ArrayList< Integer > forwardIndex
ArrayList< Integer > forwardLattice
ArrayList< Integer > backwardIndex
ArrayList< Integer > backwardLattice
ArrayList< Integer > terminals
boolean useBackwardLattice = true

Static Private Attributes

static final int MAX_CONCATENATIONS = 3
static final int MAX_CCG_SPAN = 5
static final int MAX_LABELS = 100

Constructor & Destructor Documentation

Here is the call graph for this function:


Member Function Documentation

String joshua.corpus.syntax.ArraySyntaxTree.adjustMarkup ( String  nt) [private]

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Collection<Integer> joshua.corpus.syntax.ArraySyntaxTree.getCcgLabels ( int  from,
int  to 
)

Implements joshua.corpus.syntax.SyntaxTree.

Here is the call graph for this function:

Collection<Integer> joshua.corpus.syntax.ArraySyntaxTree.getConcatenatedLabels ( int  from,
int  to 
)

Returns a collection of concatenated non-terminal labels that exactly cover the specified span in the lattice. The number of non-terminals concatenated is limited by MAX_CONCATENATIONS and the total number of labels returned is bounded by MAX_LABELS.

Implements joshua.corpus.syntax.SyntaxTree.

Here is the call graph for this function:

Collection<Integer> joshua.corpus.syntax.ArraySyntaxTree.getConstituentLabels ( int  from,
int  to 
)

Returns a collection of single-non-terminal labels that exactly cover the specified span in the lattice.

Implements joshua.corpus.syntax.SyntaxTree.

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Implements joshua.corpus.syntax.SyntaxTree.

Here is the caller graph for this function:

Here is the caller graph for this function:

void joshua.corpus.syntax.ArraySyntaxTree.readExternal ( ObjectInput  in) throws IOException, ClassNotFoundException
void joshua.corpus.syntax.ArraySyntaxTree.readExternalText ( String  file_name) throws IOException

Reads Penn Treebank format file

Here is the call graph for this function:

Here is the call graph for this function:

void joshua.corpus.syntax.ArraySyntaxTree.writeExternal ( ObjectOutput  out) throws IOException
void joshua.corpus.syntax.ArraySyntaxTree.writeExternalText ( String  file_name) throws IOException

Member Data Documentation

Note that index stores the indices of lattice node positions, i.e. the last element of index is the terminal node, pointing to lattice.size()

final int joshua.corpus.syntax.ArraySyntaxTree.MAX_CCG_SPAN = 5 [static, private]
final int joshua.corpus.syntax.ArraySyntaxTree.MAX_LABELS = 100 [static, private]
ArrayList<Integer> joshua.corpus.syntax.ArraySyntaxTree.terminals [private]