|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| Lattice (List< Node< Value >> nodes) | |
| Lattice (List< Node< Value >> nodes, boolean isAmbiguous) | |
| Lattice (Value[] linearChain) | |
| final boolean | hasMoreThanOnePath () |
| double | getShortestPath (int from, int to) |
| Node< Value > | getNode (int index) |
| Iterator< Node< Value > > | iterator () |
| int | size () |
| String | toString () |
Static Public Member Functions | |
| static Lattice< Integer > | createIntLattice (int[] linearChain) |
| static Lattice< Integer > | createIntLatticeFromString (String data) |
| static Lattice< String > | createStringLatticeFromString (String data) |
| static void | main (String[] args) |
Private Member Functions | |
| double[][] | calculateAllPairsShortestPath (List< Node< Value >> nodes) |
Private Attributes | |
| final boolean | latticeHasAmbiguity |
| final double[][] | costs |
| final List< Node< Value > > | nodes |
Static Private Attributes | |
| static final Logger | logger = Logger.getLogger(Lattice.class.getName()) |
A lattice representation of a directed graph.
| Label | Type of label associated with an arc. |
| joshua.lattice.Lattice< Value >.Lattice | ( | List< Node< Value >> | nodes | ) |
Constructs a new lattice from an existing list of (connected) nodes.
The list of nodes must already be in topological order. If the list is not in topological order, the behavior of the lattice is not defined.
| nodes | A list of nodes which must be in topological order. |
| joshua.lattice.Lattice< Value >.Lattice | ( | List< Node< Value >> | nodes, |
| boolean | isAmbiguous | ||
| ) |
| joshua.lattice.Lattice< Value >.Lattice | ( | Value[] | linearChain | ) |
| double [][] joshua.lattice.Lattice< Value >.calculateAllPairsShortestPath | ( | List< Node< Value >> | nodes | ) | [private] |
Calculate the all-pairs shortest path for all pairs of nodes.
Note: This method assumes no backward arcs. If there are backward arcs, the returned shortest path costs for that node may not be accurate.
| nodes | A list of nodes which must be in topological order. |
| static Lattice<Integer> joshua.lattice.Lattice< Value >.createIntLattice | ( | int[] | linearChain | ) | [static] |
Convenience method to get a lattice from an int[].
This method is useful because Java's generics won't allow a primitive array to be passed as a generic array.
| linearChain |
| static Lattice<Integer> joshua.lattice.Lattice< Value >.createIntLatticeFromString | ( | String | data | ) | [static] |
| static Lattice<String> joshua.lattice.Lattice< Value >.createStringLatticeFromString | ( | String | data | ) | [static] |
Constructs a lattice from a given string representation.
| data | String representation of a lattice. |
| Node<Value> joshua.lattice.Lattice< Value >.getNode | ( | int | index | ) |
Gets the node with a specified integer identifier.
| index | Integer identifier for a node. |
| double joshua.lattice.Lattice< Value >.getShortestPath | ( | int | from, |
| int | to | ||
| ) |
Gets the cost of the shortest path between two nodes.
| from | ID of the starting node. |
| to | ID of the ending node. |
| final boolean joshua.lattice.Lattice< Value >.hasMoreThanOnePath | ( | ) |
| Iterator<Node<Value> > joshua.lattice.Lattice< Value >.iterator | ( | ) |
Returns an iterator over the nodes in this lattice.
| static void joshua.lattice.Lattice< Value >.main | ( | String[] | args | ) | [static] |
| int joshua.lattice.Lattice< Value >.size | ( | ) |
Returns the number of nodes in this lattice.
| String joshua.lattice.Lattice< Value >.toString | ( | ) |
final double [][] joshua.lattice.Lattice< Value >.costs [private] |
Costs of the best path between each pair of nodes in the lattice.
final boolean joshua.lattice.Lattice< Value >.latticeHasAmbiguity [private] |
True if there is more than one path through the lattice.
final Logger joshua.lattice.Lattice< Value >.logger = Logger.getLogger(Lattice.class.getName()) [static, private] |
Logger for this class.
final List<Node<Value> > joshua.lattice.Lattice< Value >.nodes [private] |
List of all nodes in the lattice. Nodes are assumed to be in topological order.