#include <WordLattice.h>


Public Member Functions | |
| WordLattice () | |
| size_t | GetColumnIncrement (size_t ic, size_t j) const |
| void | Print (std::ostream &) const |
| Output debugging info to stream out. | |
| virtual int | ComputeDistortionDistance (const WordsRange &prev, const WordsRange ¤t) const |
| virtual bool | CanIGetFromAToB (size_t start, size_t end) const |
| In a word lattice, tells you if there's a path from node start to node end. | |
| int | InitializeFromPCNDataType (const PCN::CN &cn, const std::vector< FactorType > &factorOrder, const std::string &debug_line="") |
| int | Read (std::istream &in, const std::vector< FactorType > &factorOrder) |
| void | GetAsEdgeMatrix (std::vector< std::vector< bool > > &edges) const |
| const NonTerminalSet & | GetLabelSet (size_t, size_t) const |
Definition at line 12 of file WordLattice.h.
| Moses::WordLattice::WordLattice | ( | ) |
Definition at line 9 of file WordLattice.cpp.
| bool Moses::WordLattice::CanIGetFromAToB | ( | size_t | start, | |
| size_t | end | |||
| ) | const [virtual] |
In a word lattice, tells you if there's a path from node start to node end.
Reimplemented from Moses::InputType.
Definition at line 178 of file WordLattice.cpp.
| int Moses::WordLattice::ComputeDistortionDistance | ( | const WordsRange & | prev, | |
| const WordsRange & | current | |||
| ) | const [virtual] |
Get shortest path between two nodes
Reimplemented from Moses::InputType.
Definition at line 137 of file WordLattice.cpp.
References Moses::WordsRange::GetEndPos(), Moses::WordsRange::GetStartPos(), NOT_FOUND, TRACE_ERR, and VERBOSE.

| void Moses::WordLattice::GetAsEdgeMatrix | ( | std::vector< std::vector< bool > > & | edges | ) | const |
Convert internal representation into an edge matrix
Definition at line 127 of file WordLattice.cpp.
References Moses::ConfusionNet::data.
Referenced by InitializeFromPCNDataType().

| size_t Moses::WordLattice::GetColumnIncrement | ( | size_t | ic, | |
| size_t | j | |||
| ) | const [virtual] |
Reimplemented from Moses::ConfusionNet.
Definition at line 11 of file WordLattice.cpp.
Referenced by Print().

| const NonTerminalSet& Moses::WordLattice::GetLabelSet | ( | size_t | , | |
| size_t | ||||
| ) | const [inline, virtual] |
Reimplemented from Moses::ConfusionNet.
Definition at line 41 of file WordLattice.h.
References CHECK.
| int Moses::WordLattice::InitializeFromPCNDataType | ( | const PCN::CN & | cn, | |
| const std::vector< FactorType > & | factorOrder, | |||
| const std::string & | debug_line = "" | |||
| ) |
Given a lattice represented using the PCN::CN data type (topologically sorted agency list representation), initialize the WordLattice object
Definition at line 34 of file WordLattice.cpp.
References Moses::ConfusionNet::data, EPSILON, floyd_warshall(), GetAsEdgeMatrix(), Moses::StaticData::GetMaxPhraseLength(), Moses::StaticData::GetNumInputScores(), Moses::StaticData::GetNumLinkParams(), IFVERBOSE, Moses::StaticData::Instance(), Moses::LOWEST_SCORE, Moses::ConfusionNet::String2Word(), TRACE_ERR, and value.
Referenced by Read().


| void Moses::WordLattice::Print | ( | std::ostream & | ) | const [virtual] |
Output debugging info to stream out.
Reimplemented from Moses::ConfusionNet.
Definition at line 16 of file WordLattice.cpp.
References Moses::ConfusionNet::data, and GetColumnIncrement().

| int Moses::WordLattice::Read | ( | std::istream & | in, | |
| const std::vector< FactorType > & | factorOrder | |||
| ) | [virtual] |
Read from PLF format (1 lattice per line)
Reimplemented from Moses::ConfusionNet.
Definition at line 113 of file WordLattice.cpp.
References Moses::ConfusionNet::Clear(), InitializeFromPCNDataType(), PCN::parsePCN(), Moses::ProcessAndStripSGML(), and Moses::InputType::SetTranslationId().

1.5.9