jaugment2.speech
Class SemiNaturalVoiceProcessorService.parseTreeKnot

java.lang.Object
  |
  +--jaugment2.speech.SemiNaturalVoiceProcessorService.parseTreeKnot
Enclosing class:
SemiNaturalVoiceProcessorService

private class SemiNaturalVoiceProcessorService.parseTreeKnot
extends java.lang.Object

A knot in the parse-tree. Every knots children is either * (any word_s_) or it accepts one or more words or it is a last word and fires an event.


Field Summary
private  java.util.LinkedList anyChildren
          children, that are associated with *
private  SimpleLandlord.EventRegistration listreg
           
private  java.util.Hashtable wordChildren
          children, that are associated with a particular word
 
Constructor Summary
SemiNaturalVoiceProcessorService.parseTreeKnot()
           
 
Method Summary
 void addChildren(SemiNaturalVoiceProcessorService.parseTreeKnot child, java.lang.String word)
          add c children, is word is null add it for any word / word-combination (except empty ones)
 void fireEvent(java.util.LinkedList sentence, SemiNaturalInputProcessing.Answerable a)
           
 SemiNaturalVoiceProcessorService.parseTreeKnot getChildren(java.lang.String word)
          get the child-know associated with the given word or null if there ist no child registred for that word
 boolean parse(int firstword, java.util.LinkedList sentence, SemiNaturalInputProcessing.Answerable a)
          Parse the sentence given
 void removeKnots(SimpleLandlord.EventRegistration by)
           
 void setEventListener(SimpleLandlord.EventRegistration alistreg)
           
 java.lang.String show(int shift)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

listreg

private SimpleLandlord.EventRegistration listreg

anyChildren

private java.util.LinkedList anyChildren
children, that are associated with *

wordChildren

private java.util.Hashtable wordChildren
children, that are associated with a particular word
Constructor Detail

SemiNaturalVoiceProcessorService.parseTreeKnot

public SemiNaturalVoiceProcessorService.parseTreeKnot()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

show

public java.lang.String show(int shift)

setEventListener

public void setEventListener(SimpleLandlord.EventRegistration alistreg)

fireEvent

public final void fireEvent(java.util.LinkedList sentence,
                            SemiNaturalInputProcessing.Answerable a)

removeKnots

public void removeKnots(SimpleLandlord.EventRegistration by)

getChildren

public SemiNaturalVoiceProcessorService.parseTreeKnot getChildren(java.lang.String word)
get the child-know associated with the given word or null if there ist no child registred for that word

addChildren

public void addChildren(SemiNaturalVoiceProcessorService.parseTreeKnot child,
                        java.lang.String word)
add c children, is word is null add it for any word / word-combination (except empty ones)

parse

public final boolean parse(int firstword,
                           java.util.LinkedList sentence,
                           SemiNaturalInputProcessing.Answerable a)
Parse the sentence given
Parameters:
sentence - a LinkedList of Word