vs studio

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3124 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2010-04-12 13:50:11 +00:00
parent 3029aaccc3
commit b96bac6106

View File

@ -24,7 +24,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "PhraseDictionaryTreeAdaptor.h" #include "PhraseDictionaryTreeAdaptor.h"
#include "PhraseDictionaryNewFormat.h" #include "PhraseDictionaryNewFormat.h"
#include "PhraseDictionaryOnDisk.h" #include "PhraseDictionaryOnDisk.h"
#ifndef WIN32
#include "PhraseDictionaryDynSuffixArray.h" #include "PhraseDictionaryDynSuffixArray.h"
#endif
#include "StaticData.h" #include "StaticData.h"
#include "InputType.h" #include "InputType.h"
#include "TranslationOption.h" #include "TranslationOption.h"
@ -152,17 +154,21 @@ PhraseDictionaryFeature::PhraseDictionaryFeature
} }
else if (implementation == SuffixArray) else if (implementation == SuffixArray)
{ {
PhraseDictionaryDynSuffixArray *pd = new PhraseDictionaryDynSuffixArray(numScoreComponent, this); #ifndef WIN32
if(!(pd && pd->Load(filePath, targetFile, alignmentsFile PhraseDictionaryDynSuffixArray *pd = new PhraseDictionaryDynSuffixArray(numScoreComponent, this);
, weight, tableLimit if(!(pd && pd->Load(filePath, targetFile, alignmentsFile
, staticData.GetAllLM() , weight, tableLimit
, staticData.GetWeightWordPenalty()))) , staticData.GetAllLM()
{ , staticData.GetWeightWordPenalty())))
std::cerr << "FAILED TO LOAD\n" << endl; {
delete pd; std::cerr << "FAILED TO LOAD\n" << endl;
} delete pd;
m_phraseDictionary.reset(pd); }
std::cerr << "Suffix array phrase table loaded" << std::endl; m_phraseDictionary.reset(pd);
std::cerr << "Suffix array phrase table loaded" << std::endl;
#else
assert(false);
#endif
} }
} }