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
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2017-04-27 15:48:28 +0300
committerHieu Hoang <hieuhoang@gmail.com>2017-04-27 15:48:28 +0300
commitb199e654df2a26ea58f234cbb642e89d9c1f269d (patch)
tree27f0691cae932468f751eab746dfeab9bb65cef5
parent2ea75d91dcd0455c9e44e6eaa836a668d577adc8 (diff)
parentac66370b80d99df64f9b1e8e806192a17eb6e584 (diff)
Merge branch 'master' of github.com:moses-smt/mosesdecoder
-rw-r--r--contrib/other-builds/moses/.project105
-rw-r--r--contrib/other-builds/moses2/.project40
-rw-r--r--moses/FF/ExampleStatefulFF.cpp (renamed from moses/FF/SkeletonStatefulFF.cpp)20
-rw-r--r--moses/FF/ExampleStatefulFF.h (renamed from moses/FF/SkeletonStatefulFF.h)12
-rw-r--r--moses/FF/ExampleStatelessFF.cpp (renamed from moses/FF/SkeletonStatelessFF.cpp)16
-rw-r--r--moses/FF/ExampleStatelessFF.h (renamed from moses/FF/SkeletonStatelessFF.h)4
-rw-r--r--moses/FF/ExampleTranslationOptionListFeature.h (renamed from moses/FF/SkeletonTranslationOptionListFeature.h)4
-rw-r--r--moses/FF/Factory.cpp24
-rw-r--r--moses/LM/ExampleLM.cpp (renamed from moses/LM/SkeletonLM.cpp)8
-rw-r--r--moses/LM/ExampleLM.h (renamed from moses/LM/SkeletonLM.h)6
-rw-r--r--moses/LM/Jamfile2
-rw-r--r--moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.cpp (renamed from moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.cpp)20
-rw-r--r--moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h (renamed from moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h)14
-rw-r--r--moses/TranslationModel/ExamplePT.cpp (renamed from moses/TranslationModel/SkeletonPT.cpp)26
-rw-r--r--moses/TranslationModel/ExamplePT.h (renamed from moses/TranslationModel/SkeletonPT.h)6
-rw-r--r--moses/TranslationModel/PhraseDictionaryMemoryPerSentence.cpp2
-rw-r--r--moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp1
-rw-r--r--moses/TranslationModel/PhraseDictionaryTransliteration.cpp1
-rw-r--r--moses/TranslationModel/ProbingPT.cpp1
-rw-r--r--moses2/FF/ExampleStatefulFF.cpp (renamed from moses2/FF/SkeletonStatefulFF.cpp)32
-rw-r--r--moses2/FF/ExampleStatefulFF.h (renamed from moses2/FF/SkeletonStatefulFF.h)12
-rw-r--r--moses2/FF/ExampleStatelessFF.cpp (renamed from moses2/FF/SkeletonStatelessFF.cpp)12
-rw-r--r--moses2/FF/ExampleStatelessFF.h (renamed from moses2/FF/SkeletonStatelessFF.h)6
-rw-r--r--moses2/FF/FeatureRegistry.cpp8
-rw-r--r--moses2/Jamfile4
-rw-r--r--scripts/ems/experiment.meta58
-rwxr-xr-xscripts/training/rdlm/train_rdlm.py5
27 files changed, 227 insertions, 222 deletions
diff --git a/contrib/other-builds/moses/.project b/contrib/other-builds/moses/.project
index d7e99c253..a57a9df90 100644
--- a/contrib/other-builds/moses/.project
+++ b/contrib/other-builds/moses/.project
@@ -1201,6 +1201,31 @@
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/EditOps.h</locationURI>
</link>
<link>
+ <name>FF/ExampleStatefulFF.cpp</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/FF/ExampleStatefulFF.cpp</locationURI>
+ </link>
+ <link>
+ <name>FF/ExampleStatefulFF.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/FF/ExampleStatefulFF.h</locationURI>
+ </link>
+ <link>
+ <name>FF/ExampleStatelessFF.cpp</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/FF/ExampleStatelessFF.cpp</locationURI>
+ </link>
+ <link>
+ <name>FF/ExampleStatelessFF.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/FF/ExampleStatelessFF.h</locationURI>
+ </link>
+ <link>
+ <name>FF/ExampleTranslationOptionListFeature.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/FF/ExampleTranslationOptionListFeature.h</locationURI>
+ </link>
+ <link>
<name>FF/FFState.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/FFState.cpp</locationURI>
@@ -1421,26 +1446,6 @@
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/SetSourcePhrase.h</locationURI>
</link>
<link>
- <name>FF/SkeletonStatefulFF.cpp</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/FF/SkeletonStatefulFF.cpp</locationURI>
- </link>
- <link>
- <name>FF/SkeletonStatefulFF.h</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/FF/SkeletonStatefulFF.h</locationURI>
- </link>
- <link>
- <name>FF/SkeletonStatelessFF.cpp</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/FF/SkeletonStatelessFF.cpp</locationURI>
- </link>
- <link>
- <name>FF/SkeletonStatelessFF.h</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/FF/SkeletonStatelessFF.h</locationURI>
- </link>
- <link>
<name>FF/SoftMatchingFeature.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/SoftMatchingFeature.cpp</locationURI>
@@ -1696,6 +1701,16 @@
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/DALMWrapper.h</locationURI>
</link>
<link>
+ <name>LM/ExampleLM.cpp</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/LM/ExampleLM.cpp</locationURI>
+ </link>
+ <link>
+ <name>LM/ExampleLM.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/LM/ExampleLM.h</locationURI>
+ </link>
+ <link>
<name>LM/IRST.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/IRST.cpp</locationURI>
@@ -1846,16 +1861,6 @@
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/SingleFactor.h</locationURI>
</link>
<link>
- <name>LM/SkeletonLM.cpp</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/LM/SkeletonLM.cpp</locationURI>
- </link>
- <link>
- <name>LM/SkeletonLM.h</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/LM/SkeletonLM.h</locationURI>
- </link>
- <link>
<name>LM/backward.arpa</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/backward.arpa</locationURI>
@@ -2141,6 +2146,16 @@
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
+ <name>TranslationModel/ExamplePT.cpp</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/ExamplePT.cpp</locationURI>
+ </link>
+ <link>
+ <name>TranslationModel/ExamplePT.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/ExamplePT.h</locationURI>
+ </link>
+ <link>
<name>TranslationModel/PhraseDictionary.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionary.cpp</locationURI>
@@ -2291,16 +2306,6 @@
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
- <name>TranslationModel/SkeletonPT.cpp</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/SkeletonPT.cpp</locationURI>
- </link>
- <link>
- <name>TranslationModel/SkeletonPT.h</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/SkeletonPT.h</locationURI>
- </link>
- <link>
<name>TranslationModel/UG</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
@@ -3136,6 +3141,16 @@
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.h</locationURI>
</link>
<link>
+ <name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.cpp</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.cpp</locationURI>
+ </link>
+ <link>
+ <name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h</locationURI>
+ </link>
+ <link>
<name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.cpp</locationURI>
@@ -3166,16 +3181,6 @@
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.h</locationURI>
</link>
<link>
- <name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.cpp</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.cpp</locationURI>
- </link>
- <link>
- <name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h</locationURI>
- </link>
- <link>
<name>TranslationModel/CYKPlusParser/CompletedRuleCollection.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/CompletedRuleCollection.cpp</locationURI>
diff --git a/contrib/other-builds/moses2/.project b/contrib/other-builds/moses2/.project
index 8677885e1..1588c88b6 100644
--- a/contrib/other-builds/moses2/.project
+++ b/contrib/other-builds/moses2/.project
@@ -358,6 +358,26 @@
<locationURI>PARENT-3-PROJECT_LOC/moses2/FF/Distortion.h</locationURI>
</link>
<link>
+ <name>FF/ExampleStatefulFF.cpp</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatefulFF.cpp</locationURI>
+ </link>
+ <link>
+ <name>FF/ExampleStatefulFF.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatefulFF.h</locationURI>
+ </link>
+ <link>
+ <name>FF/ExampleStatelessFF.cpp</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatelessFF.cpp</locationURI>
+ </link>
+ <link>
+ <name>FF/ExampleStatelessFF.h</name>
+ <type>1</type>
+ <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatelessFF.h</locationURI>
+ </link>
+ <link>
<name>FF/FFState.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses2/FF/FFState.cpp</locationURI>
@@ -428,26 +448,6 @@
<locationURI>PARENT-3-PROJECT_LOC/moses2/FF/PointerState.h</locationURI>
</link>
<link>
- <name>FF/SkeletonStatefulFF.cpp</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/SkeletonStatefulFF.cpp</locationURI>
- </link>
- <link>
- <name>FF/SkeletonStatefulFF.h</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/SkeletonStatefulFF.h</locationURI>
- </link>
- <link>
- <name>FF/SkeletonStatelessFF.cpp</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/SkeletonStatelessFF.cpp</locationURI>
- </link>
- <link>
- <name>FF/SkeletonStatelessFF.h</name>
- <type>1</type>
- <locationURI>PARENT-3-PROJECT_LOC/moses2/FF/SkeletonStatelessFF.h</locationURI>
- </link>
- <link>
<name>FF/StatefulFeatureFunction.cpp</name>
<type>1</type>
<locationURI>PARENT-3-PROJECT_LOC/moses2/FF/StatefulFeatureFunction.cpp</locationURI>
diff --git a/moses/FF/SkeletonStatefulFF.cpp b/moses/FF/ExampleStatefulFF.cpp
index 2acaf2d2e..5a53c4f87 100644
--- a/moses/FF/SkeletonStatefulFF.cpp
+++ b/moses/FF/ExampleStatefulFF.cpp
@@ -1,5 +1,5 @@
#include <vector>
-#include "SkeletonStatefulFF.h"
+#include "ExampleStatefulFF.h"
#include "moses/ScoreComponentCollection.h"
#include "moses/Hypothesis.h"
@@ -9,7 +9,7 @@ namespace Moses
{
////////////////////////////////////////////////////////////////
-SkeletonStatefulFF::SkeletonStatefulFF(const std::string &line)
+ExampleStatefulFF::ExampleStatefulFF(const std::string &line)
:StatefulFeatureFunction(3, line)
{
ReadParameters();
@@ -19,7 +19,7 @@ SkeletonStatefulFF::SkeletonStatefulFF(const std::string &line)
// An empty implementation of this function is provided by StatefulFeatureFunction.
// Unless you are actually implementing this, please remove it from your
// implementation (and the declaration in the header file to reduce code clutter.
-void SkeletonStatefulFF::EvaluateInIsolation(const Phrase &source
+void ExampleStatefulFF::EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection &estimatedScores) const
@@ -28,7 +28,7 @@ void SkeletonStatefulFF::EvaluateInIsolation(const Phrase &source
// An empty implementation of this function is provided by StatefulFeatureFunction.
// Unless you are actually implementing this, please remove it from your
// implementation (and the declaration in the header file to reduce code clutter.
-void SkeletonStatefulFF::EvaluateWithSourceContext(const InputType &input
+void ExampleStatefulFF::EvaluateWithSourceContext(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, const StackVec *stackVec
@@ -39,11 +39,11 @@ void SkeletonStatefulFF::EvaluateWithSourceContext(const InputType &input
// An empty implementation of this function is provided by StatefulFeatureFunction.
// Unless you are actually implementing this, please remove it from your
// implementation (and the declaration in the header file to reduce code clutter.
-void SkeletonStatefulFF::EvaluateTranslationOptionListWithSourceContext
+void ExampleStatefulFF::EvaluateTranslationOptionListWithSourceContext
(const InputType &input, const TranslationOptionList &translationOptionList) const
{}
-FFState* SkeletonStatefulFF::EvaluateWhenApplied(
+FFState* ExampleStatefulFF::EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,
ScoreComponentCollection* accumulator) const
@@ -59,18 +59,18 @@ FFState* SkeletonStatefulFF::EvaluateWhenApplied(
accumulator->PlusEquals(this, "sparse-name", 2.4);
// int targetLen = cur_hypo.GetCurrTargetPhrase().GetSize(); // ??? [UG]
- return new SkeletonState(0);
+ return new ExampleState(0);
}
-FFState* SkeletonStatefulFF::EvaluateWhenApplied(
+FFState* ExampleStatefulFF::EvaluateWhenApplied(
const ChartHypothesis& /* cur_hypo */,
int /* featureID - used to index the state in the previous hypotheses */,
ScoreComponentCollection* accumulator) const
{
- return new SkeletonState(0);
+ return new ExampleState(0);
}
-void SkeletonStatefulFF::SetParameter(const std::string& key, const std::string& value)
+void ExampleStatefulFF::SetParameter(const std::string& key, const std::string& value)
{
if (key == "arg") {
// set value here
diff --git a/moses/FF/SkeletonStatefulFF.h b/moses/FF/ExampleStatefulFF.h
index 7544ddd30..d66274295 100644
--- a/moses/FF/SkeletonStatefulFF.h
+++ b/moses/FF/ExampleStatefulFF.h
@@ -7,11 +7,11 @@
namespace Moses
{
-class SkeletonState : public FFState
+class ExampleState : public FFState
{
int m_targetLen;
public:
- SkeletonState(int targetLen)
+ ExampleState(int targetLen)
:m_targetLen(targetLen) {
}
@@ -19,22 +19,22 @@ public:
return (size_t) m_targetLen;
}
virtual bool operator==(const FFState& o) const {
- const SkeletonState& other = static_cast<const SkeletonState&>(o);
+ const ExampleState& other = static_cast<const ExampleState&>(o);
return m_targetLen == other.m_targetLen;
}
};
-class SkeletonStatefulFF : public StatefulFeatureFunction
+class ExampleStatefulFF : public StatefulFeatureFunction
{
public:
- SkeletonStatefulFF(const std::string &line);
+ ExampleStatefulFF(const std::string &line);
bool IsUseable(const FactorMask &mask) const {
return true;
}
virtual const FFState* EmptyHypothesisState(const InputType &input) const {
- return new SkeletonState(0);
+ return new ExampleState(0);
}
// An empty implementation of this function is provided by StatefulFeatureFunction.
diff --git a/moses/FF/SkeletonStatelessFF.cpp b/moses/FF/ExampleStatelessFF.cpp
index 8474efe76..0e62ad0ad 100644
--- a/moses/FF/SkeletonStatelessFF.cpp
+++ b/moses/FF/ExampleStatelessFF.cpp
@@ -1,5 +1,5 @@
#include <vector>
-#include "SkeletonStatelessFF.h"
+#include "ExampleStatelessFF.h"
#include "moses/ScoreComponentCollection.h"
#include "moses/TargetPhrase.h"
@@ -7,13 +7,13 @@ using namespace std;
namespace Moses
{
-SkeletonStatelessFF::SkeletonStatelessFF(const std::string &line)
+ExampleStatelessFF::ExampleStatelessFF(const std::string &line)
:StatelessFeatureFunction(2, line)
{
ReadParameters();
}
-void SkeletonStatelessFF::EvaluateInIsolation(const Phrase &source
+void ExampleStatelessFF::EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection &estimatedScores) const
@@ -29,7 +29,7 @@ void SkeletonStatelessFF::EvaluateInIsolation(const Phrase &source
}
-void SkeletonStatelessFF::EvaluateWithSourceContext(const InputType &input
+void ExampleStatelessFF::EvaluateWithSourceContext(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, const StackVec *stackVec
@@ -43,20 +43,20 @@ void SkeletonStatelessFF::EvaluateWithSourceContext(const InputType &input
}
}
-void SkeletonStatelessFF::EvaluateTranslationOptionListWithSourceContext(const InputType &input
+void ExampleStatelessFF::EvaluateTranslationOptionListWithSourceContext(const InputType &input
, const TranslationOptionList &translationOptionList) const
{}
-void SkeletonStatelessFF::EvaluateWhenApplied(const Hypothesis& hypo,
+void ExampleStatelessFF::EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}
-void SkeletonStatelessFF::EvaluateWhenApplied(const ChartHypothesis &hypo,
+void ExampleStatelessFF::EvaluateWhenApplied(const ChartHypothesis &hypo,
ScoreComponentCollection* accumulator) const
{}
-void SkeletonStatelessFF::SetParameter(const std::string& key, const std::string& value)
+void ExampleStatelessFF::SetParameter(const std::string& key, const std::string& value)
{
if (key == "arg") {
// set value here
diff --git a/moses/FF/SkeletonStatelessFF.h b/moses/FF/ExampleStatelessFF.h
index 0dc46e214..e1f007d21 100644
--- a/moses/FF/SkeletonStatelessFF.h
+++ b/moses/FF/ExampleStatelessFF.h
@@ -6,10 +6,10 @@
namespace Moses
{
-class SkeletonStatelessFF : public StatelessFeatureFunction
+class ExampleStatelessFF : public StatelessFeatureFunction
{
public:
- SkeletonStatelessFF(const std::string &line);
+ ExampleStatelessFF(const std::string &line);
bool IsUseable(const FactorMask &mask) const {
return true;
diff --git a/moses/FF/SkeletonTranslationOptionListFeature.h b/moses/FF/ExampleTranslationOptionListFeature.h
index e47e691aa..7686eb3ff 100644
--- a/moses/FF/SkeletonTranslationOptionListFeature.h
+++ b/moses/FF/ExampleTranslationOptionListFeature.h
@@ -6,10 +6,10 @@
namespace Moses
{
-class SkeletonTranslationOptionListFeature : public StatelessFeatureFunction
+class ExampleTranslationOptionListFeature : public StatelessFeatureFunction
{
public:
- SkeletonTranslationOptionListFeature(const std::string &line)
+ ExampleTranslationOptionListFeature(const std::string &line)
:StatelessFeatureFunction(1, line) {
ReadParameters();
}
diff --git a/moses/FF/Factory.cpp b/moses/FF/Factory.cpp
index 5d37c4fed..398d6593c 100644
--- a/moses/FF/Factory.cpp
+++ b/moses/FF/Factory.cpp
@@ -65,16 +65,16 @@
#include "SyntaxRHS.h"
#include "DeleteRules.h"
-#include "moses/FF/SkeletonStatelessFF.h"
-#include "moses/FF/SkeletonStatefulFF.h"
-#include "moses/LM/SkeletonLM.h"
-#include "moses/LM/InMemoryPerSentenceOnDemandLM.h"
-#include "moses/FF/SkeletonTranslationOptionListFeature.h"
+#include "moses/FF/ExampleStatelessFF.h"
+#include "moses/FF/ExampleStatefulFF.h"
+#include "moses/LM/ExampleLM.h"
+#include "moses/FF/ExampleTranslationOptionListFeature.h"
#include "moses/LM/BilingualLM.h"
-#include "moses/TranslationModel/SkeletonPT.h"
+#include "moses/TranslationModel/ExamplePT.h"
#include "moses/Syntax/InputWeightFF.h"
#include "moses/Syntax/RuleTableFF.h"
+#include "moses/LM/InMemoryPerSentenceOnDemandLM.h"
#include "moses/FF/EditOps.h"
#include "moses/FF/CorrectionPattern.h"
@@ -297,13 +297,13 @@ FeatureRegistry::FeatureRegistry()
MOSES_FNAME(UnalignedWordCountFeature);
MOSES_FNAME(DeleteRules);
- MOSES_FNAME(SkeletonStatelessFF);
- MOSES_FNAME(SkeletonStatefulFF);
- MOSES_FNAME(SkeletonLM);
- MOSES_FNAME(InMemoryPerSentenceOnDemandLM);
- MOSES_FNAME(SkeletonTranslationOptionListFeature);
- MOSES_FNAME(SkeletonPT);
+ MOSES_FNAME(ExampleStatelessFF);
+ MOSES_FNAME(ExampleStatefulFF);
+ MOSES_FNAME(ExampleLM);
+ MOSES_FNAME(ExampleTranslationOptionListFeature);
+ MOSES_FNAME(ExamplePT);
+ MOSES_FNAME(InMemoryPerSentenceOnDemandLM);
MOSES_FNAME(EditOps);
MOSES_FNAME(CorrectionPattern);
diff --git a/moses/LM/SkeletonLM.cpp b/moses/LM/ExampleLM.cpp
index f944de23a..034afef2e 100644
--- a/moses/LM/SkeletonLM.cpp
+++ b/moses/LM/ExampleLM.cpp
@@ -1,12 +1,12 @@
-#include "SkeletonLM.h"
+#include "ExampleLM.h"
#include "moses/FactorCollection.h"
using namespace std;
namespace Moses
{
-SkeletonLM::SkeletonLM(const std::string &line)
+ExampleLM::ExampleLM(const std::string &line)
:LanguageModelSingleFactor(line)
{
ReadParameters();
@@ -24,11 +24,11 @@ SkeletonLM::SkeletonLM(const std::string &line)
m_sentenceEndWord[m_factorType] = m_sentenceEnd;
}
-SkeletonLM::~SkeletonLM()
+ExampleLM::~ExampleLM()
{
}
-LMResult SkeletonLM::GetValue(const vector<const Word*> &contextFactor, State* finalState) const
+LMResult ExampleLM::GetValue(const vector<const Word*> &contextFactor, State* finalState) const
{
LMResult ret;
ret.score = contextFactor.size();
diff --git a/moses/LM/SkeletonLM.h b/moses/LM/ExampleLM.h
index 988c9def9..292462917 100644
--- a/moses/LM/SkeletonLM.h
+++ b/moses/LM/ExampleLM.h
@@ -7,13 +7,13 @@
namespace Moses
{
-class SkeletonLM : public LanguageModelSingleFactor
+class ExampleLM : public LanguageModelSingleFactor
{
protected:
public:
- SkeletonLM(const std::string &line);
- ~SkeletonLM();
+ ExampleLM(const std::string &line);
+ ~ExampleLM();
virtual LMResult GetValue(const std::vector<const Word*> &contextFactor, State* finalState = 0) const;
};
diff --git a/moses/LM/Jamfile b/moses/LM/Jamfile
index 4eafbd632..0c152d555 100644
--- a/moses/LM/Jamfile
+++ b/moses/LM/Jamfile
@@ -138,7 +138,7 @@ if $(with-dalm) {
#Top-level LM library. If you've added a file that doesn't depend on external
#libraries, put it here.
-alias LM : Backward.cpp BackwardLMState.cpp Base.cpp BilingualLM.cpp Implementation.cpp InMemoryPerSentenceOnDemandLM.cpp Ken.cpp MultiFactor.cpp Remote.cpp SingleFactor.cpp SkeletonLM.cpp
+alias LM : Backward.cpp BackwardLMState.cpp Base.cpp BilingualLM.cpp Implementation.cpp InMemoryPerSentenceOnDemandLM.cpp Ken.cpp MultiFactor.cpp Remote.cpp SingleFactor.cpp ExampleLM.cpp
../../lm//kenlm ..//headers $(dependencies) ;
alias macros : : : : <define>$(lmmacros) ;
diff --git a/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.cpp b/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.cpp
index ca219f249..6c80e30af 100644
--- a/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.cpp
+++ b/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.cpp
@@ -18,7 +18,7 @@
***********************************************************************/
#include <iostream>
-#include "ChartRuleLookupManagerSkeleton.h"
+#include "ChartRuleLookupManagerExample.h"
#include "DotChartInMemory.h"
#include "moses/Util.h"
@@ -29,29 +29,29 @@
#include "moses/NonTerminal.h"
#include "moses/ChartCellCollection.h"
#include "moses/TranslationModel/PhraseDictionaryMemory.h"
-#include "moses/TranslationModel/SkeletonPT.h"
+#include "moses/TranslationModel/ExamplePT.h"
using namespace std;
namespace Moses
{
-ChartRuleLookupManagerSkeleton::ChartRuleLookupManagerSkeleton(
+ChartRuleLookupManagerExample::ChartRuleLookupManagerExample(
const ChartParser &parser,
const ChartCellCollectionBase &cellColl,
- const SkeletonPT &skeletonPt)
+ const ExamplePT &skeletonPt)
: ChartRuleLookupManager(parser, cellColl)
, m_skeletonPT(skeletonPt)
{
- cerr << "starting ChartRuleLookupManagerSkeleton" << endl;
+ cerr << "starting ChartRuleLookupManagerExample" << endl;
}
-ChartRuleLookupManagerSkeleton::~ChartRuleLookupManagerSkeleton()
+ChartRuleLookupManagerExample::~ChartRuleLookupManagerExample()
{
// RemoveAllInColl(m_tpColl);
}
-void ChartRuleLookupManagerSkeleton::GetChartRuleCollection(
+void ChartRuleLookupManagerExample::GetChartRuleCollection(
const InputPath &inputPath,
size_t last,
ChartParserCallback &outColl)
@@ -74,12 +74,12 @@ void ChartRuleLookupManagerSkeleton::GetChartRuleCollection(
}
TargetPhrase *
-ChartRuleLookupManagerSkeleton::
+ChartRuleLookupManagerExample::
CreateTargetPhrase(const Word &sourceWord) const
{
- // create a target phrase from the 1st word of the source, prefix with 'ChartManagerSkeleton:'
+ // create a target phrase from the 1st word of the source, prefix with 'ChartManagerExample:'
string str = sourceWord.GetFactor(0)->GetString().as_string();
- str = "ChartManagerSkeleton:" + str;
+ str = "ChartManagerExample:" + str;
TargetPhrase *tp = new TargetPhrase(&m_skeletonPT);
Word &word = tp->AddWord();
diff --git a/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h b/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h
index d01f3b9bd..3b3f59ace 100644
--- a/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h
+++ b/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h
@@ -29,16 +29,16 @@ class TargetPhraseCollection;
class ChartParserCallback;
class DottedRuleColl;
class Range;
-class SkeletonPT;
+class ExamplePT;
-class ChartRuleLookupManagerSkeleton : public ChartRuleLookupManager
+class ChartRuleLookupManagerExample : public ChartRuleLookupManager
{
public:
- ChartRuleLookupManagerSkeleton(const ChartParser &parser,
- const ChartCellCollectionBase &cellColl,
- const SkeletonPT &skeletonPt);
+ ChartRuleLookupManagerExample(const ChartParser &parser,
+ const ChartCellCollectionBase &cellColl,
+ const ExamplePT &skeletonPt);
- ~ChartRuleLookupManagerSkeleton();
+ ~ChartRuleLookupManagerExample();
virtual void GetChartRuleCollection(
const InputPath &inputPath,
@@ -50,7 +50,7 @@ private:
StackVec m_stackVec;
std::vector<TargetPhraseCollection::shared_ptr > m_tpColl;
- const SkeletonPT &m_skeletonPT;
+ const ExamplePT &m_skeletonPT;
};
} // namespace Moses
diff --git a/moses/TranslationModel/SkeletonPT.cpp b/moses/TranslationModel/ExamplePT.cpp
index 6b42212f9..198ce2814 100644
--- a/moses/TranslationModel/SkeletonPT.cpp
+++ b/moses/TranslationModel/ExamplePT.cpp
@@ -1,29 +1,29 @@
// vim:tabstop=2
-#include "SkeletonPT.h"
-#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h"
+#include "ExamplePT.h"
+#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h"
using namespace std;
namespace Moses
{
-SkeletonPT::SkeletonPT(const std::string &line)
+ExamplePT::ExamplePT(const std::string &line)
: PhraseDictionary(line, true)
{
ReadParameters();
}
-void SkeletonPT::Load(AllOptions::ptr const& opts)
+void ExamplePT::Load(AllOptions::ptr const& opts)
{
m_options = opts;
SetFeaturesToApply();
}
-void SkeletonPT::InitializeForInput(ttasksptr const& ttask)
+void ExamplePT::InitializeForInput(ttasksptr const& ttask)
{
ReduceCache();
}
-void SkeletonPT::GetTargetPhraseCollectionBatch(const InputPathList &inputPathQueue) const
+void ExamplePT::GetTargetPhraseCollectionBatch(const InputPathList &inputPathQueue) const
{
CacheColl &cache = GetCache();
@@ -46,14 +46,14 @@ void SkeletonPT::GetTargetPhraseCollectionBatch(const InputPathList &inputPathQu
}
}
-TargetPhrase *SkeletonPT::CreateTargetPhrase(const Phrase &sourcePhrase) const
+TargetPhrase *ExamplePT::CreateTargetPhrase(const Phrase &sourcePhrase) const
{
- // create a target phrase from the 1st word of the source, prefix with 'SkeletonPT:'
+ // create a target phrase from the 1st word of the source, prefix with 'ExamplePT:'
assert(sourcePhrase.GetSize());
assert(m_output.size() == 1);
string str = sourcePhrase.GetWord(0).GetFactor(0)->GetString().as_string();
- str = "SkeletonPT:" + str;
+ str = "ExamplePT:" + str;
TargetPhrase *tp = new TargetPhrase(this);
Word &word = tp->AddWord();
@@ -69,17 +69,17 @@ TargetPhrase *SkeletonPT::CreateTargetPhrase(const Phrase &sourcePhrase) const
return tp;
}
-ChartRuleLookupManager* SkeletonPT::CreateRuleLookupManager(const ChartParser &parser,
+ChartRuleLookupManager* ExamplePT::CreateRuleLookupManager(const ChartParser &parser,
const ChartCellCollectionBase &cellCollection,
std::size_t /*maxChartSpan*/)
{
- return new ChartRuleLookupManagerSkeleton(parser, cellCollection, *this);
+ return new ChartRuleLookupManagerExample(parser, cellCollection, *this);
}
-TO_STRING_BODY(SkeletonPT);
+TO_STRING_BODY(ExamplePT);
// friend
-ostream& operator<<(ostream& out, const SkeletonPT& phraseDict)
+ostream& operator<<(ostream& out, const ExamplePT& phraseDict)
{
return out;
}
diff --git a/moses/TranslationModel/SkeletonPT.h b/moses/TranslationModel/ExamplePT.h
index 443f1cc8e..6ec7764c9 100644
--- a/moses/TranslationModel/SkeletonPT.h
+++ b/moses/TranslationModel/ExamplePT.h
@@ -9,12 +9,12 @@ class ChartParser;
class ChartCellCollectionBase;
class ChartRuleLookupManager;
-class SkeletonPT : public PhraseDictionary
+class ExamplePT : public PhraseDictionary
{
- friend std::ostream& operator<<(std::ostream&, const SkeletonPT&);
+ friend std::ostream& operator<<(std::ostream&, const ExamplePT&);
public:
- SkeletonPT(const std::string &line);
+ ExamplePT(const std::string &line);
void Load(AllOptions::ptr const& opts);
diff --git a/moses/TranslationModel/PhraseDictionaryMemoryPerSentence.cpp b/moses/TranslationModel/PhraseDictionaryMemoryPerSentence.cpp
index 36a28089b..fc62f0679 100644
--- a/moses/TranslationModel/PhraseDictionaryMemoryPerSentence.cpp
+++ b/moses/TranslationModel/PhraseDictionaryMemoryPerSentence.cpp
@@ -1,6 +1,6 @@
// vim:tabstop=2
#include "PhraseDictionaryMemoryPerSentence.h"
-#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h"
+#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h"
using namespace std;
diff --git a/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp b/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp
index 072e482de..acf834cbd 100644
--- a/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp
+++ b/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp
@@ -1,6 +1,5 @@
// vim:tabstop=2
#include "PhraseDictionaryMemoryPerSentenceOnDemand.h"
-#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h"
#include <sstream>
using namespace std;
diff --git a/moses/TranslationModel/PhraseDictionaryTransliteration.cpp b/moses/TranslationModel/PhraseDictionaryTransliteration.cpp
index 3d1664822..2ffe880c7 100644
--- a/moses/TranslationModel/PhraseDictionaryTransliteration.cpp
+++ b/moses/TranslationModel/PhraseDictionaryTransliteration.cpp
@@ -2,7 +2,6 @@
#include <cstdlib>
#include "PhraseDictionaryTransliteration.h"
-#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h"
#include "moses/DecodeGraph.h"
#include "moses/DecodeStep.h"
#include "util/tempfile.hh"
diff --git a/moses/TranslationModel/ProbingPT.cpp b/moses/TranslationModel/ProbingPT.cpp
index c513b7808..dca7835f5 100644
--- a/moses/TranslationModel/ProbingPT.cpp
+++ b/moses/TranslationModel/ProbingPT.cpp
@@ -4,7 +4,6 @@
#include "moses/FactorCollection.h"
#include "moses/TargetPhraseCollection.h"
#include "moses/InputFileStream.h"
-#include "moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h"
#include "probingpt/querying.h"
#include "probingpt/probing_hash_utils.h"
diff --git a/moses2/FF/SkeletonStatefulFF.cpp b/moses2/FF/ExampleStatefulFF.cpp
index c4c2b7329..86b364f53 100644
--- a/moses2/FF/SkeletonStatefulFF.cpp
+++ b/moses2/FF/ExampleStatefulFF.cpp
@@ -1,11 +1,11 @@
/*
- * SkeletonStatefulFF.cpp
+ * ExampleStatefulFF.cpp
*
* Created on: 27 Oct 2015
* Author: hieu
*/
#include <sstream>
-#include "SkeletonStatefulFF.h"
+#include "ExampleStatefulFF.h"
#include "../PhraseBased/Manager.h"
#include "../PhraseBased/Hypothesis.h"
@@ -14,12 +14,12 @@ using namespace std;
namespace Moses2
{
-class SkeletonState: public FFState
+class ExampleState: public FFState
{
public:
int targetLen;
- SkeletonState() {
+ ExampleState() {
// uninitialised
}
@@ -27,7 +27,7 @@ public:
return (size_t) targetLen;
}
virtual bool operator==(const FFState& o) const {
- const SkeletonState& other = static_cast<const SkeletonState&>(o);
+ const ExampleState& other = static_cast<const ExampleState&>(o);
return targetLen == other.targetLen;
}
@@ -40,52 +40,52 @@ public:
};
////////////////////////////////////////////////////////////////////////////////////////
-SkeletonStatefulFF::SkeletonStatefulFF(size_t startInd, const std::string &line) :
+ExampleStatefulFF::ExampleStatefulFF(size_t startInd, const std::string &line) :
StatefulFeatureFunction(startInd, line)
{
ReadParameters();
}
-SkeletonStatefulFF::~SkeletonStatefulFF()
+ExampleStatefulFF::~ExampleStatefulFF()
{
// TODO Auto-generated destructor stub
}
-FFState* SkeletonStatefulFF::BlankState(MemPool &pool, const System &sys) const
+FFState* ExampleStatefulFF::BlankState(MemPool &pool, const System &sys) const
{
- return new (pool.Allocate<SkeletonState>()) SkeletonState();
+ return new (pool.Allocate<ExampleState>()) ExampleState();
}
-void SkeletonStatefulFF::EmptyHypothesisState(FFState &state,
+void ExampleStatefulFF::EmptyHypothesisState(FFState &state,
const ManagerBase &mgr, const InputType &input,
const Hypothesis &hypo) const
{
- SkeletonState &stateCast = static_cast<SkeletonState&>(state);
+ ExampleState &stateCast = static_cast<ExampleState&>(state);
stateCast.targetLen = 0;
}
-void SkeletonStatefulFF::EvaluateInIsolation(MemPool &pool,
+void ExampleStatefulFF::EvaluateInIsolation(MemPool &pool,
const System &system, const Phrase<Moses2::Word> &source,
const TargetPhraseImpl &targetPhrase, Scores &scores,
SCORE &estimatedScore) const
{
}
-void SkeletonStatefulFF::EvaluateInIsolation(MemPool &pool, const System &system, const Phrase<SCFG::Word> &source,
+void ExampleStatefulFF::EvaluateInIsolation(MemPool &pool, const System &system, const Phrase<SCFG::Word> &source,
const TargetPhrase<SCFG::Word> &targetPhrase, Scores &scores,
SCORE &estimatedScore) const
{
}
-void SkeletonStatefulFF::EvaluateWhenApplied(const ManagerBase &mgr,
+void ExampleStatefulFF::EvaluateWhenApplied(const ManagerBase &mgr,
const Hypothesis &hypo, const FFState &prevState, Scores &scores,
FFState &state) const
{
- SkeletonState &stateCast = static_cast<SkeletonState&>(state);
+ ExampleState &stateCast = static_cast<ExampleState&>(state);
stateCast.targetLen = hypo.GetTargetPhrase().GetSize();
}
-void SkeletonStatefulFF::EvaluateWhenApplied(const SCFG::Manager &mgr,
+void ExampleStatefulFF::EvaluateWhenApplied(const SCFG::Manager &mgr,
const SCFG::Hypothesis &hypo, int featureID, Scores &scores,
FFState &state) const
{
diff --git a/moses2/FF/SkeletonStatefulFF.h b/moses2/FF/ExampleStatefulFF.h
index 79256f2b3..437f54515 100644
--- a/moses2/FF/SkeletonStatefulFF.h
+++ b/moses2/FF/ExampleStatefulFF.h
@@ -1,23 +1,22 @@
/*
- * SkeletonStatefulFF.h
+ * ExampleStatefulFF.h
*
* Created on: 27 Oct 2015
* Author: hieu
*/
-#ifndef SKELETONSTATEFULFF_H_
-#define SKELETONSTATEFULFF_H_
+#pragma once
#include "StatefulFeatureFunction.h"
namespace Moses2
{
-class SkeletonStatefulFF: public StatefulFeatureFunction
+class ExampleStatefulFF: public StatefulFeatureFunction
{
public:
- SkeletonStatefulFF(size_t startInd, const std::string &line);
- virtual ~SkeletonStatefulFF();
+ ExampleStatefulFF(size_t startInd, const std::string &line);
+ virtual ~ExampleStatefulFF();
virtual FFState* BlankState(MemPool &pool, const System &sys) const;
virtual void EmptyHypothesisState(FFState &state, const ManagerBase &mgr,
@@ -45,4 +44,3 @@ public:
}
-#endif /* SKELETONSTATEFULFF_H_ */
diff --git a/moses2/FF/SkeletonStatelessFF.cpp b/moses2/FF/ExampleStatelessFF.cpp
index 4875f155d..29716aaf8 100644
--- a/moses2/FF/SkeletonStatelessFF.cpp
+++ b/moses2/FF/ExampleStatelessFF.cpp
@@ -6,31 +6,31 @@
*/
#include "../Scores.h"
-#include "SkeletonStatelessFF.h"
+#include "ExampleStatelessFF.h"
namespace Moses2
{
-SkeletonStatelessFF::SkeletonStatelessFF(size_t startInd,
- const std::string &line) :
+ExampleStatelessFF::ExampleStatelessFF(size_t startInd,
+ const std::string &line) :
StatelessFeatureFunction(startInd, line)
{
ReadParameters();
}
-SkeletonStatelessFF::~SkeletonStatelessFF()
+ExampleStatelessFF::~ExampleStatelessFF()
{
// TODO Auto-generated destructor stub
}
-void SkeletonStatelessFF::EvaluateInIsolation(MemPool &pool,
+void ExampleStatelessFF::EvaluateInIsolation(MemPool &pool,
const System &system, const Phrase<Moses2::Word> &source,
const TargetPhraseImpl &targetPhrase, Scores &scores,
SCORE &estimatedScore) const
{
}
-void SkeletonStatelessFF::EvaluateInIsolation(MemPool &pool, const System &system, const Phrase<SCFG::Word> &source,
+void ExampleStatelessFF::EvaluateInIsolation(MemPool &pool, const System &system, const Phrase<SCFG::Word> &source,
const TargetPhrase<SCFG::Word> &targetPhrase, Scores &scores,
SCORE &estimatedScore) const
{
diff --git a/moses2/FF/SkeletonStatelessFF.h b/moses2/FF/ExampleStatelessFF.h
index f7e95005f..20b1acaaf 100644
--- a/moses2/FF/SkeletonStatelessFF.h
+++ b/moses2/FF/ExampleStatelessFF.h
@@ -12,11 +12,11 @@
namespace Moses2
{
-class SkeletonStatelessFF: public StatelessFeatureFunction
+class ExampleStatelessFF: public StatelessFeatureFunction
{
public:
- SkeletonStatelessFF(size_t startInd, const std::string &line);
- virtual ~SkeletonStatelessFF();
+ ExampleStatelessFF(size_t startInd, const std::string &line);
+ virtual ~ExampleStatelessFF();
virtual void
EvaluateInIsolation(MemPool &pool, const System &system, const Phrase<Moses2::Word> &source,
diff --git a/moses2/FF/FeatureRegistry.cpp b/moses2/FF/FeatureRegistry.cpp
index f7eae4205..3947d58c0 100644
--- a/moses2/FF/FeatureRegistry.cpp
+++ b/moses2/FF/FeatureRegistry.cpp
@@ -16,8 +16,8 @@
#include "WordPenalty.h"
#include "OSM/OpSequenceModel.h"
-#include "SkeletonStatefulFF.h"
-#include "SkeletonStatelessFF.h"
+#include "ExampleStatefulFF.h"
+#include "ExampleStatelessFF.h"
using namespace std;
@@ -70,8 +70,8 @@ FeatureRegistry::FeatureRegistry()
MOSES_FNAME(WordPenalty);
MOSES_FNAME(OpSequenceModel);
- MOSES_FNAME(SkeletonStatefulFF);
- MOSES_FNAME(SkeletonStatelessFF);
+ MOSES_FNAME(ExampleStatefulFF);
+ MOSES_FNAME(ExampleStatelessFF);
}
FeatureRegistry::~FeatureRegistry()
diff --git a/moses2/Jamfile b/moses2/Jamfile
index 886e81d8c..42676c065 100644
--- a/moses2/Jamfile
+++ b/moses2/Jamfile
@@ -47,8 +47,8 @@ alias deps : ..//z ..//boost_iostreams ..//boost_filesystem : : : $(max-factors
FF/FeatureFunctions.cpp
FF/FeatureRegistry.cpp
FF/PhrasePenalty.cpp
- FF/SkeletonStatefulFF.cpp
- FF/SkeletonStatelessFF.cpp
+ FF/ExampleStatefulFF.cpp
+ FF/ExampleStatelessFF.cpp
FF/StatefulFeatureFunction.cpp
FF/StatelessFeatureFunction.cpp
FF/WordPenalty.cpp
diff --git a/scripts/ems/experiment.meta b/scripts/ems/experiment.meta
index d6e6dc133..4c0a9794e 100644
--- a/scripts/ems/experiment.meta
+++ b/scripts/ems/experiment.meta
@@ -969,21 +969,6 @@ parse-input-devtest
pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
ignore-unless: use-mira
template: $input-parser < IN > OUT
-parse-relax-input
- in: split-input
- out: input
- default-name: tuning/input.parse-relaxed
- pass-unless: input-parse-relaxer
- pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
- template: $input-parse-relaxer < IN > OUT
-parse-relax-input-devtest
- in: split-input-devtest
- out: input-devtest
- default-name: tuning/input.devtest.parse-relaxed
- pass-unless: input-parse-relaxer
- pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
- ignore-unless: use-mira
- template: $input-parse-relaxer < IN > OUT
factorize-input
in: parsed-input
out: factorized-input
@@ -1059,6 +1044,21 @@ split-input-devtest
pass-unless: input-splitter
ignore-unless: use-mira
template: $input-splitter -model IN1.$input-extension < IN > OUT
+parse-relax-input
+ in: split-input
+ out: input
+ default-name: tuning/input.parse-relaxed
+ pass-unless: input-parse-relaxer
+ pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
+ template: $input-parse-relaxer < IN > OUT
+parse-relax-input-devtest
+ in: split-input-devtest
+ out: input-devtest
+ default-name: tuning/input.devtest.parse-relaxed
+ pass-unless: input-parse-relaxer
+ pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
+ ignore-unless: use-mira
+ template: $input-parse-relaxer < IN > OUT
reference-from-sgm
in: reference-sgm input-sgm
out: raw-reference
@@ -1252,20 +1252,6 @@ mock-parse-input
default-name: evaluation/input.mock-parsed
pass-unless: mock-input-parser-devtesteval
template: $mock-input-parser-devtesteval < IN > OUT
-parse-input
- in: mock-parsed-input
- out: parsed-input
- default-name: evaluation/input.parsed
- pass-unless: input-parser
- pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
- template: $input-parser < IN > OUT
-parse-relax-input
- in: split-input
- out: input
- default-name: evaluation/input.parse-relaxed
- pass-unless: input-parse-relaxer
- pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
- template: $input-parse-relaxer < IN > OUT
factorize-input
in: parsed-input
out: factorized-input
@@ -1303,6 +1289,20 @@ split-input
default-name: evaluation/input.split
pass-unless: input-splitter
template: $input-splitter -model IN1.$input-extension < IN > OUT
+parse-input
+ in: mock-parsed-input
+ out: parsed-input
+ default-name: evaluation/input.parsed
+ pass-unless: input-parser
+ pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
+ template: $input-parser < IN > OUT
+parse-relax-input
+ in: split-input
+ out: input
+ default-name: evaluation/input.parse-relaxed
+ pass-unless: input-parse-relaxer
+ pass-if: skip-parse-input-devtesteval mock-input-parser-devtesteval
+ template: $input-parse-relaxer < IN > OUT
filter
in: input TRAINING:sigtest-filter-phrase-translation-table TRAINING:sigtest-filter-reordering-table TRAINING:corpus-mml-prefilter=OR=TRAINING:corpus-mml-postfilter=OR=TRAINING:domains TRAINING:transliteration-table
out: filtered-dir
diff --git a/scripts/training/rdlm/train_rdlm.py b/scripts/training/rdlm/train_rdlm.py
index 289ab405c..7915e454c 100755
--- a/scripts/training/rdlm/train_rdlm.py
+++ b/scripts/training/rdlm/train_rdlm.py
@@ -102,6 +102,11 @@ parser.add_argument(
parser.add_argument(
"--mmap", dest="mmap", action="store_true",
help="Use memory-mapped file (for lower memory consumption).")
+parser.add_argument(
+ "--train-host", dest="train_host",
+ help="Execute nplm training on this host, via ssh")
+parser.add_argument("--extra-settings", dest="extra_settings",
+ help="Extra settings to be passed to NPLM")
parser.set_defaults(