AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

How to make a universal pattern for dates in specified format?
 
 

Hello Everyone!

Currently I am writing my thesis on AIML (not AIML 2.0).
And recently I have encountered a trouble.
I need AIML interpreter to trigger special pattern when it receives a date in a format like day.month.year (example: 15.10.2015 or 11.11.2015).

But can`t even imagine how it can be done.

Could you please give me an advice on it?

Thanks in advance.

Sergey

 

 
  [ # 1 ]

Do you want it to automatically recognise dd mm yyyy as a date?
Will the bot say anything to trigger the input of a date?

 

 
  [ # 2 ]

yes, that is what I am speaking about.

 

 
  [ # 3 ]

Something like this?

<category>
<
pattern>START TEST</pattern>
<
template>
Please enter a date in the format dd mm yyyy.
</
template>
</
category

<
category>
<
pattern>* * *</pattern>
<
that>PLEASE ENTER A DATE IN THE FORMAT DD MM YYYY</that>
<
template>
<
think>
  <
set name="date"><star index="1"/></set>
  <
set name="month"><star index="2"/></set>
  <
set name="year"><star index="3"/></set>
</
think>
Thank you for that date.
</
template>
</
category
 

 
  [ # 4 ]

Steve, thanks a lot!
Is there a chance to do it without “space” between dd, mm and yyyy?

 

 
  [ # 5 ]

If you enter a date in the format 06/12/2015 or 06.12.2015, the delimiters will be automatcally stripped out and replaced with spaces, assuming you are using the original normal.txt substitutions file.

 

 
  [ # 6 ]

Thanks. The problem was in my splitters.file =)

 

 
  [ # 7 ]

Nice one. Glad you found it.

 

 
  login or register to react