યજમાન તમારા પોતાના બોટ પ્લેટફોર્મ સાથે આ બોટ કાવ્ય Enterprise બોટ પ્લેટફોર્મ
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: 1812, today: 0, week: 0, month: 5

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: 1861, today: 0, week: 0, month: 8

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: 1849, today: 0, week: 0, month: 5

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

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: 1918, today: 0, week: 0, month: 7

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: 1858, today: 0, week: 0, month: 6

ને: 22796953
ટૅગ્સ: aiml
પોસ્ટ: Jul 13 2018, 10:35
જવાબો: 6
જોવાઈ: 2451, આજે: 1, સપ્તાહ: 1, મહિને: 11
0 0 0.0/5