mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +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;
|
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()
|
void MosesDecoder::cleanup()
|
||||||
{
|
{
|
||||||
|
@ -62,9 +62,7 @@ class Decoder {
|
|||||||
**/
|
**/
|
||||||
class MosesDecoder : public Decoder {
|
class MosesDecoder : public Decoder {
|
||||||
public:
|
public:
|
||||||
MosesDecoder()
|
MosesDecoder();
|
||||||
: m_manager(NULL)
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void getNBest(const std::string& source, size_t count, MosesChart::TrellisPathList& sentences);
|
virtual void getNBest(const std::string& source, size_t count, MosesChart::TrellisPathList& sentences);
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
Loading…
Reference in New Issue
Block a user