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 <hieu@hoang.co.uk>2013-08-07 17:35:40 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-08-07 17:35:40 +0400
commitb3a860fd4fdc003c7dbb32dea4321c7cf0671825 (patch)
tree5e93f9e0685d79b98eb6339c69e7a3148fb471b1 /moses/TargetPhraseCollection.cpp
parent441acf15e6a96f7d063d9b14bde2ee502e758c58 (diff)
get ready to delete source phrase from TargetPhrase class
Diffstat (limited to 'moses/TargetPhraseCollection.cpp')
-rw-r--r--moses/TargetPhraseCollection.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/moses/TargetPhraseCollection.cpp b/moses/TargetPhraseCollection.cpp
index 9a28dbd5d..cb591e935 100644
--- a/moses/TargetPhraseCollection.cpp
+++ b/moses/TargetPhraseCollection.cpp
@@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <algorithm>
#include "TargetPhraseCollection.h"
+#include "util/exception.hh"
using namespace std;
@@ -84,6 +85,18 @@ std::ostream& operator<<(std::ostream &out, const TargetPhraseCollection &obj)
return out;
}
+
+void TargetPhraseCollectionWithSourcePhrase::Add(TargetPhrase *targetPhrase)
+{
+ UTIL_THROW(util::Exception, "Must use method Add(TargetPhrase*, const Phrase&)");
+}
+
+void TargetPhraseCollectionWithSourcePhrase::Add(TargetPhrase *targetPhrase, const Phrase &sourcePhrase)
+{
+ m_collection.push_back(targetPhrase);
+ m_sourcePhrases.push_back(sourcePhrase);
+ }
+
} // namespace