Moses::Mmsapt Class Reference

#include <mmsapt.h>

Inheritance diagram for Moses::Mmsapt:

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef sapt::L2R_Token
< sapt::SimpleWordId
Token
typedef sapt::mmBitext< Tokenmmbitext
typedef sapt::imBitext< Tokenimbitext
typedef sapt::Bitext< Tokenbitext
typedef sapt::TSA< Tokentsa
typedef sapt::PhraseScorer< Tokenpscorer

Public Member Functions

 Mmsapt (std::string const &line)
void Load (AllOptions::ptr const &opts)
 override to load model files
void Load (AllOptions::ptr const &opts, bool with_checks)
size_t SetTableLimit (size_t limit)
std::string const & GetName () const
TargetPhraseCollection::shared_ptr GetTargetPhraseCollectionLEGACY (ttasksptr const &ttask, const Phrase &src) const
void GetTargetPhraseCollectionBatch (ttasksptr const &ttask, InputPathList const &inputPathQueue) const
ChartRuleLookupManagerCreateRuleLookupManager (const ChartParser &, const ChartCellCollectionBase &)
 Create a sentence-specific manager for SCFG rule lookup.
ChartRuleLookupManagerCreateRuleLookupManager (const ChartParser &, const ChartCellCollectionBase &, std::size_t)
 Create a sentence-specific manager for SCFG rule lookup.
void add (std::string const &s1, std::string const &s2, std::string const &a)
void setWeights (std::vector< float > const &w)
bool ProvidesPrefixCheck () const
bool PrefixExists (ttasksptr const &ttask, Phrase const &phrase) const
 return true if phrase table entries starting with /phrase/
bool isLogVal (int i) const
bool isInteger (int i) const
void InitializeForInput (ttasksptr const &ttask)
 Create entry for translation of source to targetPhrase.
void CleanUpAfterSentenceProcessing (ttasksptr const &ttask)
SPTR< std::vector< int > > align (std::string const &src, std::string const &trg) const
std::vector< std::string > const & GetFeatureNames () const
SPTR< sapt::DocumentBiassetupDocumentBias (std::map< std::string, float > const &bias) const
std::vector< float > DefaultWeights () const
template<typename fftype >
void check_ff (string const ffname, vector< SPTR< pscorer > > *registry)
template<typename fftype >
void check_ff (string const ffname, float const xtra, vector< SPTR< pscorer > > *registry)

Public Attributes

void *const bias_key
void *const cache_key
void *const context_key

Friends

class Alignment
class PhraseDictionaryGroup


Detailed Description

Definition at line 52 of file mmsapt.h.


Member Typedef Documentation

Definition at line 69 of file mmsapt.h.

Definition at line 68 of file mmsapt.h.

Definition at line 67 of file mmsapt.h.

Definition at line 71 of file mmsapt.h.

Definition at line 66 of file mmsapt.h.

Definition at line 70 of file mmsapt.h.


Constructor & Destructor Documentation

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


Member Function Documentation

void Moses::Mmsapt::add ( std::string const &  s1,
std::string const &  s2,
std::string const &  a 
)

Referenced by batch_run(), MosesServer::Updater::execute(), main(), and Moses::ProcessAndStripXMLTags().

Here is the caller graph for this function:

SPTR<std::vector<int> > Moses::Mmsapt::align ( std::string const &  src,
std::string const &  trg 
) const

template<typename fftype >
void Moses::Mmsapt::check_ff ( string const   ffname,
float const   xtra,
vector< SPTR< pscorer > > *  registry 
) [inline]

Definition at line 430 of file mmsapt.cpp.

template<typename fftype >
void Moses::Mmsapt::check_ff ( string const   ffname,
vector< SPTR< pscorer > > *  registry 
) [inline]

Definition at line 404 of file mmsapt.cpp.

void Moses::Mmsapt::CleanUpAfterSentenceProcessing ( ttasksptr const &  ttask  )  [virtual]

Reimplemented from Moses::FeatureFunction.

Definition at line 857 of file mmsapt.cpp.

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

Create a sentence-specific manager for SCFG rule lookup.

Implements Moses::PhraseDictionary.

ChartRuleLookupManager * Moses::Mmsapt::CreateRuleLookupManager ( const ChartParser ,
const ChartCellCollectionBase  
)

