Télécharger Bot Libre de Bureau, votre propre bot pour votre PC ou votre Mac
Bot Libre Forum

how would i change fronm is to are

par bobred posté 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: 2083, today: 0, week: 8, month: 17

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

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

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

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: 2211, today: 0, week: 3, month: 10

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

Id: 22796953
Tags: aiml
Posté: Jul 13 2018, 10:35
Réponses: 6
Vues: 3003, aujourd'hui: 1, semaine: 10, mois: 33
0 0 0.0/5