Package cc.mallet.types

Examples of cc.mallet.types.Token.toFeatureVector()


    t.setFeatureValue ("length", 3);
    t.setFeatureValue ("containsVowel", 1);
    t.setFeatureValue ("in /usr/dict/words", 0);

    Alphabet dict = new Alphabet();
    FeatureVector fv = t.toFeatureVector (dict, false);
    assertTrue (fv.numLocations() == 2);
    assertTrue (fv.value (dict.lookupIndex("length")) == 3);
  }

  public void testTwo ()
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.