Create a sentence-specific manager for SCFG rule lookup.

Definition at line 863 of file mmsapt.cpp.

vector< float > Moses::Mmsapt::DefaultWeights (  )  const [virtual]

Reimplemented from Moses::FeatureFunction.

Definition at line 1043 of file mmsapt.cpp.

vector< string > const & Moses::Mmsapt::GetFeatureNames (  )  const

Definition at line 55 of file mmsapt.cpp.

Referenced by main().

Here is the caller graph for this function:

string const & Moses::Mmsapt::GetName (  )  const

Definition at line 1032 of file mmsapt.cpp.

Referenced by main().

Here is the caller graph for this function:

void Moses::Mmsapt::GetTargetPhraseCollectionBatch ( ttasksptr const &  ttask,
InputPathList const &  inputPathQueue 
) const [virtual]

Reimplemented from Moses::PhraseDictionary.

Definition at line 683 of file mmsapt.cpp.

References Moses::InputPath::GetPhrase(), GetTargetPhraseCollectionLEGACY(), NULL, PrefixExists(), and Moses::InputPath::SetTargetPhrases().

Here is the call graph for this function:

TargetPhraseCollection::shared_ptr Moses::Mmsapt::GetTargetPhraseCollectionLEGACY ( ttasksptr const &  ttask,
const Phrase src 
) const [virtual]

Reimplemented from Moses::PhraseDictionary.

Definition at line 713 of file mmsapt.cpp.

References cache_key, sapt::expand(), Moses::fillIdSeq(), Moses::LexicalReordering::GetModel(), k, NULL, sort(), and sorter.

Referenced by GetTargetPhraseCollectionBatch().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::Mmsapt::InitializeForInput ( ttasksptr const &  ttask  )  [virtual]

Create entry for translation of source to targetPhrase.

Reimplemented from Moses::PhraseDictionary.

Definition at line 924 of file mmsapt.cpp.

References cache_key, Moses::FeatureFunction::FindFeatureFunction(), NULL, and UTIL_THROW_IF2.

Here is the call graph for this function:

bool Moses::Mmsapt::isInteger ( int  i  )  const

Definition at line 126 of file mmsapt.cpp.

Referenced by main().

Here is the caller graph for this function:

bool Moses::Mmsapt::isLogVal ( int  i  )  const

Definition at line 125 of file mmsapt.cpp.

Referenced by main().

Here is the caller graph for this function:

void Moses::Mmsapt::Load ( AllOptions::ptr const &  opts,
bool  with_checks 
)

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

override to load model files

Reimplemented from Moses::FeatureFunction.

Definition at line 456 of file mmsapt.cpp.

Referenced by main().

Here is the caller graph for this function:

bool Moses::Mmsapt::PrefixExists ( ttasksptr const &  ttask,
Moses::Phrase const &  phrase 
) const [virtual]

return true if phrase table entries starting with /phrase/

Reimplemented from Moses::PhraseDictionary.

Definition at line 964 of file mmsapt.cpp.

References Moses::fillIdSeq(), and Moses::Phrase::GetSize().

Referenced by GetTargetPhraseCollectionBatch().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Moses::Mmsapt::ProvidesPrefixCheck (  )  const [virtual]

Reimplemented from Moses::PhraseDictionary.

Definition at line 1029 of file mmsapt.cpp.

size_t Moses::Mmsapt::SetTableLimit ( size_t  limit  ) 

Definition at line 849 of file mmsapt.cpp.

References Moses::swap().

Here is the call graph for this function:

SPTR<sapt::DocumentBias> Moses::Mmsapt::setupDocumentBias ( std::map< std::string, float > const &  bias  )  const

void Moses::Mmsapt::setWeights ( std::vector< float > const &  w  ) 


Friends And Related Function Documentation

friend class Alignment [friend]

Definition at line 57 of file mmsapt.h.

friend class PhraseDictionaryGroup [friend]

Definition at line 63 of file mmsapt.h.


Member Data Documentation

Definition at line 98 of file mmsapt.h.

Definition at line 99 of file mmsapt.h.

Referenced by GetTargetPhraseCollectionLEGACY(), and InitializeForInput().

Definition at line 100 of file mmsapt.h.


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

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