Package edu.cmu.sphinx.result

Examples of edu.cmu.sphinx.result.ConfusionSet


        alignWords(backtrace(createBacktraceTable(referenceItems,
                hypothesisItems, new  Comparator () {
                    public boolean isSimilar(Object refObject, Object hypObject) {
                        if (refObject instanceof String && hypObject instanceof ConfusionSet) {
                            String ref = (String)refObject;
                            ConfusionSet set = (ConfusionSet)hypObject;
                            if (set.containsWord(ref)) {
                                return true;
                            }
                        }
                        return false;
                    }         
        })), new StringRenderer() {
           
            public String getRef(Object ref, Object hyp) {
                return (String)ref;
            }
           
            public String getHyp(Object refObject, Object hypObject) {
                String ref = (String)refObject;
                ConfusionSet set = (ConfusionSet)hypObject;
                if (set.containsWord(ref))
                     return ref;
                String res = set.getBestHypothesis().toString();
                return res;
            }
        });

        // Compute the number of correct words in the hypothesis.
View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.result.ConfusionSet

Copyright © 2018 www.massapicom. 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.