Examples of RVFDatum


Examples of edu.stanford.nlp.ling.RVFDatum

    for (RVFDatum<String, String> datum : datums)
      trainData.add(datum);
    LinearClassifierFactory<String, String> lfc = new LinearClassifierFactory<String, String>();
    LinearClassifier<String, String> lc = lfc.trainClassifier(trainData);

    RVFDatum td1 = newDatum("alpha",
      new String[]{"f1", "f2","f3"},
      new Double[]{2.0, 0.0, 5.5});

    // Try the obvious (should get train data with 100% acc)
    for (RVFDatum<String, String> datum : datums)
      Assert.assertEquals(datum.label(), lc.classOf(datum));

    // Test data
    Assert.assertEquals(td1.label(), lc.classOf(td1));
  }
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.