I need some help to understand AIML templates using an example below, your help is appreciated to get this template working.
These are some of the sample inputs I am trying to handle and output I want to generate from AIML parsing.
Input : sale abc
Output : SALES ABC
Input : sales abc
Output : SALES ABC
Input : sale of product abc
Output : SALES ABC
Input : sale product abc
Output : SALES ABC
Input : What is the sale of product abc
Output : SALES ABC
Input : What is the average sale of product abc
Output : AVG SALES ABC
Input : What is the avg sale of product abc Output : AVG SALES ABC
Input : What is the last 30 day average sale of product abc Output : AVG SALES ABC 30
Input : What is the last 30 day avg sale of product abc Output : AVG SALES ABC 30
I have been trying to start with something like this to begin with but this does not seem to progress well due to lack of clarity on this tool to me.
<category><pattern>
# <set>numbers</set> <set>days</set> <set>average</set> sales <set>prepositions</set> *</pattern>
<template>SALES <star index="1"/>,<star index="2"/>,<star index="3"/>,<star index="4"/>,<star index="5"/>,<star index="6"/> </template>
</category>
Where numbers set define > 1,2,3,4,5..... 100
Days set define > day, days
Average set define > average, avg , averages
Prepositions set define > of
Thanks!