mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-19 07:07:24 +03:00
GHKM glue grammar: Orientation phrase property
This commit is contained in:
parent
63316960a1
commit
0cf0d595d3
@ -628,6 +628,9 @@ void ExtractGHKM::WriteGlueGrammar(
|
||||
if (options.sourceLabels) {
|
||||
out << " {{SourceLabels 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 << std::endl;
|
||||
|
||||
out << "[X][" << topLabel << "] </s> [X] ||| [X][" << topLabel << "] </s> [" << topLabel << "] ||| 1 ||| 0-0 1-1 ||| ||| |||";
|
||||
@ -637,6 +640,9 @@ void ExtractGHKM::WriteGlueGrammar(
|
||||
if (options.sourceLabels) {
|
||||
out << " {{SourceLabels 2 1 " << sourceLabelGlueTop << " 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 << std::endl;
|
||||
|
||||
// top rules
|
||||
@ -649,6 +655,9 @@ void ExtractGHKM::WriteGlueGrammar(
|
||||
if (options.sourceLabels) {
|
||||
out << " {{SourceLabels 2 1 " << 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 << std::endl;
|
||||
}
|
||||
|
||||
@ -662,6 +671,9 @@ void ExtractGHKM::WriteGlueGrammar(
|
||||
if (options.sourceLabels) {
|
||||
out << " {{SourceLabels 3 2.718 " << sourceLabelGlueTop << " " << sourceLabelGlueX << " 2.718 1 " << sourceLabelGlueTop << " 2.718}}";
|
||||
}
|
||||
if (options.phraseOrientation) {
|
||||
out << " {{Orientation 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25}}";
|
||||
}
|
||||
out << std::endl;
|
||||
}
|
||||
|
||||
@ -673,6 +685,9 @@ void ExtractGHKM::WriteGlueGrammar(
|
||||
if (options.sourceLabels) {
|
||||
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 << std::endl;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user