Moses::WordLattice Class Reference

#include <WordLattice.h>

Inheritance diagram for Moses::WordLattice:

Inheritance graph
[legend]
Collaboration diagram for Moses::WordLattice:

Collaboration graph
[legend]

List of all members.

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 &current) 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 NonTerminalSetGetLabelSet (size_t, size_t) const


Detailed Description

General word lattice

Definition at line 12 of file WordLattice.h.


Constructor & Destructor Documentation

Moses::WordLattice::WordLattice (  ) 

Definition at line 9 of file WordLattice.cpp.


Member Function Documentation

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.

Here is the call graph for this function:

void Moses::WordLattice::GetAsEdgeMatrix ( std::vector< std::vector< bool > > &  edges  )  const

Convert internal representation into an edge matrix

Note:
edges[1][2] means there is an edge from 1 to 2

Definition at line 127 of file WordLattice.cpp.

References Moses::ConfusionNet::data.

Referenced by InitializeFromPCNDataType().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


The documentation for this class was generated from the following files:

Generated on Wed Feb 8 22:04:10 2012 for Moses by  doxygen 1.5.9