diff options
author | Matthias Huck <mhuck@inf.ed.ac.uk> | 2016-01-06 21:52:14 +0300 |
---|---|---|
committer | Matthias Huck <mhuck@inf.ed.ac.uk> | 2016-01-06 21:52:14 +0300 |
commit | dda3f1867c3011ef1dd9f8a9222ce03c562da59c (patch) | |
tree | 9b50d2428d0b63d2b69f759b00fdcb830a900432 /phrase-extract | |
parent | f6b0d988d981006578f59e7d1a040c4444710c97 (diff) |
Hiero phrase orientation
Diffstat (limited to 'phrase-extract')
-rw-r--r-- | phrase-extract/extract-ghkm/ExtractGHKM.cpp | 10 | ||||
-rw-r--r-- | phrase-extract/extract-rules-main.cpp | 2 |
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 |