Examples of linearToLog()


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

    // get the rest of the configuration data
    LogMath logMath = LogMath.getLogMath();
    logWordInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_WORD_INSERTION_PROBABILITY));
    logSilenceInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_SILENCE_INSERTION_PROBABILITY));
    logUnitInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_UNIT_INSERTION_PROBABILITY));
    logFillerInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_FILLER_INSERTION_PROBABILITY));
View Full Code Here

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

    LogMath logMath = LogMath.getLogMath();
    logWordInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_WORD_INSERTION_PROBABILITY));
    logSilenceInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_SILENCE_INSERTION_PROBABILITY));
    logUnitInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_UNIT_INSERTION_PROBABILITY));
    logFillerInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_FILLER_INSERTION_PROBABILITY));
    languageWeight = ps.getFloat(Linguist.PROP_LANGUAGE_WEIGHT);
    addOutOfGrammarBranch = ps.getBoolean(ADD_OUT_OF_GRAMMAR_BRANCH);
View Full Code Here

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

        .getDouble(PROP_WORD_INSERTION_PROBABILITY));
    logSilenceInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_SILENCE_INSERTION_PROBABILITY));
    logUnitInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_UNIT_INSERTION_PROBABILITY));
    logFillerInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_FILLER_INSERTION_PROBABILITY));
    languageWeight = ps.getFloat(Linguist.PROP_LANGUAGE_WEIGHT);
    addOutOfGrammarBranch = ps.getBoolean(ADD_OUT_OF_GRAMMAR_BRANCH);
    logOutOfGrammarBranchProbability = logMath.linearToLog(ps
        .getDouble(OUT_OF_GRAMMAR_PROBABILITY));
View Full Code Here

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

        .getDouble(PROP_UNIT_INSERTION_PROBABILITY));
    logFillerInsertionProbability = logMath.linearToLog(ps
        .getDouble(PROP_FILLER_INSERTION_PROBABILITY));
    languageWeight = ps.getFloat(Linguist.PROP_LANGUAGE_WEIGHT);
    addOutOfGrammarBranch = ps.getBoolean(ADD_OUT_OF_GRAMMAR_BRANCH);
    logOutOfGrammarBranchProbability = logMath.linearToLog(ps
        .getDouble(OUT_OF_GRAMMAR_PROBABILITY));

    logPhoneInsertionProbability = logMath.linearToLog(ps
        .getDouble(PHONE_INSERTION_PROBABILITY));
    if (addOutOfGrammarBranch) {
View Full Code Here

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

    languageWeight = ps.getFloat(Linguist.PROP_LANGUAGE_WEIGHT);
    addOutOfGrammarBranch = ps.getBoolean(ADD_OUT_OF_GRAMMAR_BRANCH);
    logOutOfGrammarBranchProbability = logMath.linearToLog(ps
        .getDouble(OUT_OF_GRAMMAR_PROBABILITY));

    logPhoneInsertionProbability = logMath.linearToLog(ps
        .getDouble(PHONE_INSERTION_PROBABILITY));
    if (addOutOfGrammarBranch) {
      phoneLoopAcousticModel = (AcousticModel) ps
          .getComponent(PHONE_LOOP_ACOUSTIC_MODEL);
    }
View Full Code Here

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

            uniprobs.put(e.getKey(),
                         (float) e.getValue() * deflate / wordCount);
        }

        LogMath lmath = LogMath.getLogMath();
        float logUnigramWeight = lmath.linearToLog(unigramWeight);
        float invLogUnigramWeight = lmath.linearToLog(1 - unigramWeight);
        float logUniformProb = -lmath.linearToLog(uniprobs.size());

        Set<WordSequence> sorted1grams = new TreeSet<WordSequence>(unigrams.keySet());
        Iterator<WordSequence> iter =
View Full Code Here

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

                         (float) e.getValue() * deflate / wordCount);
        }

        LogMath lmath = LogMath.getLogMath();
        float logUnigramWeight = lmath.linearToLog(unigramWeight);
        float invLogUnigramWeight = lmath.linearToLog(1 - unigramWeight);
        float logUniformProb = -lmath.linearToLog(uniprobs.size());

        Set<WordSequence> sorted1grams = new TreeSet<WordSequence>(unigrams.keySet());
        Iterator<WordSequence> iter =
                new TreeSet<WordSequence>(bigrams.keySet()).iterator();
View Full Code Here

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

        }

        LogMath lmath = LogMath.getLogMath();
        float logUnigramWeight = lmath.linearToLog(unigramWeight);
        float invLogUnigramWeight = lmath.linearToLog(1 - unigramWeight);
        float logUniformProb = -lmath.linearToLog(uniprobs.size());

        Set<WordSequence> sorted1grams = new TreeSet<WordSequence>(unigrams.keySet());
        Iterator<WordSequence> iter =
                new TreeSet<WordSequence>(bigrams.keySet()).iterator();
        WordSequence ws = iter.hasNext() ? iter.next() : null;
View Full Code Here

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

        Set<WordSequence> sorted1grams = new TreeSet<WordSequence>(unigrams.keySet());
        Iterator<WordSequence> iter =
                new TreeSet<WordSequence>(bigrams.keySet()).iterator();
        WordSequence ws = iter.hasNext() ? iter.next() : null;
        for (WordSequence unigram : sorted1grams) {
            float p = lmath.linearToLog(uniprobs.get(unigram));
            p += logUnigramWeight;
            p = lmath.addAsLinear(p, logUniformProb + invLogUnigramWeight);
            logProbs.put(unigram, p);

            float sum = 0.f;
View Full Code Here

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

                    sum += uniprobs.get(ws.getNewest());
                }
                ws = iter.hasNext() ? iter.next() : null;
            }

            logBackoffs.put(unigram, lmath.linearToLog(discount / (1 - sum)));
        }

        Map<WordSequence, Float> biprobs = new HashMap<WordSequence, Float>();
        for (Map.Entry<WordSequence, Integer> entry : bigrams.entrySet()) {
            int unigramCount = unigrams.get(entry.getKey().getOldest());
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.