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:
authorMatthias Huck <mhuck@inf.ed.ac.uk>2015-12-14 22:19:51 +0300
committerMatthias Huck <mhuck@inf.ed.ac.uk>2015-12-14 22:19:51 +0300
commitb0c208cdf87bb5745c94d94001422b10ae58f2df (patch)
tree6daeebec8923b9a236bad11db4051d420331c433 /phrase-extract
parent375d9f7cc8561ed13f4ffdfa58111686dc961cb4 (diff)
Hiero phrase orientation bug fix
Diffstat (limited to 'phrase-extract')
-rw-r--r--phrase-extract/extract-rules-main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/phrase-extract/extract-rules-main.cpp b/phrase-extract/extract-rules-main.cpp
index 62dbbbf0e..aa2b1d311 100644
--- a/phrase-extract/extract-rules-main.cpp
+++ b/phrase-extract/extract-rules-main.cpp
@@ -767,6 +767,15 @@ void ExtractTask::saveHieroPhrase( int startT, int endT, int startS, int endS
}
}
+ // phrase orientation (lexicalized reordering model)
+ if (m_options.phraseOrientation) {
+ rule.l2rOrientation = m_phraseOrientation.GetOrientationInfo(startS,endS,PhraseOrientation::REO_DIR_L2R);
+ rule.r2lOrientation = m_phraseOrientation.GetOrientationInfo(startS,endS,PhraseOrientation::REO_DIR_R2L);
+ // std::cerr << "span " << startS << " " << endS << std::endl;
+ // std::cerr << "phraseOrientationL2R " << m_phraseOrientation.GetOrientationInfo(startS,endS,PhraseOrientation::REO_DIR_L2R) << std::endl;
+ // std::cerr << "phraseOrientationR2L " << m_phraseOrientation.GetOrientationInfo(startS,endS,PhraseOrientation::REO_DIR_R2L) << std::endl;
+ }
+
addRuleToCollection( rule );
}