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

beginner question
 
 

Hello, my name is roland and i come from germany

right now i plan a bot for the hotels

but it is really not so easy i try a lot . i make my bot with gaitobot. my question:

when a user write the input

it is possible to get a cappuchino in your restaurant

then is the question for me
how can i make a list with all coffee specialties.

i hope you understand my question

best regards

roland

 

 
  [ # 1 ]

sorry was the wrong category

 

 
  [ # 2 ]

Hi Roland,
I am a beginner too but one way to do this would be to use sets. This is however in the AIML 2.0 draft specification. You can specify a text file with the <set> tag in a pattern. I do not see an easy way to do this in AIML 1.x.

 

 
  [ # 3 ]

Hi, Roland, and welcome to chatbots.org! smile

I’ve moved the thread into the correct area of the forums, no worries.

What you’re asking is possible, but it’s a bit more complex than “beginner level” AIML coding. Sadly, I’m getting ready to go to work, so I don’t have the time to craft an example of how to do something like this, but when I return home from work I’ll try to put something together to show how that might be done. In the meantime, I’m sure that there are others here who might be willing/able to shed some light on this. smile

(in fact, as I was typing this, I see that Pranav posted something, though I have no idea what)

 

 
  [ # 4 ]

it amazing fast this forum i am very happy

Hello Pranav Lal
thank you for the answear
but i work with gaitobot i have to ask if the bot editor works with aiml 2.0

hello Dave Morton

thank you too for the aswear. I never thougt that this question is not so easy for an example made for beginners was very helpful

roland

 

 
  [ # 5 ]

so i ask gaitobot this works with aiml 1.1
then it is better to work at first with pandorabot this aiml 2.0
then the question to pranav lal

how can i do it with a specify a text file can you give me please an example

thanks alot

roland

 

 
  [ # 6 ]

Hi Roland,

I can’t comment on gaitbot. As for an example, I am still working things out. You create a text file with synonims. We call the file coffee.txt in that file, you place all the different words for coffee, one word per line.
Caffè Americano
Café Cubano
Caffè crema
I got the above list from wikipedia at.
https://en.wikipedia.org/wiki/List_of_coffee_drinks
In AIML, you do something like this.
<category>
What kind of <set>coffee</set> would you like</pattern>
<template>So you ordered <set name=“favoritecoffee”><formal><star></formal></set> is the perfect choice for today.
<think><set name=“it”><set name=“topic”><star></set></set></think>

</category>
I have adapted the above example from: https://docs.google.com/document/d/1DWHiOOcda58CflDZ0Wsm1CgP3Es6dpicb4MBbbpwzEk/pub

I am not sure where the text file will go. From what I have read,  this is an implementation detail of each bot.
Pranav

 

 
  [ # 7 ]

Hello,

i am not 100 % sure if i understand that how it works with the .txt file and where in your example put you the txt file in the code? i use now pandorabot

thanks for help

roland from raining kiel

 

 
  [ # 8 ]

soory but i really dont understand it how can i load a coffee.txt file
in my code?

thanks

 

 
  [ # 9 ]

Hi Roland,
I too am trying to find an answer to the question about text files.  However, see Program-ab at https://code.google.com/archive/p/program-ab/
This implementation runs locally and does have a file like what I have described. See the colors set.

 

 
  [ # 10 ]

hi Pranav,

that cannot be the soution of that problem. It must be easier. right now i look the “rossie” example perhaps i find an aswear . And share es with you

greetings

 

 
  [ # 11 ]

Thanks Roland. I await your reply with interest. I have seen a construct called concept in chat script which would take synonyms but that is another language.

 

 
  [ # 12 ]

So here is the deal.

Create a bot on Pandorabots playground. 
You should have four tabs: Your botname, Tran, Files, Logs.  Click on Files.
Add a new file by clicking the +
On the popup make sure you do not choose AIML but change it to Set or Map.
Set for a list of single values, Map for a list of two values.
Use the Pandorabots screen to manually enter some values.
For Sets just enter a word into the “item” textbox and hit enter.  Add a few more entries.
For Maps just enter the name and value.
Hovering over a row displays an X that you can click to delete a row.
Now save and then download files.  You download all of them as a single zip file.
Extract the zip file. 
Then open the file you created in notepad and see how it is formatted.
Edit this file with the data you would like and format the entries with the square brackets and quotes.

My daysofweek set looks like this:

[["Friday"]["Monday"]["Saturday"]["Sunday"]["Thursday"]["Tuesday"]["Wednesday"]] 

Notice the extra [ in the front and the extra ] at the end.

My daysofweek map looks like this:

[["friday""5"]["monday""1"]["saturday""6"]["sunday""7"]["thursday""4"]["tuesday""2"]["wednesday""3"]] 

sets must have a .set extension
maps must have a .map extension
You cannot use a .txt extension

Now go back to Pandorabots playground.
Make sure you have a backup of all of your files.
Look to see if the file you want to upload already exists in your bot.  If it does delete it by selecting it and clicking the trashcan icon.
Click the upload icon next to the + button.
Click add files.  Browse for the file you want to upload.
After choosing the file the filename should appear on the popup with no errors.
Click Start Upload.  It should take 2 seconds and then show a “Done” button.
If it takes longer or is stuck then try using Chrome instead of IE or some other browser.  Chrome works for me.  IE does not. 
Browse to select the file.  Do not try to drag and drop the file onto the screen.
If it still does not work try creating the file manually first in Pandorabots and download and edit it.  Then delete it from Pandorabots and try uploading it again.

Good luck!

 

 

 

 

 

 

 

 
  [ # 13 ]

hello Aleric,

it works great
you help me a lot thank you very much. another question what i don´t understand and it seems that you are the right person for my problem. Iam from germany an we have three form of a word I talk about konjugation
for example i take the word “to go”

no we have :
to go , went , gone

i think it is possible to make that with the “set -tag
but i dont know exactly how i can do it

i want that my bot understand when a person give the input “went” that the bit understand that “went” is a form from “to go

sorry for my english. i hope you understand what i want to say

greetings

roland

 

 
  [ # 14 ]

I don’t know German so you will have to suffer with any badly formatted German grammar.

One way is to put all of the conjugations in a set for one verb and name the set the canonical form.

So for travel I added: reise, reiste, reisten, reistest, and reistet to a set named reisen.

I created a pattern:

<category>
    <
pattern>* <set>reisen</set> * markt</pattern>
    <
template>
        
welchen Markt?
    </
template>
</
category

in the Train tab set your current topic to misc and type
Ich reiste auf den Markt
response:
welchen Markt?

The drawback is that you will have one file for each verb.

 

 

 

 
  [ # 15 ]

Another way is to use the normal.substitution file.  It automatically replaces the first column with the second column.

I added gehe, gehst, and geht to the “normal” file in the same place you edit the sets and maps you will see substitutions.  Only the normal file is run automatically.  Other files can be used after you make a pattern match.

I created the following pattern:

<category>
    <
pattern>gehen markt</pattern>
    <
template>
        
welchen Markt?  
    </
template>
</
category

I entered:
geht Markt
Response:
welchen Markt?

 

 

 1 2 > 
1 of 2
 
  login or register to react