java.util.function.Function



Project stanfordnlp/CoreNLP in file ...0/src.edu.stanford.nlp.util.BijectiveFunction.java (2014-09-08)
@@ -1,7 +1,9 @@
 package edu.stanford.nlp.util;
 
+import java.util.function.Function;
+
 /**
- * A {@link Function} that is invertible, and so has the unapply method.
+ * A {@link java.util.function.Function} that is invertible, and so has the unapply method.
  * 
  *
  * @author David Hall
Project stanfordnlp/CoreNLP in file ...ord.nlp.parser.lexparser.ChineseMaxentLexicon.java (2014-09-24)
@@ -16,6 +16,7 @@ import edu.stanford.nlp.stats.*;
 
 import java.io.*;
 import java.util.*;
+import java.util.function.Function;
 import java.util.regex.Pattern;
 
 /**
@@ -167,7 +168,7 @@ public class ChineseMaxentLexicon implements Lexicon {
   }
 
   private String getTag(String word) {
-    int iW = wordIndex.indexOf(word, true);
+    int iW = wordIndex.addToIndex(word);
     ensureProbs(iW, false);
     return Counters.argmax(logProbs);
   }
Project stanfordnlp/CoreNLP in file ...c/src.edu.stanford.nlp.util.BijectiveFunction.java (2014-09-24)
@@ -1,7 +1,9 @@
 package edu.stanford.nlp.util;
 
+import java.util.function.Function;
+
 /**
- * A {@link Function} that is invertible, and so has the unapply method.
+ * A {@link java.util.function.Function} that is invertible, and so has the unapply method.
  * 
  *
  * @author David Hall
Project stanfordnlp/CoreNLP in file ...ord.nlp.parser.lexparser.ChineseMaxentLexicon.java (2014-09-09)
@@ -16,6 +16,7 @@ import edu.stanford.nlp.stats.*;
 
 import java.io.*;
 import java.util.*;
+import java.util.function.Function;
 import java.util.regex.Pattern;
 
 /**
@@ -167,7 +168,7 @@ public class ChineseMaxentLexicon implements Lexicon {
   }
 
   private String getTag(String word) {
-    int iW = wordIndex.indexOf(word, true);
+    int iW = wordIndex.addToIndex(word);
     ensureProbs(iW, false);
     return Counters.argmax(logProbs);
   }
Project stanfordnlp/CoreNLP in file ...b/src.edu.stanford.nlp.util.BijectiveFunction.java (2014-09-09)
@@ -1,7 +1,9 @@
 package edu.stanford.nlp.util;
 
+import java.util.function.Function;
+
 /**
- * A {@link Function} that is invertible, and so has the unapply method.
+ * A {@link java.util.function.Function} that is invertible, and so has the unapply method.
  * 
  *
  * @author David Hall