Package edu.cmu.sphinx.fst.semiring

Examples of edu.cmu.sphinx.fst.semiring.TropicalSemiring.zero()


     */
    private Fst entryToFSA(ArrayList<String> entry) {
        TropicalSemiring ts = new TropicalSemiring();
        Fst efst = new Fst(ts);

        State s = new State(ts.zero());
        efst.addState(s);
        efst.setStart(s);

        // Build the basic FSA
        for (int i = 0; i < entry.size() + 1; i++) {
View Full Code Here


        efst.addState(s);
        efst.setStart(s);

        // Build the basic FSA
        for (int i = 0; i < entry.size() + 1; i++) {
            s = new State(ts.zero());
            efst.addState(s);
            if (i >= 1) {
                int symIndex = Utils.getIndex(g2pmodel.getIsyms(),
                        entry.get(i - 1));
                efst.getState(i).addArc(new Arc(symIndex, symIndex, 0.f, s));
View Full Code Here

                int symIndex = Utils.getIndex(g2pmodel.getIsyms(), sb);
                efst.getStart().addArc(new Arc(symIndex, symIndex, 0.f, s));
            }

            if (i == entry.size()) {
                State s1 = new State(ts.zero());
                efst.addState(s1);
                int symIndex = Utils.getIndex(g2pmodel.getIsyms(), se);
                s.addArc(new Arc(symIndex, symIndex, 0.f, s1));
                s1.setFinalWeight(0.f);
            }
View Full Code Here

     */
    private Fst createFst() {
        TropicalSemiring ts = new TropicalSemiring();
        Fst fst = new Fst(ts);

        State s1 = new State(ts.zero());
        State s2 = new State(ts.zero());
        State s3 = new State(ts.zero());
        State s4 = new State(2.f);

        // State 0
View Full Code Here

    private Fst createFst() {
        TropicalSemiring ts = new TropicalSemiring();
        Fst fst = new Fst(ts);

        State s1 = new State(ts.zero());
        State s2 = new State(ts.zero());
        State s3 = new State(ts.zero());
        State s4 = new State(2.f);

        // State 0
        fst.addState(s1);
View Full Code Here

        TropicalSemiring ts = new TropicalSemiring();
        Fst fst = new Fst(ts);

        State s1 = new State(ts.zero());
        State s2 = new State(ts.zero());
        State s3 = new State(ts.zero());
        State s4 = new State(2.f);

        // State 0
        fst.addState(s1);
        s1.addArc(new Arc(1, 5, 1.f, s2));
View Full Code Here

     * @return the created fst
     */
    private Fst createPi() {
        TropicalSemiring ts = new TropicalSemiring();
        Fst fst = new Fst(ts);
        State s1 = new State(ts.zero());
        State s2 = new State(ts.zero());
        State s3 = new State(ts.zero());
        State s4 = new State(2.f);

        // State 0
View Full Code Here

     */
    private Fst createPi() {
        TropicalSemiring ts = new TropicalSemiring();
        Fst fst = new Fst(ts);
        State s1 = new State(ts.zero());
        State s2 = new State(ts.zero());
        State s3 = new State(ts.zero());
        State s4 = new State(2.f);

        // State 0
        fst.addState(s1);
View Full Code Here

    private Fst createPi() {
        TropicalSemiring ts = new TropicalSemiring();
        Fst fst = new Fst(ts);
        State s1 = new State(ts.zero());
        State s2 = new State(ts.zero());
        State s3 = new State(ts.zero());
        State s4 = new State(2.f);

        // State 0
        fst.addState(s1);
        s1.addArc(new Arc(1, 1, 1.f, s2));
View Full Code Here

     */
    private Fst createPo() {
        TropicalSemiring ts = new TropicalSemiring();
        Fst fst = new Fst(ts);

        State s1 = new State(ts.zero());
        State s2 = new State(ts.zero());
        State s3 = new State(ts.zero());
        State s4 = new State(2.f);

        // State 0
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.