edu.stanford.nlp.util.Functionjava.util.function.Function



Project stanfordnlp/CoreNLP in file ...t.src.edu.stanford.nlp.pipeline.PipelineITest.java (2014-09-08)
@@ -10,7 +10,7 @@ import edu.stanford.nlp.ling.CoreLabel;
 import edu.stanford.nlp.trees.TreeCoreAnnotations;
 import edu.stanford.nlp.trees.Tree;
 import edu.stanford.nlp.util.CoreMap;
-import edu.stanford.nlp.util.Function;
+import java.util.function.Function;
 import edu.stanford.nlp.util.Iterables;
 import edu.stanford.nlp.util.StringUtils;
 
@@ -19,7 +19,7 @@ public class PipelineITest extends TestCase {
   public void testPipeline() throws Exception {
     // create pipeline
     AnnotationPipeline pipeline = new AnnotationPipeline();
-    pipeline.addAnnotator(new TokenizerAnnotator(false, "en"));
+    pipeline.addAnnotator(new PTBTokenizerAnnotator(false));
     pipeline.addAnnotator(new WordsToSentencesAnnotator(false));
     pipeline.addAnnotator(new POSTaggerAnnotator(false));
     pipeline.addAnnotator(new MorphaAnnotator(false));
Project stanfordnlp/CoreNLP in file ...c.edu.stanford.nlp.ie.crf.CRFBiasedClassifier.java (2014-09-08)
@@ -8,7 +8,7 @@ import edu.stanford.nlp.sequences.Clique;
 import edu.stanford.nlp.sequences.DocumentReaderAndWriter;
 import edu.stanford.nlp.sequences.FeatureFactory;
 import edu.stanford.nlp.util.CoreMap;
-import edu.stanford.nlp.util.Function;
+import java.util.function.Function;
 import edu.stanford.nlp.util.Generics;
 import edu.stanford.nlp.util.PaddedList;
 import edu.stanford.nlp.util.StringUtils;
@@ -183,7 +183,7 @@ public class CRFBiasedClassifier<IN extends CoreMap> extends CRFClassifier<IN> {
         int k = crf.flags.kBest;
         crf.classifyAndWriteAnswersKBest(testFile, k, readerAndWriter);
       } else {
-        crf.classifyAndWriteAnswers(testFile, readerAndWriter, true);
+        crf.classifyAndWriteAnswers(testFile, readerAndWriter);
       }
     }
   } // end main
Project stanfordnlp/CoreNLP in file ...50/src.edu.stanford.nlp.objectbank.ObjectBank.java (2014-09-08)
@@ -1,7 +1,7 @@
 package edu.stanford.nlp.objectbank;
 
 import edu.stanford.nlp.util.AbstractIterator;
-import edu.stanford.nlp.util.Function;
+import java.util.function.Function;
 
 import java.util.List;
 import java.util.ArrayList;
@@ -261,7 +261,7 @@ public class ObjectBank<E> implements Collection<E>, Serializable {
 
   /**
    * If you are keeping the contents in memory,
-   * this will clear the memory, and they will be
+   * this will clear hte memory, and they will be
    * recomputed the next time iterator() is
    * called.
    */
Project stanfordnlp/CoreNLP in file ...ord.nlp.trees.tregex.TregexParserTokenManager.java (2014-09-08)
@@ -3,7 +3,7 @@
 package edu.stanford.nlp.trees.tregex;
 // all generated classes are in this package
 
-import edu.stanford.nlp.util.Function;
+import java.util.function.Function;
 import edu.stanford.nlp.util.Generics;
 import edu.stanford.nlp.util.Pair;
 import edu.stanford.nlp.trees.HeadFinder;
@@ -522,7 +522,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                      { jjAddStates(0, 2); }
                   break;
-               default : if (i1 == 0 || l1 == 0 || i2 == 0 ||  l2 == 0) break; else break;
+               default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
             }
          } while(i != startsAt);
       }
Project stanfordnlp/CoreNLP in file ...t.src.edu.stanford.nlp.pipeline.PipelineITest.java (2014-09-24)
@@ -10,7 +10,7 @@ import edu.stanford.nlp.ling.CoreLabel;
 import edu.stanford.nlp.trees.TreeCoreAnnotations;
 import edu.stanford.nlp.trees.Tree;
 import edu.stanford.nlp.util.CoreMap;
-import edu.stanford.nlp.util.Function;
+import java.util.function.Function;
 import edu.stanford.nlp.util.Iterables;
 import edu.stanford.nlp.util.StringUtils;
 
@@ -19,7 +19,7 @@ public class PipelineITest extends TestCase {
   public void testPipeline() throws Exception {
     // create pipeline
     AnnotationPipeline pipeline = new AnnotationPipeline();
-    pipeline.addAnnotator(new PTBTokenizerAnnotator(false));
+    pipeline.addAnnotator(new TokenizerAnnotator(false, "en"));
     pipeline.addAnnotator(new WordsToSentencesAnnotator(false));
     pipeline.addAnnotator(new POSTaggerAnnotator(false));
     pipeline.addAnnotator(new MorphaAnnotator(false));