الترقية إلى Platinum الخدمة والحصول على الخاص بك مخصص تصميم 3D الرمزية
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: 2035, today: 0, week: 4, month: 10

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: 2101, today: 1, week: 4, month: 10

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: 2073, today: 0, week: 4, month: 12

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: 2102, today: 0, week: 4, month: 10

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: 2159, today: 0, week: 4, month: 14

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: 2084, today: 0, week: 3, month: 9

معرف: 22796953
Tags: aiml
نشر: Jul 13 2018, 10:35
الردود: 6
الآراء: 2892, اليوم: 1, الأسبوع: 10, الشهر: 27
0 0 0.0/5