daily automatic beautifier

This commit is contained in:
MosesAdmin 2017-01-03 00:00:36 +00:00
parent a18b6676b1
commit 80bd559757
2 changed files with 8 additions and 6 deletions

View File

@ -17,7 +17,7 @@ using namespace std;
namespace Moses
{
InMemoryPerSentenceOnDemandLM::InMemoryPerSentenceOnDemandLM(const std::string &line) : LanguageModel(line), initialized(false)
InMemoryPerSentenceOnDemandLM::InMemoryPerSentenceOnDemandLM(const std::string &line) : LanguageModel(line), initialized(false)
{
ReadParameters();
}
@ -26,7 +26,8 @@ InMemoryPerSentenceOnDemandLM::~InMemoryPerSentenceOnDemandLM()
{
}
void InMemoryPerSentenceOnDemandLM::InitializeForInput(ttasksptr const& ttask) {
void InMemoryPerSentenceOnDemandLM::InitializeForInput(ttasksptr const& ttask)
{
// The context scope object for this translation task
// contains a map of translation task-specific data
@ -63,14 +64,15 @@ void InMemoryPerSentenceOnDemandLM::InitializeForInput(ttasksptr const& ttask) {
VERBOSE(1, filename);
if (initialized) {
VERBOSE(1, "\tLM initialized\n");
VERBOSE(1, "\tLM initialized\n");
}
// std::remove(filename);
}
LanguageModelKen<lm::ngram::ProbingModel>& InMemoryPerSentenceOnDemandLM::GetPerThreadLM() const {
LanguageModelKen<lm::ngram::ProbingModel>& InMemoryPerSentenceOnDemandLM::GetPerThreadLM() const
{
LanguageModelKen<lm::ngram::ProbingModel> *lm;
lm = m_perThreadLM.get();

View File

@ -89,7 +89,7 @@ public:
virtual void sync() {
GetPerThreadLM().sync();
}
virtual void SetFFStateIdx(int state_idx) {
if (initialized) {
GetPerThreadLM().SetFFStateIdx(state_idx);
@ -107,7 +107,7 @@ public:
GetPerThreadLM().ReportHistoryOrder(out, phrase);
}
}
virtual void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown