Examples of TropicalSemiring


Examples of edu.cmu.sphinx.fst.semiring.TropicalSemiring

     * http://www.openfst.org/twiki/bin/view/FST/ArcSortDoc
     *
     * @return the created fst
     */
    private Fst createOsorted() {
        Fst fst = new Fst(new TropicalSemiring());

        State s1 = new State(0.f);
        State s2 = new State(0.f);
        State s3 = new State(0.f);

View Full Code Here

Examples of edu.cmu.sphinx.fst.semiring.TropicalSemiring

     * http://www.openfst.org/twiki/bin/view/FST/ArcSortDoc
     *
     * @return the created fst
     */
    private Fst createIsorted() {
        Fst fst = new Fst(new TropicalSemiring());

        State s1 = new State(0.f);
        State s2 = new State(0.f);
        State s3 = new State(0.f);

View Full Code Here

Examples of edu.cmu.sphinx.fst.semiring.TropicalSemiring

     * http://www.openfst.org/twiki/bin/view/FST/ArcSortDoc
     *
     * @return the created fst
     */
    private Fst createUnsorted() {
        Fst fst = new Fst(new TropicalSemiring());

        State s1 = new State(0.f);
        State s2 = new State(0.f);
        State s3 = new State(0.f);

View Full Code Here

Examples of edu.cmu.sphinx.fst.semiring.TropicalSemiring

        String path = "algorithms/determinize/fstdeterminize.fst.ser";
        URL url = getClass().getResource(path);
        File parent = new File(url.toURI()).getParentFile();

        path = new File(parent, "A").getPath();
        Fst fstA = Convert.importFst(path, new TropicalSemiring());
        path = new File(parent, "fstdeterminize.fst.ser").getPath();
        Fst determinized = Fst.loadModel(path);

        Fst fstDeterminized = Determinize.get(fstA);
        assertThat(determinized, equalTo(fstDeterminized));
View Full Code Here

Examples of edu.cmu.sphinx.fst.semiring.TropicalSemiring

    public void testConvert() throws NumberFormatException, IOException, ClassNotFoundException, URISyntaxException {
        URL url = getClass().getResource("openfst/basic.fst");
        String dir = new File(url.toURI()).getParent();
       
        String path = new File(dir, "basic").getPath();
        Fst fst1 = Convert.importFst(path, new TropicalSemiring());

        path = new File(dir, "basic.fst.ser").getPath();
        Fst fst2 = Fst.loadModel(path);

        assertThat(fst1, equalTo(fst2));
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.