Moses::PhraseDictionaryCompact Class Reference

#include <PhraseDictionaryCompact.h>

Inheritance diagram for Moses::PhraseDictionaryCompact:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhraseDictionaryCompact (const std::string &line)
 ~PhraseDictionaryCompact ()
void Load (AllOptions::ptr const &opts)
 override to load model files
TargetPhraseCollection::shared_ptr GetTargetPhraseCollectionNonCacheLEGACY (const Phrase &source) const
TargetPhraseVectorPtr GetTargetPhraseCollectionRaw (const Phrase &source) const
void AddEquivPhrase (const Phrase &source, const TargetPhrase &targetPhrase)
void CacheForCleanup (TargetPhraseCollection::shared_ptr tpc)
void CleanUpAfterSentenceProcessing (const InputType &source)
virtual ChartRuleLookupManagerCreateRuleLookupManager (const ChartParser &, const ChartCellCollectionBase &, std::size_t)
 Create a sentence-specific manager for SCFG rule lookup.
 TO_STRING ()

Static Public Member Functions

static void SetStaticDefaultParameters (Parameter const &param)

Protected Types

typedef std::vector
< TargetPhraseCollection::shared_ptr
PhraseCache
typedef
boost::thread_specific_ptr
< PhraseCache
SentenceCache

Protected Attributes

bool m_inMemory
bool m_useAlignmentInfo
BlockHashIndex m_hash
PhraseDecoderm_phraseDecoder
StringVector< unsigned char,
size_t, MmapAllocator
m_targetPhrasesMapped
StringVector< unsigned char,
size_t, std::allocator > 
m_targetPhrasesMemory

Static Protected Attributes

static bool s_inMemoryByDefault = false
static SentenceCache m_sentenceCache

Friends

class PhraseDecoder


Detailed Description

Definition at line 46 of file PhraseDictionaryCompact.h.


Member Typedef Documentation

Definition at line 55 of file PhraseDictionaryCompact.h.

typedef boost::thread_specific_ptr<PhraseCache> Moses::PhraseDictionaryCompact::SentenceCache [protected]

Definition at line 56 of file PhraseDictionaryCompact.h.


Constructor & Destructor Documentation

Moses::PhraseDictionaryCompact::PhraseDictionaryCompact ( const std::string &  line  ) 

Definition at line 49 of file PhraseDictionaryCompact.cpp.

References Moses::FeatureFunction::ReadParameters().

Here is the call graph for this function:

Moses::PhraseDictionaryCompact::~PhraseDictionaryCompact (  ) 

Definition at line 153 of file PhraseDictionaryCompact.cpp.

References m_phraseDecoder.


Member Function Documentation

void Moses::PhraseDictionaryCompact::AddEquivPhrase ( const Phrase source,
const TargetPhrase targetPhrase 
)

Definition at line 170 of file PhraseDictionaryCompact.cpp.

void Moses::PhraseDictionaryCompact::CacheForCleanup ( TargetPhraseCollection::shared_ptr  tpc  ) 

Definition at line 161 of file PhraseDictionaryCompact.cpp.

References m_sentenceCache.

Referenced by GetTargetPhraseCollectionNonCacheLEGACY().

Here is the caller graph for this function:

void Moses::PhraseDictionaryCompact::CleanUpAfterSentenceProcessing ( const InputType source  )  [virtual]

Reimplemented from Moses::PhraseDictionary.

Definition at line 175 of file PhraseDictionaryCompact.cpp.

References m_phraseDecoder, m_sentenceCache, Moses::PhraseDecoder::PruneCache(), and Moses::PhraseDictionary::ReduceCache().

Here is the call graph for this function:

virtual ChartRuleLookupManager* Moses::PhraseDictionaryCompact::CreateRuleLookupManager ( const ChartParser ,
const ChartCellCollectionBase ,
std::size_t   
) [inline, virtual]

Create a sentence-specific manager for SCFG rule lookup.

Implements Moses::PhraseDictionary.

Definition at line 81 of file PhraseDictionaryCompact.h.

TargetPhraseCollection::shared_ptr Moses::PhraseDictionaryCompact::GetTargetPhraseCollectionNonCacheLEGACY ( const Phrase source  )  const [virtual]

TargetPhraseVectorPtr Moses::PhraseDictionaryCompact::GetTargetPhraseCollectionRaw ( const Phrase source  )  const

void Moses::PhraseDictionaryCompact::Load ( AllOptions::ptr const &  opts  )  [virtual]

void Moses::PhraseDictionaryCompact::SetStaticDefaultParameters ( Parameter const &  param  )  [static]

Definition at line 189 of file PhraseDictionaryCompact.cpp.

References s_inMemoryByDefault, and Moses::Parameter::SetParameter().

Referenced by Moses::StaticData::LoadData().

Here is the call graph for this function:

Here is the caller graph for this function:

Moses::PhraseDictionaryCompact::TO_STRING (  ) 


Friends And Related Function Documentation

friend class PhraseDecoder [friend]

Definition at line 49 of file PhraseDictionaryCompact.h.

Referenced by Load().


Member Data Documentation

Definition at line 57 of file PhraseDictionaryCompact.h.

Referenced by CacheForCleanup(), and CleanUpAfterSentenceProcessing().

StringVector<unsigned char, size_t, std::allocator> Moses::PhraseDictionaryCompact::m_targetPhrasesMemory [protected]

Definition at line 53 of file PhraseDictionaryCompact.h.

Referenced by Moses::PhraseDecoder::DecodeCollection().

bool Moses::PhraseDictionaryCompact::s_inMemoryByDefault = false [static, protected]

Definition at line 51 of file PhraseDictionaryCompact.h.

Referenced by SetStaticDefaultParameters().


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

Generated on Thu Jul 6 00:33:39 2017 for Moses by  doxygen 1.5.9