mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-05 02:22:21 +03:00
daily automatic beautifier
This commit is contained in:
parent
a18b6676b1
commit
80bd559757
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user