Package edu.stanford.nlp.ling

Examples of edu.stanford.nlp.ling.CoreLabel.lemma()


    for (int i = 0; i < tokens.size(); ++i) {
      CoreLabel word = tokens.get(i);
      if (i > 0) {
        osw.write(" ");
      }
      osw.write(word.lemma());
    }
    osw.write("\n");
    osw.flush();
  }
View Full Code Here


    assertFalse(hashCode == foo.hashCode());
    foo.setWord("foo");
    assertFalse(hashCode == foo.hashCode());

    // Hash code doesn't care between a value of null and the key not existing
    assertTrue(foo.lemma() == null);
    int lemmalessHashCode = foo.hashCode();
    foo.remove(CoreAnnotations.LemmaAnnotation.class);
    assertEquals(lemmalessHashCode, foo.hashCode());
    foo.setLemma(null);
    assertEquals(lemmalessHashCode, foo.hashCode());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.