Examples of linearToLog()


Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

        Set<WordSequence> sorted2grams = new TreeSet<WordSequence>(bigrams.keySet());
        iter = new TreeSet<WordSequence>(trigrams.keySet()).iterator();
        ws = iter.hasNext() ? iter.next() : null;
        for (WordSequence biword : sorted2grams) {
            logProbs.put(biword, lmath.linearToLog(biprobs.get(biword)));

            float sum = 0.f;
            while (ws != null) {
                int cmp = ws.getOldest().compareTo(biword);
                if (cmp > 0) {
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

                if (cmp == 0) {
                    sum += biprobs.get(ws.getNewest());
                }
                ws = iter.hasNext() ? iter.next() : null;
            }
            logBackoffs.put(biword, lmath.linearToLog(discount / (1 - sum)));
        }

        for (Map.Entry<WordSequence, Integer> e : trigrams.entrySet()) {
            float p = e.getValue() * deflate;
            p /= bigrams.get(e.getKey().getOldest());
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

        }

        for (Map.Entry<WordSequence, Integer> e : trigrams.entrySet()) {
            float p = e.getValue() * deflate;
            p /= bigrams.get(e.getKey().getOldest());
            logProbs.put(e.getKey(), lmath.linearToLog(p));
        }
    }

    private void addSequence(HashMap<WordSequence, Integer> grams,
            WordSequence wordSequence) {
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

    double acousticCD = 2;

    lattice.setInitialNode(a);
    lattice.setTerminalNode(d);

    lattice.addEdge(a, b, logMath.linearToLog(acousticAB), 0);
    lattice.addEdge(a, c, logMath.linearToLog(acousticAC), 0);
    lattice.addEdge(c, b, logMath.linearToLog(acousticCB), 0);
    lattice.addEdge(b, d, logMath.linearToLog(acousticBD), 0);
    lattice.addEdge(c, d, logMath.linearToLog(acousticCD), 0);
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

    lattice.setInitialNode(a);
    lattice.setTerminalNode(d);

    lattice.addEdge(a, b, logMath.linearToLog(acousticAB), 0);
    lattice.addEdge(a, c, logMath.linearToLog(acousticAC), 0);
    lattice.addEdge(c, b, logMath.linearToLog(acousticCB), 0);
    lattice.addEdge(b, d, logMath.linearToLog(acousticBD), 0);
    lattice.addEdge(c, d, logMath.linearToLog(acousticCD), 0);

    lattice.computeNodePosteriors(1.0f);
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

    lattice.setInitialNode(a);
    lattice.setTerminalNode(d);

    lattice.addEdge(a, b, logMath.linearToLog(acousticAB), 0);
    lattice.addEdge(a, c, logMath.linearToLog(acousticAC), 0);
    lattice.addEdge(c, b, logMath.linearToLog(acousticCB), 0);
    lattice.addEdge(b, d, logMath.linearToLog(acousticBD), 0);
    lattice.addEdge(c, d, logMath.linearToLog(acousticCD), 0);

    lattice.computeNodePosteriors(1.0f);
    double pathABD = acousticAB * acousticBD;
 
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

    lattice.setTerminalNode(d);

    lattice.addEdge(a, b, logMath.linearToLog(acousticAB), 0);
    lattice.addEdge(a, c, logMath.linearToLog(acousticAC), 0);
    lattice.addEdge(c, b, logMath.linearToLog(acousticCB), 0);
    lattice.addEdge(b, d, logMath.linearToLog(acousticBD), 0);
    lattice.addEdge(c, d, logMath.linearToLog(acousticCD), 0);

    lattice.computeNodePosteriors(1.0f);
    double pathABD = acousticAB * acousticBD;
    double pathACBD = acousticAC * acousticCB * acousticBD;
 
View Full Code Here

Examples of edu.cmu.sphinx.util.LogMath.linearToLog()

    lattice.addEdge(a, b, logMath.linearToLog(acousticAB), 0);
    lattice.addEdge(a, c, logMath.linearToLog(acousticAC), 0);
    lattice.addEdge(c, b, logMath.linearToLog(acousticCB), 0);
    lattice.addEdge(b, d, logMath.linearToLog(acousticBD), 0);
    lattice.addEdge(c, d, logMath.linearToLog(acousticCD), 0);

    lattice.computeNodePosteriors(1.0f);
    double pathABD = acousticAB * acousticBD;
    double pathACBD = acousticAC * acousticCB * acousticBD;
    double pathACD = acousticAC * acousticCD;
 
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.