mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-05 02:22:21 +03:00
Force the initialisation of the phrase dictionary
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mira-mtm5@3499 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
2c4e85a910
commit
ff93086924
@ -63,6 +63,15 @@ namespace Mira {
|
||||
}
|
||||
delete[] mosesargv;
|
||||
}
|
||||
|
||||
MosesDecoder::MosesDecoder()
|
||||
: m_manager(NULL)
|
||||
{
|
||||
//force initialisation of the phrase dictionary
|
||||
string source("hello");
|
||||
MosesChart::TrellisPathList sentences;
|
||||
getNBest(source,1,sentences);
|
||||
}
|
||||
|
||||
void MosesDecoder::cleanup()
|
||||
{
|
||||
|
@ -62,9 +62,7 @@ class Decoder {
|
||||
**/
|
||||
class MosesDecoder : public Decoder {
|
||||
public:
|
||||
MosesDecoder()
|
||||
: m_manager(NULL)
|
||||
{}
|
||||
MosesDecoder();
|
||||
|
||||
virtual void getNBest(const std::string& source, size_t count, MosesChart::TrellisPathList& sentences);
|
||||
void cleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user