You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/08/24 19:45:30 UTC

[09/41] incubator-joshua git commit: added alignment for phrase-based OOVs

added alignment for phrase-based OOVs


Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/216d61db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/216d61db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/216d61db

Branch: refs/heads/JOSHUA-304
Commit: 216d61db80b927315e211a8a75d328a09473cf5a
Parents: fcaf0bf
Author: Matt Post <po...@cs.jhu.edu>
Authored: Tue Aug 16 07:17:08 2016 +0200
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Tue Aug 16 07:17:08 2016 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/joshua/decoder/phrase/PhraseTable.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/216d61db/src/main/java/org/apache/joshua/decoder/phrase/PhraseTable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/joshua/decoder/phrase/PhraseTable.java b/src/main/java/org/apache/joshua/decoder/phrase/PhraseTable.java
index 312781f..2c8a3e9 100644
--- a/src/main/java/org/apache/joshua/decoder/phrase/PhraseTable.java
+++ b/src/main/java/org/apache/joshua/decoder/phrase/PhraseTable.java
@@ -130,7 +130,7 @@ public class PhraseTable implements Grammar {
         : sourceWord;   
 
     int nt_i = Vocabulary.id("[X]");
-    Rule oovRule = new Rule(nt_i, new int[] { nt_i, sourceWord }, new int[] { -1, targetWord }, "", 1);
+    Rule oovRule = new Rule(nt_i, new int[] { nt_i, sourceWord }, new int[] { -1, targetWord }, "0-0", 1);
     addRule(oovRule);
     oovRule.estimateRuleCost(featureFunctions);