#include <pcfg.h>
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 |
Definition at line 13 of file pcfg.h.
typedef Map::const_iterator MosesTraining::Syntax::Pcfg::const_iterator |
typedef Map::iterator MosesTraining::Syntax::Pcfg::iterator |
typedef std::vector<std::size_t> MosesTraining::Syntax::Pcfg::Key |
typedef std::map<Key, double> MosesTraining::Syntax::Pcfg::Map |
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().
const_iterator MosesTraining::Syntax::Pcfg::begin | ( | ) | const [inline] |
iterator MosesTraining::Syntax::Pcfg::begin | ( | ) | [inline] |
const_iterator MosesTraining::Syntax::Pcfg::end | ( | ) | const [inline] |
iterator MosesTraining::Syntax::Pcfg::end | ( | ) | [inline] |
bool MosesTraining::Syntax::Pcfg::Lookup | ( | const Key & | key, | |
double & | score | |||
) | const |
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().
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().