edu.stanford.nlp.ling.CoreLabel



API Populatity

1 Client projects

Project: edu.stanford

Package: edu.stanford.nlp

Project stanfordnlp/CoreNLP in file ...u.stanford.nlp.patterns.dep.DepPatternFactory.java (2015-01-23)
@@ -1,6 +1,7 @@
 package edu.stanford.nlp.patterns.dep;
 
 import edu.stanford.nlp.ling.CoreAnnotations;
+import edu.stanford.nlp.ling.CoreLabel;
 import edu.stanford.nlp.ling.IndexedWord;
 import edu.stanford.nlp.patterns.CandidatePhrase;
 import edu.stanford.nlp.patterns.DataInstance;
@@ -127,6 +128,7 @@ public class DepPatternFactory extends PatternFactory{
   static public DepPattern patternToDepPattern(Pair<IndexedWord, GrammaticalRelation> p) {
 
     Token token = new Token(PatternFactory.PatternType.DEP);
+    assert p.first().backingLabel().containsKey(PatternsAnnotations.ProcessedTextAnnotation.class) : "the keyset are " + p.first().backingLabel().toString(CoreLabel.OutputFormat.ALL) + " and the sentence is " + p.first().containsKey(PatternsAnnotations.ProcessedTextAnnotation.class);
     token.addORRestriction(PatternsAnnotations.ProcessedTextAnnotation.class, p.first().backingLabel().get(PatternsAnnotations.ProcessedTextAnnotation.class));
 
     return new DepPattern(token, p.second());
Project stanfordnlp/CoreNLP in file ...c.edu.stanford.nlp.semgraph.semgrex.Alignment.java (2015-03-12)
@@ -1,5 +1,6 @@
 package edu.stanford.nlp.semgraph.semgrex;
 
+import edu.stanford.nlp.ling.CoreLabel;
 import edu.stanford.nlp.ling.IndexedWord;
 import edu.stanford.nlp.semgraph.SemanticGraph;
 import edu.stanford.nlp.util.Generics;
@@ -90,7 +91,7 @@ public class Alignment {
   private static String iwToString(IndexedWord iw) {
     if (iw == null || iw.equals(IndexedWord.NO_WORD))
       return "_";
-    return iw.toString(IndexedWord.WORD_FORMAT);
+    return iw.toString(CoreLabel.OutputFormat.VALUE);
   }
 
   /**
Project stanfordnlp/CoreNLP in file ....stanford.nlp.patterns.surface.CreatePatterns.java (2015-01-26)
@@ -7,7 +7,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 
-import edu.stanford.nlp.ling.CoreLabel;
 import edu.stanford.nlp.patterns.*;
 import edu.stanford.nlp.util.*;
 import edu.stanford.nlp.util.logging.Redwood;
@@ -111,7 +110,7 @@ public class CreatePatterns<E> {
     // Class otherClass;
     Map<String, DataInstance> sents;
     List<String> sentIds;
-    PatternsForEachToken patsForEach;
+    PatternsForEachToken<E> patsForEach;
 
     public CreatePatternsThread(Map<String, DataInstance> sents, List<String> sentIds, Properties props, ConstantsAndVariables.PatternForEachTokenWay storePatsForEachToken) {