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

List of all members.

Public Member Functions

Trie match (int wordID)
boolean hasExtensions ()
Collection<?extends TriegetExtensions ()
boolean hasRules ()
RuleCollection getRuleCollection ()

Detailed Description

An interface for trie-like data structures.

Author:
wren ng thornton wren@.nosp@m.user.nosp@m.s.sou.nosp@m.rcef.nosp@m.orge..nosp@m.net
Zhifei Li, zhife.nosp@m.i.wo.nosp@m.rk@gm.nosp@m.ail..nosp@m.com

Member Function Documentation

Collection<? extends Trie> joshua.decoder.ff.tm.Trie.getExtensions ( )

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

Implemented in joshua.decoder.ff.tm.packed.PackedGrammar.PackedRoot, joshua.decoder.ff.tm.packed.PackedGrammar.PackedTrie, and joshua.decoder.ff.tm.hash_based.MemoryBasedTrie.

Here is the caller graph for this function:

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)

Implemented in joshua.decoder.ff.tm.packed.PackedGrammar.PackedRoot, joshua.decoder.ff.tm.packed.PackedGrammar.PackedTrie, and joshua.decoder.ff.tm.hash_based.MemoryBasedTrie.

Here is the caller graph for this function:

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

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

Implemented in joshua.decoder.ff.tm.packed.PackedGrammar.PackedRoot, joshua.decoder.ff.tm.packed.PackedGrammar.PackedTrie, and joshua.decoder.ff.tm.hash_based.MemoryBasedTrie.

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

Implemented in joshua.decoder.ff.tm.packed.PackedGrammar.PackedRoot, joshua.decoder.ff.tm.packed.PackedGrammar.PackedTrie, and joshua.decoder.ff.tm.hash_based.MemoryBasedTrie.

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

Implemented in joshua.decoder.ff.tm.packed.PackedGrammar.PackedRoot, joshua.decoder.ff.tm.packed.PackedGrammar.PackedTrie, and joshua.decoder.ff.tm.hash_based.MemoryBasedTrie.

Here is the caller graph for this function: