Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/moses
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@Hieus-MacBook.local>2011-10-30 09:51:08 +0400
committerHieu Hoang <hieuhoang@Hieus-MacBook.local>2011-10-30 09:51:08 +0400
commitaac12ed58f61811bc80df9257713f98fddfa89d9 (patch)
treee2228124366e747dccc4ba83972b2b03aaf97007 /moses
parentaff5978be494823c928d7024181b56baadcae6c0 (diff)
xcode
Diffstat (limited to 'moses')
-rw-r--r--moses/src/StaticData.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/moses/src/StaticData.cpp b/moses/src/StaticData.cpp
index cb938c19b..8eefb3798 100644
--- a/moses/src/StaticData.cpp
+++ b/moses/src/StaticData.cpp
@@ -991,25 +991,31 @@ bool StaticData::LoadPhraseTables()
// it only work with binrary file. This is a hack
m_numInputScores=m_parameter->GetParam("weight-i").size();
- for(unsigned k=0; k<m_numInputScores; ++k)
- weight.push_back(Scan<float>(m_parameter->GetParam("weight-i")[k]));
-
+
+ if (implementation == Binary)
+ {
+ for(unsigned k=0; k<m_numInputScores; ++k)
+ weight.push_back(Scan<float>(m_parameter->GetParam("weight-i")[k]));
+ }
+
if(m_parameter->GetParam("link-param-count").size())
m_numLinkParams = Scan<size_t>(m_parameter->GetParam("link-param-count")[0]);
//print some info about this interaction:
- if (m_numLinkParams == m_numInputScores) {
- VERBOSE(1,"specified equal numbers of link parameters and insertion weights, not using non-epsilon 'real' word link count.\n");
- } else if ((m_numLinkParams + 1) == m_numInputScores) {
- VERBOSE(1,"WARN: "<< m_numInputScores << " insertion weights found and only "<< m_numLinkParams << " link parameters specified, applying non-epsilon 'real' word link count for last feature weight.\n");
- } else {
- stringstream strme;
- strme << "You specified " << m_numInputScores
- << " input weights (weight-i), but you specified " << m_numLinkParams << " link parameters (link-param-count)!";
- UserMessage::Add(strme.str());
- return false;
+ if (implementation == Binary) {
+ if (m_numLinkParams == m_numInputScores) {
+ VERBOSE(1,"specified equal numbers of link parameters and insertion weights, not using non-epsilon 'real' word link count.\n");
+ } else if ((m_numLinkParams + 1) == m_numInputScores) {
+ VERBOSE(1,"WARN: "<< m_numInputScores << " insertion weights found and only "<< m_numLinkParams << " link parameters specified, applying non-epsilon 'real' word link count for last feature weight.\n");
+ } else {
+ stringstream strme;
+ strme << "You specified " << m_numInputScores
+ << " input weights (weight-i), but you specified " << m_numLinkParams << " link parameters (link-param-count)!";
+ UserMessage::Add(strme.str());
+ return false;
+ }
}
-
+
}
if (!m_inputType) {
m_numInputScores=0;