|
|
Member
Total posts: 11
Joined: Dec 6, 2014
|
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
|
|
|
|
|
Posted: Dec 8, 2014 |
[ # 1 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Hi and welcome, Mark!
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.
|
|
|
|
|
Posted: Dec 8, 2014 |
[ # 2 ]
|
|
Member
Total posts: 11
Joined: Dec 6, 2014
|
Thanks Dave 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.
|
|
|
|
|
Posted: Dec 8, 2014 |
[ # 3 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
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.
|
|
|
|
|
Posted: Dec 8, 2014 |
[ # 4 ]
|
|
Senior member
Total posts: 498
Joined: Oct 3, 2008
|
> 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.)
|
|
|
|
|
Posted: Dec 8, 2014 |
[ # 5 ]
|
|
Senior member
Total posts: 498
Joined: Oct 3, 2008
|
CSV = Comma-Separated Values
XLS = Excel
XSLT = eXtensible Stylesheet Language Transformations
|
|
|
|
|
Posted: Dec 8, 2014 |
[ # 6 ]
|
|
Guru
Total posts: 1081
Joined: Dec 17, 2010
|
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.
|
|
|
|
|
Posted: Dec 9, 2014 |
[ # 7 ]
|
|
Member
Total posts: 11
Joined: Dec 6, 2014
|
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
Matt
|
|
|
|
|
Posted: Dec 9, 2014 |
[ # 8 ]
|
|
Guru
Total posts: 1081
Joined: Dec 17, 2010
|
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.
|
|
|
|
|
Posted: Dec 9, 2014 |
[ # 9 ]
|
|
Member
Total posts: 11
Joined: Dec 6, 2014
|
Thanks Merlin, is AIML2 an editing app? I know of the AIML 2.0 standard but wasn’t sure.
Thanks
|
|
|
|
|
|
Posted: Dec 10, 2014 |
[ # 11 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
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.
|
|
|
|
|
Posted: Dec 11, 2014 |
[ # 12 ]
|
|
Member
Total posts: 11
Joined: Dec 6, 2014
|
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
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
|
|
|
|
|
Posted: Dec 11, 2014 |
[ # 13 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
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>
|
|
|
|
|
Posted: Dec 12, 2014 |
[ # 14 ]
|
|
Member
Total posts: 11
Joined: Dec 6, 2014
|
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> <pattern> Beavers can hold their breath for 45 minutes under water </pattern> <template> </template> </category>
http://www.pandorabots.com/pandora/aiml-converter.html
|
|
|
|
|
Posted: Dec 12, 2014 |
[ # 15 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
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?
|
|
|
|