Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AIML for Intelligent Answering Engine

I have heard about a programming language called AIML which can be used for programming Intelligent Robots. I am a web developer and have a web crawler build using Python 2.7 and have indexed Wikipedia ...

So I wanted to build a answering engine using python which would use a string variable (It is a HUGE variable containing the whole of Wikipedia) as a source of information and use AI to answer...

Finally, I wanted to put this up on my school website...

So can I do that in AIML?

Later on I also want to modify it so as to give my live scores answers to questions like:

"What is the age of ~someperson~?" etc. For that I'll send my web crawler to index some score pages etc..

Can I program this sort of answering agent in AIML?

If yes please provide links to tutorials which tell me how to do that? (using string variables as a source of information to parse queries and answer like a human)

moreover, AIML uses syntax like:

<category>
    <pattern>WHAT ARE YOU</pattern>
    <template>
        <think><set name="topic">Me</set></think> 
        I am the latest result in artificial intelligence,
        which can reproduce the capabilities of the human brain
        with greater speed and accuracy.
    </template>
</category>

Where pattern is the query and template is answer, so does that mean I have to sit and write these tags for all possible queries?

Or can I make it use its brains to figure out what the person wants and give them answers using the string variable as its source of information.

Thank you.

like image 787
user2243116 Avatar asked Apr 14 '13 08:04

user2243116


People also ask

What is AIML used for?

AIML is an XML based markup language meant to create artificial intelligent applications. AIML makes it possible to create human interfaces while keeping the implementation simple to program, easy to understand and highly maintainable.

Where is AIML used?

AIML can be used to create chatbots, and computer programs that mimic human conversation. AIML can also be used to create virtual assistants, which are computer programs that can perform tasks such as scheduling appointments and sending emails.

What is artificial intelligence answer?

Artificial intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. The term may also be applied to any machine that exhibits traits associated with a human mind such as learning and problem-solving.


1 Answers

AIML

It looks like AIML is a form of pattern matching. Moreover, it looks like this is mainly meant for dialog based agents. Therefore, to use AIML, you would likely need to manually generate every question and the correct response (answer).

Question answering

What it seems like you are really after is what we call a question answering system. Very briefly, a QA system generally has these components:

  • Question analysis.
    • Extract keywords.
    • (Sometimes) determine expected answer type (location, person, color, number, etc.).
  • Candidate document selection---doing a search on your knowledge base using an information retrieval system.
  • Candidate document analysis.
  • Answer extraction---select some part of the document (sentence(s), paragraph(s)).
  • Response generation.
    • Scores and ranks each answer.
    • Displays the most confident answer(s).

Research

If you're really want to dig deeply into this area, I'd suggest using Google Scholar and search for some of the terms I've mentioned, which will give you some research papers that go into detail about many of these topics. Some papers to get you started:

  • Natural language question answering: The view from here
  • Answering complex, list and context questions with LCC's Question-Answering Server
  • The structure and performance of an open-domain question answering system
  • Learning surface text patterns for a question answering system
  • Learning question classifiers
  • What is not in the Bag of Words for Why-QA?

Shameless plug

I've recently taken a course on natural language processing, and developed a rudimentary QA system that uses Wikipedia as a knowledge base. (Actually, I used the Simple English Wikipedia because it was much easier to work with; though the system does work with the full version just much more slowly.)

If you are interested in looking at some Python code as a reference, you may do so on the project's GitHub page: bwbaugh/causeofwhy. In addition, there is some more detailed documentation on what goes on in each step of the system components.

There is also a very basic working demo of the QA system in action that is (currently) available, however bear in mind the system is a proof-of-concept and can take upwards of 30 seconds to respond to a question (depending on the question).

like image 52
Wesley Baugh Avatar answered Oct 06 '22 00:10

Wesley Baugh