Examples of suffStats()


Examples of joshua.zmert.BLEU.suffStats()

      double acceptableScoreDelta = 0.00001f;

      Assert.assertEquals(actualScore, expectedScore, acceptableScoreDelta);

      // Check sufficient statistics match
      int[] actualSS = bleu.suffStats(testSentences);
      int[] expectedSS = {14,27,8,26,5,25,3,24,27,23};

      Assert.assertEquals(actualSS[0], expectedSS[0], 0); // 1-gram matches
      Assert.assertEquals(actualSS[1], expectedSS[1], 0); // 1-gram total
      Assert.assertEquals(actualSS[2], expectedSS[2], 0); // 2-gram matches
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.