Package edu.cmu.sphinx.decoder.search

Examples of edu.cmu.sphinx.decoder.search.Partitioner.partition()


    for (int i = 0; i < tokens.length; i++) {
      float logTotalScore = random.nextFloat();
      tokens[i] = new Token(parent, null, logTotalScore, 0.0f, 0.0f, i);
    }

    final int r = partitioner.partition(tokens, tokens.length,
        absoluteBeamWidth);

    if (tokenListLarger) {
      Assert.assertEquals(r, absoluteBeamWidth - 1);
    } else {
View Full Code Here


    Token[] tokens = new Token[100000];
    Partitioner partitioner = new Partitioner();

    for (int i = 0; i < 100000; i++)
      tokens[i] = new Token(null, null, 1 - i, 0, 0, 0);
    p = partitioner.partition(tokens, 100000, 3000);
    Assert.assertEquals(p, 2999);
    testSorted(tokens, p);

    for (int i = 0; i < 100000; i++)
      tokens[i] = new Token(null, null, i, 0, 0, 0);
View Full Code Here

    Assert.assertEquals(p, 2999);
    testSorted(tokens, p);

    for (int i = 0; i < 100000; i++)
      tokens[i] = new Token(null, null, i, 0, 0, 0);
    p = partitioner.partition(tokens, 100000, 3000);
    Assert.assertEquals(p, 2999);
    testSorted(tokens, p);

    for (int i = 0; i < 100000; i++)
      tokens[i] = new Token(null, null, 0, 0, 0, 0);
View Full Code Here

    Assert.assertEquals(p, 2999);
    testSorted(tokens, p);

    for (int i = 0; i < 100000; i++)
      tokens[i] = new Token(null, null, 0, 0, 0, 0);
    p = partitioner.partition(tokens, 100000, 3000);
    Assert.assertEquals(p, 2999);
    testSorted(tokens, p);

    for (int i = 0; i < 100000; i++)
      tokens[i] = new Token(null, null, (float) Math.random(), 0, 0, 0);
View Full Code Here

    Assert.assertEquals(p, 2999);
    testSorted(tokens, p);

    for (int i = 0; i < 100000; i++)
      tokens[i] = new Token(null, null, (float) Math.random(), 0, 0, 0);
    p = partitioner.partition(tokens, 100000, 3000);
    Assert.assertEquals(p, 2999);
    testSorted(tokens, p);
  }

  @Test
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.