#include <querying.hh>
Public Member Functions | |
QueryEngine (const char *) | |
~QueryEngine () | |
std::pair< bool, uint64_t > | query (uint64_t key) |
const std::map< uint64_t, std::string > & | getSourceVocab () const |
const std::vector< Alignments > & | getAlignments () const |
uint64_t | getKey (uint64_t source_phrase[], size_t size) const |
template<typename T > | |
bool | Get (const boost::unordered_map< std::string, std::string > &keyValue, const std::string &sought, T &found) const |
Public Attributes | |
int | num_scores |
int | num_lex_scores |
bool | logProb |
Definition at line 16 of file querying.hh.
Moses::QueryEngine::QueryEngine | ( | const char * | filepath | ) |
Source phrase vocabids
Definition at line 9 of file querying.cpp.
References API_VERSION, Moses::FileExists(), Get(), logProb, num_lex_scores, num_scores, Moses::read_map(), Moses::readTable(), util::ProbingHashTable< Entry, boost::hash< uint64_t > >::Size(), Moses::Tokenize(), UTIL_THROW2, and UTIL_THROW_IF2.
Moses::QueryEngine::~QueryEngine | ( | ) |
Definition at line 92 of file querying.cpp.
bool Moses::QueryEngine::Get | ( | const boost::unordered_map< std::string, std::string > & | keyValue, | |
const std::string & | sought, | |||
T & | found | |||
) | const [inline] |
Definition at line 52 of file querying.hh.
Referenced by QueryEngine().
const std::vector<Alignments>& Moses::QueryEngine::getAlignments | ( | ) | const [inline] |
Definition at line 45 of file querying.hh.
Referenced by Moses::ProbingPT::CreateAlignmentMap().
uint64_t Moses::QueryEngine::getKey | ( | uint64_t | source_phrase[], | |
size_t | size | |||
) | const |
Definition at line 99 of file querying.cpp.
Referenced by Moses::ProbingPT::GetKey().
const std::map<uint64_t, std::string>& Moses::QueryEngine::getSourceVocab | ( | ) | const [inline] |
Definition at line 41 of file querying.hh.
Referenced by Moses::ProbingPT::Load().
std::pair< bool, uint64_t > Moses::QueryEngine::query | ( | uint64_t | key | ) |
Definition at line 106 of file querying.cpp.
References util::ProbingHashTable< EntryT, HashT, EqualT, ModT >::Find(), and Moses::Entry::value.
Referenced by Moses::ProbingPT::CreateTargetPhrases(), and main().
Definition at line 34 of file querying.hh.
Referenced by Moses::ProbingPT::CreateTargetPhrase(), and QueryEngine().
Definition at line 33 of file querying.hh.
Referenced by Moses::ProbingPT::CreateTargetPhrase(), and QueryEngine().
Definition at line 32 of file querying.hh.
Referenced by Moses::ProbingPT::CreateTargetPhrase(), and QueryEngine().