⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 confidencescorer.java

📁 It is the Speech recognition software. It is platform independent. To execute the source code,
💻 JAVA
字号:
/* * Copyright 1999-2004 Carnegie Mellon University. * Portions Copyright 2004 Sun Microsystems, Inc. * Portions Copyright 2004 Mitsubishi Electric Research Laboratories. * All Rights Reserved.  Use is subject to license terms. * * See the file "license.terms" for information on usage and * redistribution of this file, and for a DISCLAIMER OF ALL * WARRANTIES. * */package edu.cmu.sphinx.result;/** * <p> * Computes confidences for a Result. * Typically, one is interested in the confidence of the best path * of a result, as well as the confidence of each word in the best path * of a result. To obtain this information, one should do the following: * </p> * * <pre> * * ConfidenceScorer scorer = (ConfidenceScorer) ... // obtain scorer from configuration manager * * Result result = recognizer.recognize(); * ConfidenceResult confidenceResult = scorer.score(result); * * // confidence for best path * Path bestPath = confidenceResult.getBestHypothesis(); * double pathConfidence = bestPath.getConfidence(); * * // confidence for each word in best path * WordResult[] words = bestPath.getWords(); * for (int i = 0; i < words.length; i++) { *     WordResult wordResult = (WordResult) words[i]; *     double wordConfidence = wordResult.getConfidence(); * } * * </pre> * * <p> * Note that different ConfidenceScorers have different definitions for * the 'best path', and therefore their <code>getBestHypothesis</code> methods * will return different things. The * {@link edu.cmu.sphinx.result.MAPConfidenceScorer} returns the highest * scoring path. On the other hand, the * {@link edu.cmu.sphinx.result.SausageMaker} returns the path where * all the words have the highest confidence in their corresponding time slot.  * </p> */public interface ConfidenceScorer {    /**     * Computes confidences for a Result and returns a ConfidenceResult,     * a compact representation of all the hypothesis contained in the     * result together with their per-word and per-path confidences.     *     * @param result the result to compute confidences for     * @return a confidence result     */    public ConfidenceResult score(Result result);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -