Extended AIML

From Jason Shankel's Wiki
Jump to: navigation, search
(Regular Expressions)
 
Line 75: Line 75:
 
It's simple enough to avoid this and just use the multi-pattern feature when you know wildcards will match up, but it occurred to me that for readability it might be nice to name wildcards.  So I added a ':' operator thusly:
 
It's simple enough to avoid this and just use the multi-pattern feature when you know wildcards will match up, but it occurred to me that for readability it might be nice to name wildcards.  So I added a ':' operator thusly:
  
"*:visitor IS VISITING *:host" (by convention, variable names are lower case and input literals upper)
+
"*:visitor IS VISITING *:host" (by convention, variable names are lower case and input literals upper)
  
 
So now, "MARY" can be matched in "MARY IS VISITING JOHN" with both <star index="1"/> and <star name="visitor/>
 
So now, "MARY" can be matched in "MARY IS VISITING JOHN" with both <star index="1"/> and <star name="visitor/>
Line 96: Line 96:
  
 
In this case "I LIKE CHICKEN" would have have <star name="what_i_like/> set to "CHICKEN" in the template section.
 
In this case "I LIKE CHICKEN" would have have <star name="what_i_like/> set to "CHICKEN" in the template section.
 +
 +
===Context Identification===
 +
 +
TBD
 +
 +
===Response Generation===
 +
 +
TBD

Latest revision as of 00:29, 5 April 2012

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox