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:
authorMichaelAuli <MichaelAuli@1f5c12ca-751b-0410-a591-d2e778427230>2008-11-05 13:34:34 +0300
committerMichaelAuli <MichaelAuli@1f5c12ca-751b-0410-a591-d2e778427230>2008-11-05 13:34:34 +0300
commitcf4f5018c5cb75d3ab3fd5b621b9136c68cd7650 (patch)
treed91ff5ddd12fe890a3b2deb1d3ebf217f0ceb8a4
parentdf8fb77e7c84513dc88b38faf0064d368e6e9cd5 (diff)
undo translationoption changesauli_constraint
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/auli_constraint@1936 1f5c12ca-751b-0410-a591-d2e778427230
-rw-r--r--moses/src/Manager.cpp4
-rw-r--r--moses/src/TranslationOptionCollection.h16
2 files changed, 8 insertions, 12 deletions
diff --git a/moses/src/Manager.cpp b/moses/src/Manager.cpp
index 3e208a1af..6443e2c15 100644
--- a/moses/src/Manager.cpp
+++ b/moses/src/Manager.cpp
@@ -86,15 +86,11 @@ void Manager::ProcessSentence()
const vector <DecodeGraph*>
&decodeStepVL = staticData.GetDecodeStepVL();
- long sentenceID = m_source.GetTranslationId();
- m_constraint = staticData.GetConstrainingPhrase(sentenceID);
-
// create list of all possible translations
// this is only valid if:
// 1. generation of source sentence is not done 1st
// 2. initial hypothesis factors are given in the sentence
//CreateTranslationOptions(m_source, phraseDictionary, lmListInitial);
-// m_transOptColl->CreateTranslationOptions(decodeStepVL, m_constraint);
m_transOptColl->CreateTranslationOptions(decodeStepVL);
m_search->ProcessSentence();
}
diff --git a/moses/src/TranslationOptionCollection.h b/moses/src/TranslationOptionCollection.h
index 9e65d81fc..cc4c86e00 100644
--- a/moses/src/TranslationOptionCollection.h
+++ b/moses/src/TranslationOptionCollection.h
@@ -47,7 +47,7 @@ class Word;
* all lead to the same decoding algorithm: hypotheses are expanded
* by applying phrase translations, which can be precomputed.
*
- * The precomputation of a collection of instances of such TranslationOption
+ * The precomputation of a collection of instances of such TranslationOption
* depends on the input condition, but they all are presented to
* decoding algorithm in the same form, using this class.
*
@@ -67,9 +67,9 @@ protected:
SquareMatrix m_futureScore; /*< matrix of future costs for contiguous parts (span) of the input */
const size_t m_maxNoTransOptPerCoverage; /*< maximum number of translation options per input span (phrase???) */
std::vector<Phrase*> m_unksrcs;
-
+
TranslationOptionCollection(InputType const& src, size_t maxNoTransOptPerCoverage);
-
+
void CalcFutureScore();
//! Force a creation of a translation option where there are none for a particular source position.
@@ -119,18 +119,18 @@ public:
//! Create all possible translations from the phrase tables
virtual void CreateTranslationOptions(const std::vector <DecodeGraph*> &decodeStepVL);
- //! Create translation options that exactly cover a specific input span.
+ //! Create translation options that exactly cover a specific input span.
virtual void CreateTranslationOptionsForRange(const DecodeGraph &decodeStepList
, size_t startPosition
, size_t endPosition
, bool adhereTableLimit);
-
+
//!Check if this range has XML options
virtual bool HasXmlOptionsOverlappingRange(size_t startPosition, size_t endPosition) const;
-
+
//! Create xml-based translation options for the specific input span
virtual void CreateXmlOptionsForRange(size_t startPosition, size_t endPosition);
-
+
//! returns future cost matrix for sentence
inline virtual const SquareMatrix &GetFutureScore() const
@@ -144,7 +144,7 @@ public:
return GetTranslationOptionList(coverage.GetStartPos(), coverage.GetEndPos());
}
- TO_STRING();
+ TO_STRING();
};
}