MosesTraining::Syntax::Pcfg Class Reference

#include <pcfg.h>

List of all members.

Public Types

typedef std::vector< std::size_t > Key
typedef std::map< Key, double > Map
typedef Map::iterator iterator
typedef Map::const_iterator const_iterator

Public Member Functions

 Pcfg ()
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
void Add (const Key &, double)
bool Lookup (const Key &, double &) const
void Read (std::istream &, Vocabulary &)
void Write (const Vocabulary &, std::ostream &) const


Detailed Description

Definition at line 13 of file pcfg.h.


Member Typedef Documentation

typedef Map::const_iterator MosesTraining::Syntax::Pcfg::const_iterator

Definition at line 18 of file pcfg.h.

Definition at line 17 of file pcfg.h.

typedef std::vector<std::size_t> MosesTraining::Syntax::Pcfg::Key

Definition at line 15 of file pcfg.h.

typedef std::map<Key, double> MosesTraining::Syntax::Pcfg::Map

Definition at line 16 of file pcfg.h.


Constructor & Destructor Documentation

MosesTraining::Syntax::Pcfg::Pcfg (  )  [inline]

Definition at line 20 of file pcfg.h.


Member Function Documentation

void MosesTraining::Syntax::Pcfg::Add ( const Key key,
double  score 
)

Definition at line 13 of file pcfg.cc.

Referenced by MosesTraining::Syntax::PCFG::RuleCollection::CreatePcfg(), and Read().

Here is the caller graph for this function:

const_iterator MosesTraining::Syntax::Pcfg::begin (  )  const [inline]

Definition at line 23 of file pcfg.h.

iterator MosesTraining::Syntax::Pcfg::begin (  )  [inline]

Definition at line 22 of file pcfg.h.

Referenced by Read(), and Write().

Here is the caller graph for this function:

const_iterator MosesTraining::Syntax::Pcfg::end (  )  const [inline]

Definition at line 26 of file pcfg.h.

iterator MosesTraining::Syntax::Pcfg::end (  )  [inline]

Definition at line 25 of file pcfg.h.

Referenced by Write().

Here is the caller graph for this function:

bool MosesTraining::Syntax::Pcfg::Lookup ( const Key key,
double &  score 
) const

Definition at line 17 of file pcfg.cc.

void MosesTraining::Syntax::Pcfg::Read ( std::istream &  input,
Vocabulary vocab 
)

Definition at line 26 of file pcfg.cc.

References Add(), begin(), MosesTraining::Syntax::NumberedSet< T, I >::Insert(), key, MosesTuning::split(), and trim().

Referenced by MosesTraining::Syntax::PCFG::PcfgScore::Main().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTraining::Syntax::Pcfg::Write ( const Vocabulary vocab,
std::ostream &  output 
) const

Definition at line 72 of file pcfg.cc.

References begin(), end(), key, and MosesTraining::Syntax::NumberedSet< T, I >::Lookup().

Referenced by MosesTraining::Syntax::PCFG::PcfgExtract::Main().

Here is the call graph for this function:

Here is the caller graph for this function:


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

Generated on Thu Jul 6 00:34:09 2017 for Moses by  doxygen 1.5.9