grammar
Having played about with it a bit I've found out how the grammar works, and it's really very nice indeed. I devised the following XML grammar for my rodney robot, with the idea being that I could interact with the robot within a limited speech domain in order to help it learn to identify several objects. Just testing the recognition a few times I got 100% success with no errors at all!
- Bob
- <RULE NAME="Greeting" TOPLEVEL="ACTIVE">
<RULEREF NAME="salutation" />
<RULEREF NAME="person" />
</RULE>
- <RULE NAME="salutation">
-
hello
hi
hi there
good morning
good afternoon
good evening
</RULE>
- <RULE NAME="person">
-
rodney
bob
kate
sandra
roy
</RULE>
- <RULE NAME="DefineObject" TOPLEVEL="ACTIVE">
<RULEREF NAME="isa" />
<RULEREF NAME="ObjectName" />
</RULE>
- <RULE NAME="isa">
-
this is a
it is a
it's a
you're looking at a
you are looking at a
</RULE>
- <RULE NAME="ObjectName" DYNAMIC="TRUE">
-
this
person
ball
toy
cup
wooden toy
wooden man
desk
telly
keyboard
</RULE>
- <RULE NAME="Attention" TOPLEVEL="ACTIVE">
<RULEREF NAME="attendto" />
<RULEREF NAME="ObjectName" />
</RULE>
- <RULE NAME="attendto">
-
look at the
look at
look towards the
look towards
see the
</RULE>
|