mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-06 08:18:02 +03:00
minor cleanup
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@482 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
e6d2b603f3
commit
f0957d6fbe
@ -29,9 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
using namespace std;
|
||||
|
||||
size_t HypothesisRecombinationOrderer::s_ngramMaxOrder[NUM_FACTORS] = {0,0,0,0};
|
||||
// need to change if we add more factors, or use a macro
|
||||
|
||||
void HypothesisCollection::RemoveAll()
|
||||
{
|
||||
while (m_hypos.begin() != m_hypos.end())
|
||||
|
@ -31,10 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
class HypothesisRecombinationOrderer
|
||||
{
|
||||
protected:
|
||||
// static
|
||||
static size_t s_ngramMaxOrder[NUM_FACTORS];
|
||||
|
||||
public:
|
||||
bool operator()(const Hypothesis* hypoA, const Hypothesis* hypoB) const
|
||||
// this function defines less-than relation on hypotheses
|
||||
@ -58,14 +54,6 @@ public:
|
||||
|
||||
return (ret < 0);
|
||||
}
|
||||
|
||||
// static
|
||||
static inline void SetMaxNGramOrder(FactorType factorType, size_t ngramMaxOrder)
|
||||
{
|
||||
assert((size_t)factorType < NUM_FACTORS);
|
||||
if (s_ngramMaxOrder[factorType] < ngramMaxOrder)
|
||||
s_ngramMaxOrder[factorType] = ngramMaxOrder;
|
||||
}
|
||||
};
|
||||
|
||||
struct HypothesisRecombinationComparer
|
||||
|
@ -275,8 +275,6 @@ bool StaticData::LoadParameters(int argc, char* argv[])
|
||||
lm->Load(languageModelFile, m_factorCollection, factorType, weightAll[i], nGramOrder);
|
||||
timer.check(("Finished loading LanguageModel " + languageModelFile).c_str());
|
||||
m_languageModel.push_back(lm);
|
||||
|
||||
HypothesisRecombinationOrderer::SetMaxNGramOrder(factorType, nGramMaxOrder);
|
||||
}
|
||||
}
|
||||
// flag indicating that language models were loaded,
|
||||
|
Loading…
Reference in New Issue
Block a user