Author: cwiklik
Date: Mon Apr  4 13:49:50 2011
New Revision: 1088626

URL: http://svn.apache.org/viewvc?rev=1088626&view=rev
Log:
UIMA-2106 Applied patch created by Nicolas Hernandez. 

Modified:
    
uima/sandbox/trunk/Tagger/src/main/java/org/apache/uima/examples/tagger/Viterbi.java

Modified: 
uima/sandbox/trunk/Tagger/src/main/java/org/apache/uima/examples/tagger/Viterbi.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/trunk/Tagger/src/main/java/org/apache/uima/examples/tagger/Viterbi.java?rev=1088626&r1=1088625&r2=1088626&view=diff
==============================================================================
--- 
uima/sandbox/trunk/Tagger/src/main/java/org/apache/uima/examples/tagger/Viterbi.java
 (original)
+++ 
uima/sandbox/trunk/Tagger/src/main/java/org/apache/uima/examples/tagger/Viterbi.java
 Mon Apr  4 13:49:50 2011
@@ -183,7 +183,7 @@ public class Viterbi {
             }
             // 
             else if (j == unknown.length - 1) {
-              available_pos = word_probs.get("(");
+              if (word_probs.containsKey("(")) {available_pos = 
word_probs.get("(");} else {available_pos.put("(", Double.MIN_VALUE);}
             }
           }
         }
@@ -270,7 +270,7 @@ public class Viterbi {
             break;
           } // for unexpected cases which are neither in the dictionary nor in 
the suffix analysis
           else if (j == unknown.length - 1) {
-            possible_pos_next = word_probs.get("(");
+            if (possible_pos_next.containsKey("(")) {possible_pos_next = 
word_probs.get("(");} else {possible_pos_next.put("(", Double.MIN_VALUE);}
           }
         }
       }


Reply via email to