Extended AIML

From Jason Shankel's Wiki
Jump to: navigation, search
(Regular Expressions)
(Wildcard Labels)
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/>

Revision as of 20:59, 4 April 2012

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox