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

List of all members.

Public Member Functions

 MemoryBasedTrie ()
Trie match (int wordID)
boolean hasExtensions ()
HashMap< Integer, MemoryBasedTriegetChildren ()
void setExtensions (HashMap< Integer, MemoryBasedTrie > tbl_children_)
boolean hasRules ()
void setRuleBin (MemoryBasedRuleBin rb)
RuleCollection getRuleCollection ()
Collection< MemoryBasedTriegetExtensions ()
Iterator< Integer > getTerminalExtensionIterator ()
Iterator< Integer > getNonterminalExtensionIterator ()

Package Attributes

MemoryBasedRuleBin ruleBin = null
HashMap< Integer, MemoryBasedTriechildrenTbl = null

Detailed Description


Constructor & Destructor Documentation


Member Function Documentation

If the trie node has extensions, get a list of their labels.

Returns:

Implements joshua.decoder.ff.tm.Trie.

If the trie node has extensions, then return a list of extended trie nodes, otherwise return null.

Returns:
A list of extended Trie nodes if this node has extensions, null otherwise

Implements joshua.decoder.ff.tm.Trie.

Returns an iterator over the trie node's extensions with nonterminal labels.

Returns:

Implements joshua.decoder.ff.tm.Trie.

Retrieve the rules at the current node/state. The implementation of this method must adhere to the following laws:

  1. The return value is always non-null. The collection may be empty however.
  2. The collection must be empty if hasRules() is false, and must be non-empty if hasRules() is true.
  3. The collection must be sorted (at least as used by TMGrammar)

Implements joshua.decoder.ff.tm.Trie.

Returns an iterator over the trie node's extensions with terminal labels.

Returns:

Implements joshua.decoder.ff.tm.Trie.

Returns whether matchOne(Symbol) could succeed for any symbol.

Returns:
true if match(int) could succeed for some symbol, false otherwise

Implements joshua.decoder.ff.tm.Trie.

Here is the caller graph for this function:

Gets whether the current node/state is a "final state" that has matching rules.

Returns:
true if the current node/state is a "final state" that has matching rules, false otherwise

Implements joshua.decoder.ff.tm.Trie.

Here is the caller graph for this function:

Traverse one ply further down the trie. If there is no match, the result is null.

Parameters:
wordID
Returns:
Child node of this trie

Implements joshua.decoder.ff.tm.Trie.

Here is the caller graph for this function:


Member Data Documentation