となるボットサービスプロバイダに ボットのリブレクトボット
Bot Libre Forum

how would i change fronm is to are

による bobred 掲載 Jul 13 2018, 10:35

how would I change from is to are.if I say like apples instead of I like apple.using map to the map the foods in aiml.

here is my aiml script respond,question and learn.txt


by admin posted Jul 16 2018, 9:18
Not sure I understand. To change "is" to "are" change the "is" in the pattern to "are", or add a new pattern with "are".

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2059, today: 0, week: 6, month: 34

by bobred posted Jul 16 2018, 12:34

 

if the person says I like apples.i would want the response to be what are apples?if the person says I like apple.i would want the response to be what is apple?

how would I use either is for a singular noun or are for a plural noun in the template?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2135, today: 1, week: 7, month: 44

by admin posted Jul 16 2018, 16:21
You cannot do that in AIML, but you could in a Self tag.
Something like:
<category>
<pattern>i like *</pattern>
<template>what <self>if (star.endsWith("s")) { "are"; } else { "is"; }</self> <star/>.
</template>

If your bot has Wiktionary enabled, you could also do more advanced things checking the word's #cardinality.

Note that "I like apple" is not valid grammar. "I like apples" would be correct.
For a singular you would use "I like the apple", in which case you can check for "the" in a pattern.
Trying to parse English or natural language in general is very advanced, there is an example in the Understanding Self script.
But you would need to understand programming for this.
Updated: Jul 17 2018, 9:33
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2101, today: 1, week: 7, month: 40

by bobred posted Jul 17 2018, 10:19

sometimes people do not use good English.They may type it that way or do that on purpose to test how advanced the chatbot is.

there is a error on this blog page when you first enter it.I enter the blog page from somewhere else and it worked.that needs to be fixed. 


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2130, today: 1, week: 9, month: 38

by bobred posted Jul 18 2018, 7:46

what if it asked what type of fruit juice do you like?you could say for a response I like apple.wouldn't that confuse it if i did not use a code like the aiml code you posted?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2196, today: 0, week: 9, month: 51

by admin posted Jul 18 2018, 10:54
I suppose the grammar would be correct in that instance.
So you could check for plural.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2119, today: 1, week: 11, month: 44

Id: 22796953
タグ: aiml
掲載: Jul 13 2018, 10:35
回答: 6
眺望: 2962, 今日の: 1, 週間: 11, 月: 97
0 0 0.0/5