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-07-26 22:39:10 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-07-26 22:39:10 +0400
commit0b23a0e327f71aea3b51f21e577d83dbcf1dc556 (patch)
tree03fdb75b45fd16467111a045bc5c1ebaea1e7a05 /moses/InputPath.cpp
parent9e8402deddd7b0da030b36d4f05c8156f8e64e16 (diff)
rollback excluding translation options that have incompatible alignments for placeholders. This should be exclude at the training step
Diffstat (limited to 'moses/InputPath.cpp')
-rw-r--r--moses/InputPath.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/moses/InputPath.cpp b/moses/InputPath.cpp
index f054d4aaf..cbc581b52 100644
--- a/moses/InputPath.cpp
+++ b/moses/InputPath.cpp
@@ -55,30 +55,8 @@ void InputPath::SetTargetPhrases(const PhraseDictionary &phraseDictionary
, const TargetPhraseCollection *targetPhrases
, const void *ptNode)
{
- FactorType placeholderFactor = StaticData::Instance().GetPlaceholderFactor().first;
- if (targetPhrases == NULL || placeholderFactor == NOT_FOUND || m_placeholders.size() == 0) {
- // use all of the target phrase given
- std::pair<const TargetPhraseCollection*, const void*> value(targetPhrases, ptNode);
- m_targetPhrases[&phraseDictionary] = value;
- } else {
- // filter out target phrases with alignments that are not 1-to-1 with placeholder
- m_copiedSet.push_back(TargetPhraseCollection());
- TargetPhraseCollection &newTargetPhrases = m_copiedSet.back();
- std::pair<const TargetPhraseCollection*, const void*> value(&newTargetPhrases, ptNode);
- m_targetPhrases[&phraseDictionary] = value;
-
- TargetPhraseCollection::const_iterator iter;
- for (iter = targetPhrases->begin(); iter != targetPhrases->end(); ++iter) {
- TargetPhrase *targetPhrase = new TargetPhrase(**iter);
- bool ok = SetPlaceholders(targetPhrase);
-
- if (ok) {
- newTargetPhrases.Add(targetPhrase);
- } else {
- delete targetPhrase;
- }
- }
- }
+ std::pair<const TargetPhraseCollection*, const void*> value(targetPhrases, ptNode);
+ m_targetPhrases[&phraseDictionary] = value;
}
bool InputPath::SetPlaceholders(TargetPhrase *targetPhrase) const