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-26 15:27:32 +0300
committerHieu Hoang <hieuhoang@gmail.com>2017-04-26 15:27:32 +0300
commit6ca7ba5de1ea93dd7ee04f3060614d5152a29c2d (patch)
tree39a15f91d27960d14af5e5c204f8410da11640b3
parentd3106b9d5af610c9294aa63226c978974ee96c92 (diff)
moses2 rename Skeleton... to Example...
-rw-r--r--contrib/other-builds/moses2/.project40
-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)10
-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
7 files changed, 55 insertions, 57 deletions
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/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..ab6260034 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,
+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