visual studio

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@65 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2006-07-12 01:46:30 +00:00
parent 563094e3f8
commit 6da62624ff
2 changed files with 5 additions and 4 deletions

View File

@ -175,8 +175,8 @@ void LanguageModel::Load(size_t id
m_weight = weight;
m_nGramOrder = nGramOrder;
// make sure start & end tags in factor collection
m_sentenceStart = factorCollection.AddFactor(Target, m_factorType, SENTENCE_START);
m_sentenceEnd = factorCollection.AddFactor(Target, m_factorType, SENTENCE_END);
m_sentenceStart = factorCollection.AddFactor(Output, m_factorType, SENTENCE_START);
m_sentenceEnd = factorCollection.AddFactor(Output, m_factorType, SENTENCE_END);
// read in file
TRACE_ERR(fileName << endl);
@ -203,7 +203,7 @@ void LanguageModel::Load(size_t id
const Factor *factor;
for (int currFactor = (int) factorStr.size() - 1 ; currFactor >= 0 ; currFactor--)
{
factor = factorCollection.AddFactor(Target, m_factorType, factorStr[currFactor]);
factor = factorCollection.AddFactor(Output, m_factorType, factorStr[currFactor]);
nGram = ngramColl->GetOrCreateNGram(factor);
ngramColl = nGram->GetNGramColl();

View File

@ -310,7 +310,8 @@ void StaticData::LoadPhraseTables(bool filter
bool filterPhrase;
if (filter)
{
if (boost::filesystem::exists(hashFilePath))
boost::filesystem::path tempFile(hashFilePath, boost::filesystem::native);
if (boost::filesystem::exists(tempFile))
{ // load filtered file instead
filterPhrase = false;
filePath = hashFilePath;