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
path: root/moses/PP
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2014-06-13 20:42:13 +0400
committerHieu Hoang <hieu@hoang.co.uk>2014-06-13 20:42:13 +0400
commitcef8fd3b723aa584be9a21613ac97b537e9f1c64 (patch)
tree29c9cfd0a6fce435ebedb05b736b3b95894157e1 /moses/PP
parent5c5770266461a6189d9e890deaf950b9ca002c7d (diff)
merge
Diffstat (limited to 'moses/PP')
-rw-r--r--moses/PP/SpanLengthPhraseProperty.cpp11
-rw-r--r--moses/PP/SpanLengthPhraseProperty.h4
2 files changed, 10 insertions, 5 deletions
diff --git a/moses/PP/SpanLengthPhraseProperty.cpp b/moses/PP/SpanLengthPhraseProperty.cpp
index 4bc29713a..d45c7b919 100644
--- a/moses/PP/SpanLengthPhraseProperty.cpp
+++ b/moses/PP/SpanLengthPhraseProperty.cpp
@@ -6,8 +6,11 @@ using namespace std;
namespace Moses
{
-SpanLengthPhraseProperty::SpanLengthPhraseProperty(const std::string &value)
-: PhraseProperty(value)
+SpanLengthPhraseProperty::SpanLengthPhraseProperty()
+{
+}
+
+void SpanLengthPhraseProperty::ProcessValue(const std::string &value)
{
vector<string> toks;
Tokenize(toks, value);
@@ -24,9 +27,9 @@ SpanLengthPhraseProperty::SpanLengthPhraseProperty(const std::string &value)
if (toks.size() == 1) {
float count = Scan<float>(toks[0]);
- Populate(indices, count);
+ Populate(indices, count);
- indices.clear();
+ indices.clear();
}
else {
indices.insert(toks);
diff --git a/moses/PP/SpanLengthPhraseProperty.h b/moses/PP/SpanLengthPhraseProperty.h
index 44f972005..982c3ca0d 100644
--- a/moses/PP/SpanLengthPhraseProperty.h
+++ b/moses/PP/SpanLengthPhraseProperty.h
@@ -13,7 +13,9 @@ namespace Moses
class SpanLengthPhraseProperty : public PhraseProperty
{
public:
- SpanLengthPhraseProperty(const std::string &value);
+ SpanLengthPhraseProperty();
+
+ void ProcessValue(const std::string &value);
float GetProb(size_t ntInd, size_t sourceWidth, float smoothing) const;
protected: