Package com.github.pmerienne.trident.ml.nlp

Examples of com.github.pmerienne.trident.ml.nlp.Vocabulary.addAll()


  }

  @Test
  public void testAddAll() {
    Vocabulary vocabulary = new Vocabulary();
    vocabulary.addAll(Arrays.asList("only one", "we are 2", "we are 2"));

    assertEquals(1, vocabulary.count("only one").intValue());
    assertEquals(2, vocabulary.count("we are 2").intValue());
    assertEquals(0, vocabulary.count("I'm not here").intValue());
  }
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.