Package edu.cmu.sphinx.fst.operations

Examples of edu.cmu.sphinx.fst.operations.OLabelCompare


     */
    public ArrayList<Path> phoneticize(ArrayList<String> entry, int nbest) {
        Fst efst = entryToFSA(entry);
        Semiring s = efst.getSemiring();
        Compose.augment(1, efst, s);
        ArcSort.apply(efst, new OLabelCompare());
        Fst result = Compose.compose(efst, epsilonFilter, s, true);
        ArcSort.apply(result, new OLabelCompare());
        result = Compose.compose(result, g2pmodel, s, true);
        Project.apply(result, ProjectType.OUTPUT);
        if (nbest == 1) {
            result = NShortestPaths.get(result, 1, false);
        } else {
View Full Code Here


        // Output label sort test
        fst1 = createUnsorted();
        fst2 = createOsorted();
        assertThat(fst1, not(equalTo(fst2)));
        apply(fst1, new OLabelCompare());
        assertThat(fst1, equalTo(fst2));
    }
View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.fst.operations.OLabelCompare

Copyright © 2018 www.massapicom. 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.