Package org.speakright.core.render

Examples of org.speakright.core.render.Grammar$GrammarCondition


  }

  @Test public void grammar()
  {
    String words = "kenny cartman [ter phil] (mister hat) (big gay al) [wendy]";
    Grammar gram = new Grammar("inline: " + words);
  }
View Full Code Here


  }
 
  GrammarItem m_item;
  void chkQuestion(Question quest, String expected)
  {
    Grammar gram = quest.m_grammarSet.voiceGrammar();
    String url = gram.m_item.getUrl();
    m_item = gram.m_item;

    assertEquals("gram", expected, url);
  }
View Full Code Here

   * @param gtext a grammar text (url, inline grammar, etc)
   * @param ptext prompt text
   */
  public QuestionFlow(String gtext, String ptext) {
    super();
    m_quest = new Question(new Grammar(gtext), new Prompt(ptext));
  }
View Full Code Here

   * Each question can have at most one VOICE and one DTMF grammar.
   * @param grammar text such as "inline:yes no"
   */
  public void addGrammar(String gtext)
  {
    m_quest.addGrammar(new Grammar(gtext));
  }
View Full Code Here

   *   <code>public String City();</code> 
   *   <code>public void setCity(String value);</code> 
   */
  public void addBinding(String slotName, String modelVar)
  {
    Grammar gram = m_quest.grammar();
    gram.addBinding(slotName, modelVar);
  }
View Full Code Here

  {
    this("");
  }
  public BaseSROQuestion(String subject) {
    m_subjectWord = subject;
    m_quest.addGrammar(new Grammar(""));

    // initialize prompts here, but we do it again in execute
    // in case derived classes changed prompt fields like m_mainPrompt
    // dynamically
    initPrompts();
View Full Code Here

 
  void selectGrammar()
  {
    if (m_useBuiltInGrammars) {
      String gtext = String.format("builtin:digits?length=%d", m_numDigits);
      addGrammar(new Grammar(gtext));
      return;
    }
   
    Grammar gram = null;
    switch(m_numDigits) {
    case 1:
      gram = this.m_digits1Grammar;
      break;
    case 2:
View Full Code Here

TOP

Related Classes of org.speakright.core.render.Grammar$GrammarCondition

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.