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..

The Question Mark in AIML
 
 

I’m wondering if there will ever be a time when the question mark will be recognized.

Because conversational natural language often produces input that can be interpreted as either a question or a statement, I’m sometimes left with a coin toss for an answer.

Bot:  I can not date you?

Occasionally, I can employ <that> to infer what the visitor meant, or from a keyword used in the previous input, but much of the time, the only way of dealing with it is to use a random list that includes yes/no choices.

I’m sure there’s a reason for ending punctuation being omitted, but if a question mark wasn’t ignored, it would make my work a lot easier.

 

 
  [ # 1 ]

Typically the AIML program uses the sentence splitters “.!?” to segment a multi-sentence input into single sentences, so that the bot can respond to each sentence.

One justification for ignoring sentence splitters in the input to the bot is that, most speech recognition systems generally do not provide punctuation, and we want AIML to be compatible with speech recognition.  If you speak “I can not date you.”, “I can not date you?” or “I can not date you!”, the speech recognizer will detect “I can not date you” in each case, unless you say “I can not date you period” or “I can not date you question mark”.

However if you do need to recognize punctuation, there is a way, at least in Program AB.  (The free Pandorabots server does not give individual botmasters control over this however).  In the file normal.txt you can put

"?"," question mark "
"!"
," exclamation point "
"."
," period " 

and the program will turn your input into “I can not date you question mark”, and you can write an AIML category like

<category>
<
pattern>I CAN NOT QUESTION MARK</pattern>
<
template>CAN I <star/></template.
</
category

 

 

 
  [ # 2 ]

Makes perfect sense, thanks Rich.

 

 
  login or register to react