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>2016-01-06 21:52:14 +0300
committerMatthias Huck <mhuck@inf.ed.ac.uk>2016-01-06 21:52:14 +0300
commitdda3f1867c3011ef1dd9f8a9222ce03c562da59c (patch)
tree9b50d2428d0b63d2b69f759b00fdcb830a900432 /phrase-extract
parentf6b0d988d981006578f59e7d1a040c4444710c97 (diff)
Hiero phrase orientation
Diffstat (limited to 'phrase-extract')
-rw-r--r--phrase-extract/extract-ghkm/ExtractGHKM.cpp10
-rw-r--r--phrase-extract/extract-rules-main.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/phrase-extract/extract-ghkm/ExtractGHKM.cpp b/phrase-extract/extract-ghkm/ExtractGHKM.cpp
index 8a415eb71..1f91d616b 100644
--- a/phrase-extract/extract-ghkm/ExtractGHKM.cpp
+++ b/phrase-extract/extract-ghkm/ExtractGHKM.cpp
@@ -685,7 +685,7 @@ void ExtractGHKM::WriteGlueGrammar(
out << " {{SourceLabels 2 1 " << sourceLabelSentenceStart << " 1 1 " << sourceLabelGlueTop << " 1}}";
}
if (options.phraseOrientation) {
- out << " {{Orientation 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25}}";
+ out << " {{Orientation 1 1 0.5 0.5 1 1 0.5 0.5}}";
}
out << std::endl;
@@ -700,7 +700,7 @@ void ExtractGHKM::WriteGlueGrammar(
out << " {{SourceLabels 4 1 " << sourceLabelSentenceStart << " " << sourceLabelGlueTop << " " << sourceLabelSentenceEnd << " 1 1 " << sourceLabelGlueTop << " 1}}";
}
if (options.phraseOrientation) {
- out << " {{Orientation 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25}}";
+ out << " {{Orientation 1 1 0.5 0.5 1 1 0.5 0.5}}";
}
out << std::endl;
@@ -718,7 +718,7 @@ void ExtractGHKM::WriteGlueGrammar(
out << " {{SourceLabels 4 1 " << sourceLabelSentenceStart << " " << sourceLabelGlueX << " " << sourceLabelSentenceEnd << " 1 1 " << sourceLabelGlueTop << " 1}}";
}
if (options.phraseOrientation) {
- out << " {{Orientation 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25}}";
+ out << " {{Orientation 1 1 0.5 0.5 1 1 0.5 0.5}}";
}
out << std::endl;
}
@@ -734,7 +734,7 @@ void ExtractGHKM::WriteGlueGrammar(
out << " {{SourceLabels 3 1 " << sourceLabelGlueTop << " " << sourceLabelGlueX << " 1 1 " << sourceLabelGlueTop << " 1}}";
}
if (options.phraseOrientation) {
- out << " {{Orientation 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25}}";
+ out << " {{Orientation 1 1 0.5 0.5 1 1 0.5 0.5}}";
}
out << std::endl;
}
@@ -748,7 +748,7 @@ void ExtractGHKM::WriteGlueGrammar(
out << " {{SourceLabels 3 1 " << sourceLabelGlueTop << " " << sourceLabelGlueX << " 1 1 " << sourceLabelGlueTop << " 1}}";
}
if (options.phraseOrientation) {
- out << " {{Orientation 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25}}";
+ out << " {{Orientation 1 1 0.5 0.5 1 1 0.5 0.5}}";
}
out << std::endl;
}
diff --git a/phrase-extract/extract-rules-main.cpp b/phrase-extract/extract-rules-main.cpp
index aa2b1d311..f77e0b5eb 100644
--- a/phrase-extract/extract-rules-main.cpp
+++ b/phrase-extract/extract-rules-main.cpp
@@ -1165,7 +1165,7 @@ void writeGlueGrammar( const string & fileName, RuleExtractionOptions &options,
grammarFile.open(fileName.c_str());
std::string glueRulesPhraseProperty = "";
if (options.phraseOrientation) {
- glueRulesPhraseProperty.append(" ||| ||| {{Orientation 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25}}");
+ glueRulesPhraseProperty.append(" ||| ||| {{Orientation 1 1 0.5 0.5 1 1 0.5 0.5}}");
}
if (!options.targetSyntax) {
grammarFile << "<s> [X] ||| <s> [S] ||| 1 ||| 0-0 ||| 0" << glueRulesPhraseProperty << endl