LVoc< A, B > Class Template Reference

#include <LVoc.h>

Inheritance diagram for LVoc< A, B >:

Inheritance graph
[legend]

List of all members.

Public Types

typedef V::const_iterator const_iterator

Public Member Functions

 LVoc ()
bool isKnown (const Key &k) const
LabelId index (const Key &k) const
LabelId add (const Key &k)
Key const & symbol (LabelId i) const
const_iterator begin () const
const_iterator end () const
void Write (const std::string &fname) const
void Write (std::ostream &out) const
void Read (const std::string &fname)
void Read (std::istream &in)


Detailed Description

template<typename A, typename B = std::map<A,LabelId>>
class LVoc< A, B >

class used in phrase-based binary phrase-table.
Todo:
vocab? A = type of things to numberize, ie, std::string B = map type to use, might consider using hash_map for better performance

Definition at line 22 of file LVoc.h.


Member Typedef Documentation

template<typename A, typename B = std::map<A,LabelId>>
typedef V::const_iterator LVoc< A, B >::const_iterator

Definition at line 51 of file LVoc.h.


Constructor & Destructor Documentation

template<typename A, typename B = std::map<A,LabelId>>
LVoc< A, B >::LVoc (  )  [inline]

Definition at line 30 of file LVoc.h.


Member Function Documentation

template<typename A, typename B = std::map<A,LabelId>>
LabelId LVoc< A, B >::add ( const Key &  k  )  [inline]

Definition at line 39 of file LVoc.h.

Referenced by Moses::PhraseDictionaryTree::Create().

Here is the caller graph for this function:

template<typename A, typename B = std::map<A,LabelId>>
const_iterator LVoc< A, B >::begin (  )  const [inline]

Definition at line 52 of file LVoc.h.

template<typename A, typename B = std::map<A,LabelId>>
const_iterator LVoc< A, B >::end (  )  const [inline]

Definition at line 55 of file LVoc.h.

template<typename A, typename B = std::map<A,LabelId>>
LabelId LVoc< A, B >::index ( const Key &  k  )  const [inline]

Definition at line 35 of file LVoc.h.

Referenced by Moses::PhraseDictionaryTree::GetTargetCandidates(), and Moses::PhraseDictionaryTree::PrintTargetCandidates().

Here is the caller graph for this function:

template<typename A, typename B = std::map<A,LabelId>>
bool LVoc< A, B >::isKnown ( const Key &  k  )  const [inline]

Definition at line 32 of file LVoc.h.

template<typename A, typename B = std::map<A,LabelId>>
void LVoc< A, B >::Read ( std::istream &  in  )  [inline]

Definition at line 78 of file LVoc.h.

template<typename A, typename B = std::map<A,LabelId>>
void LVoc< A, B >::Read ( const std::string &  fname  )  [inline]

Definition at line 74 of file LVoc.h.

Referenced by Moses::PDTimp::Read(), LVoc< std::string >::Read(), and Moses::ReadVoc().

Here is the caller graph for this function:

template<typename A, typename B = std::map<A,LabelId>>
Key const& LVoc< A, B >::symbol ( LabelId  i  )  const [inline]

Definition at line 46 of file LVoc.h.

Referenced by Moses::PDTimp::PrintTgtCand().

Here is the caller graph for this function:

template<typename A, typename B = std::map<A,LabelId>>
void LVoc< A, B >::Write ( std::ostream &  out  )  const [inline]

Definition at line 70 of file LVoc.h.

template<typename A, typename B = std::map<A,LabelId>>
void LVoc< A, B >::Write ( const std::string &  fname  )  const [inline]

Definition at line 59 of file LVoc.h.

Referenced by Moses::PhraseDictionaryTree::Create(), Moses::LexicalReorderingTableTree::Create(), and LVoc< std::string >::Write().

Here is the caller graph for this function:


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

Generated on Thu Jul 6 00:31:50 2017 for Moses by  doxygen 1.5.9