Package edu.cmu.sphinx.jsgf.rule

Examples of edu.cmu.sphinx.jsgf.rule.JSGFRuleSequence


        logger.fine("Starting element " + qName);
        if (qName.equals("rule")) {
            String id = attributes.getValue("id");
            if (id != null) {
                newRule = new JSGFRuleSequence(new ArrayList<JSGFRule>());
                topRuleMap.put(id, newRule);
                topRule = newRule;
            }
        }
        if (qName.equals("item")) {
            String repeat = attributes.getValue("repeat");
            if (repeat != null) {
                newRule = new JSGFRuleSequence(new ArrayList<JSGFRule>());
                JSGFRuleCount ruleCount = new JSGFRuleCount(newRule, JSGFRuleCount.ONCE_OR_MORE);
                topRule = ruleCount;
            } else {
                newRule = new JSGFRuleSequence(new ArrayList<JSGFRule>());
                topRule = newRule;
            }
        }
        if (qName.equals("one-of")) {
            newRule = new JSGFRuleAlternatives(new ArrayList<JSGFRule>());
View Full Code Here


            currentRule = newRule;
            return;
        }
       
        if (currentRule instanceof JSGFRuleSequence) {
            JSGFRuleSequence ruleSequence = (JSGFRuleSequence) currentRule;
            ruleSequence.append(topRule);
            newRule.parent = currentRule;
            currentRule = newRule;
        } else if (currentRule instanceof JSGFRuleAlternatives) {
            JSGFRuleAlternatives ruleAlternatives = (JSGFRuleAlternatives) currentRule;
            ruleAlternatives.append(topRule);
View Full Code Here

TOP

Related Classes of edu.cmu.sphinx.jsgf.rule.JSGFRuleSequence

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.