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

Converting Excel into AIML
 
 

Hello,

I have a list of 1000 facts that I mined currently in excel in the example format below:

“Learn Beavers can hold their breath for 45 minutes under water.”


What is the smoothest way to import this into AIML so it can uploaded it into my bot?


Quantumchaos

 

 
  [ # 1 ]

Hi and welcome, Mark! smile

Without a bit more information it would be difficult to advise you properly. There are literally dozens of ways to convert the data into AIML, most of which make use of some sort of script to do so. If you know any scripting languages (e.g. PHP, Python, Ruby, Javascript, etc. - the list is virtually endless) you could export the Excel file to a tab delimited text file, then use the script to read each line, plug in the various values to a text template, and save the results to an AIML file. This is what I would do if the task were mine, but this would also depend a LOT on the structure of the data within the file. I would at least want to see how the data was arranged before I could make any further suggestions.

 

 
  [ # 2 ]

Thanks Dave smile  It is currently in Tab Delimited, in a single column.  I have attached the first 6 rows below as an example.

Learn Beavers can hold their breath for 45 minutes under water.
Learn “Arachibutlphobia” is the fear of peanut butter sticking to the roof of your mouth.
Learn “Challenger Deep” is the deepest point on Earth and can hold 25 Empire State Buildings end to end.
Learn “Disco” means “I learn” in Latin.
Learn “O” is the oldest letter of the alphabet, dating back to 3000 B.C.
Learn “Q” is the only letter in the alphabet not appearing in the name of any U.S. state.

 

 
  [ # 3 ]

Well, (again) if it were me, I’d write a PHP script to handle this task, since that’s the language I’m best at. But I’m well aware of the fact that not everyone is skilled in PHP, so perhaps a quick rundown of your skillset would be a benefit here. cheese

 

 
  [ # 4 ]

> Converting AIML into Excel

I’ve made a lot of experiments trying to automate AIML knowledgebase construction.  Keep in mind that “spreadsheet” (CSV) is a more generic term for “Excel” (XSL).  I suggest first looking at converting AIML into CSV using XSLT.  (You can search this forum for “XSLT” to see various versions of my experimentation.)

 

 
  [ # 5 ]

CSV = Comma-Separated Values

XLS = Excel

XSLT = eXtensible Stylesheet Language Transformations

 

 
  [ # 6 ]

As Dave said, if you are just trying to take the file and convert it to an AIML file:
From Excel, save it as a text file -> open it in a text editor (notepad++) use search and replace to put the text items into an AIML template.

But, it almost sounds like you are actually looking to use the “LEARN” functionality of some AIML bots.
If so, it will depend on what interpreter (Pandorabots?) you are using.

You can have a program read the text on a line by line basis and submit each line to the interpreter. There is no standard program that does this but many of us have created our own version of this functionality in our own favorite programming language.

 

 
  [ # 7 ]

Thanks for the replies…I actually removed the “Learn” text from this file so it can be simple facts added into AIML. 

I do have one question, is AIML defined within Notepad++?

I am definitely interested in seeing some examples of the interpreter programs, this in conjunction with creative data mining might be interesting to run for a year or so smile

Matt

 

 
  [ # 8 ]

No, AIML is not defined, but XML is. It is easy to add the style tags on your own.
You might look into AIML2 with program AB.

 

 
  [ # 9 ]

Thanks Merlin,  is AIML2 an editing app?  I know of the AIML 2.0 standard but wasn’t sure.

Thanks

 

 
  [ # 10 ]

No. I was speaking of the AIML 2 Standard.

Some of the AIML sets already include MindPixel common sense data.
https://www.chatbots.org/ai_zone/viewthread/605/

 

 
  [ # 11 ]

Matt - What sort of categories are you hoping to make from the input: “Learn Beavers can hold their breath for 45 minutes under water.”? If it’s things like “What can beavers do?”, I doubt a simple search/replace will suffice.

 

 
  [ # 12 ]

My plan is too initially take facts that are pulled from online resources automatically, possibly creating a script to do this that can have criteria to focus it’s search (ex. Sun facts), cleanup this data and populate it into the correct AIML format to be compiled into my bot.  The “Learn” command is unnecessary, so ignore that smile

I am working on a proof of concept for this and ultimately I want to have it running 24/7.

The category performance size issues are a concern but will not impact my initial POC.


Matt

 

 
  [ # 13 ]

I still don’t understand. Will your program take input such as:

Beavers can hold their breath for 45 minutes under water.

and create something like:

<category>
<
pattern>WHAT CAN BEAVERS DO</pattern>
<
template>Hold their breath for 45 minutes under water.</template>
</
category
 

 
  [ # 14 ]

Yes that is the plan, i started looking at the link below but realized it would only output something like the code below and not be able to infer the pattern from the statement.

<category>
    <
patternBeavers can hold their breath for 45 minutes under water </pattern>
    <
template> </template>
 </
category


http://www.pandorabots.com/pandora/aiml-converter.html

 

 

 
  [ # 15 ]

How are you going to differentiate between things like:

What can beavers do?
What does disco mean?
what is Arachibutlphobia?

Do you have some clever parsing method?

 

 1 2 > 
1 of 2
 
  login or register to react