LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2007, 09:24 PM   #1
muskvar
Member
 
Registered: May 2007
Posts: 54

Rep: Reputation: 15
Help Me!!


i want to write a program which can evaluate technical subjective answers. i really do not know how to start of.

so, can anybody please guide me with some ideas and implementation?
 
Old 12-04-2007, 09:35 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by muskvar View Post
i want to write a program which can evaluate technical subjective answers. i really do not know how to start of.

so, can anybody please guide me with some ideas and implementation?
I think you may need to provide an example of how the program would work--ie data given to the program and the desired response.
 
Old 12-05-2007, 02:40 AM   #3
muskvar
Member
 
Registered: May 2007
Posts: 54

Original Poster
Rep: Reputation: 15
typical question:
what is a computer network:
ans:a computer network is an interconnection of autonomous machines...

required answer=the answer expected from the student

the program has to compare the two answers and grade the written answer from the student.
 
Old 12-05-2007, 03:20 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
To do this properly there are some small sub-problems to solve first:
  • extraction of the meaning a natural language sentence
  • comprehension of the meaning of a statement
When you have invented the positronic brain, I will tell you how to program it.

Seriously though, these are not problems which are well solved in computer science, so I doubt you will find a good solution to the problem you posed. Until then, you need a qualified teacher to do this task fairly.

A cheap and nasty approach might be to see if the student mentions key words which you would expect to see, but this will never be very good. Even more sophisticated statistical word analysis methods suffer from the same problem. Consider the two student responses to the question you provided:
  • it's a bunch of inter-linked general purpose computation devices.
  • network machines a network autonomous network interconnection network computer is an of.
Any key-word based system would mark the first as 0, and the second as at least some marks, despite the fact that the seconds is meaningless nonsense, and the first probably deserves at least something.

The point is that computers don't understand the meaning of natural language statements at this time, and if you're trying to judge the validity of a written statement, you're not going to be able to automate that process in any reliable way.

What you can do is re-design the question so that it can be automatically marked. e.g. by making the test multiple-choice. However, this is not going to be suitable for all question types. To judge if it is, you probably need some education expert (which I am certainly not).
 
Old 12-05-2007, 06:43 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I would look into using something like a chatbot for doing the language processing. Some of them are quite good reducing language into basic keyword components and can execute external programs when needed for other functions. I recently was looking at 'charlix' which is probably the best suited for that purpose. It can be used as a system help and system administration tool -it knows about different programs and what they do. Unfortunately it uses java so it may be a little slow. But you could use some other bot program which uses another language like python or one that is wriitten in C++ or C.
I started a couple of months ago working with one calle 'ainebot' which is written in C. Unlike most of the others it does not use the AIML language. Instead it uses a simplified format of AIML. It still achieves most of the functionality avaliable with standard bots, but data files used with other bots must be translated into the aine format. It is much faster than most other bots since it is written in C and instead of having to load huge data files each time it is run, it 'compiles' the data files into a condensed and indexed form. this means it starts immediately. The drawback is that it can't load more data files on the fly like most other bots.
 
Old 12-05-2007, 05:08 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I agree with matthewg42; what you want is (I believe) known as strong AI, and we don't have it (yet...).
 
Old 12-06-2007, 12:30 AM   #7
muskvar
Member
 
Registered: May 2007
Posts: 54

Original Poster
Rep: Reputation: 15
i went and read about ALICE,AML and program D.

but i couldnt understand how to use program D on my desktop.

Also can AIML be used to evaluate the answers i was talking about earlier.

please help!!
 
Old 12-06-2007, 01:22 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
AIML is the best we've got for processing language so far. It is able to break language down into basic parts and recognize similar words or phrases and refer them to the same answer. All of the chatbots can do this pretty well, but their vocabulary and scope of knowledge are pretty general. There are several engines which can be used. These are combined with data files which constitute the personality of the bot.
As I mentined, charlix is a little different in that it has a 'personality' which turns it into a system administration tool which uses natural language instead of exact syntax for commands.
For instance you can ask it: What is kopete? And it will answer telling you what the program does. Then you could tell it something like: Do I have that on my system? It will check to see if it is installed. If not, it might ask you: Would you like to install it? You could say, Yes I'd like that very much. It will then download and install the program for you.
The author has built a pretty complete tool this way, for administering a debian box. He includes the use of many external programs. he also has written a set of aiml data which makes it easy for you to teach the bot new stuff. You can ask it a question and if it doesn't answer correctly you tell it 'wrong' or 'wrong answer' or 'bad answer' and it will then pop up a dialog box which lets you give the correct answer. Using the 'reversed aiml' it will automatically generate many different variant forms of the same question which should be answered with that answer.

To use charlix you need some sort of program D interpreter -that is a java-based aiml interpreter, or you can use libaiml or qaiml. Basically you just install the interpreter and then place the charlix AIML files in the same folder or even replace the standard AIML files completely with the charlix files.
It should give you a good taste of what can be done. It's pretty surprising what can be done.
I've done some work toward doing something similar to what you want. I had the idea to create a help bot before I ran across charlix. I am using the ainebot interpreter as it is written ic C. It doesn't matter so much which engine you use. The trouble it get the data files like you want. Any of the bot personality will provide the basic functions of 'reducing' many statements to a simpler, more direct form. Beyond that you'd be on your own to teach the bot the questions and answers that you want. There are several bots which have the ability to learn.

You might get a taste of what can be done by creating your own online at the pandorabots site.
These techniques are being used in lots of robots to give them somewhat natural language abilities. Your needs are fairly straightforward in that you don't need to give the bot any particular personality and the scope of its' knowledge could be limited to just the subjects and questions you want. Still, it won't be a trivial matter, though you'll find that AIML is pretty easy to write and the hard part of creating rules which deal with variations in grammar has already been done.
 
Old 12-07-2007, 04:20 AM   #9
muskvar
Member
 
Registered: May 2007
Posts: 54

Original Poster
Rep: Reputation: 15
thanks for your insight gnashley.

i have my exams going on now and i will surely give the AIML a try.

i if hit some roadblocks i will post it here.

thank you.

also will you be constanty watching on this thread?
 
Old 12-07-2007, 04:53 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
YEah, I get an e-mail whenever there's a new posting. I may soon get back to doing some work on this subject myself -I've had to take a few weeks to do some more work on my src2pkg package-making software. If you use regular AIML data files then you'll have a variety of interpreters which can be used.
 
Old 12-21-2007, 07:10 AM   #11
muskvar
Member
 
Registered: May 2007
Posts: 54

Original Poster
Rep: Reputation: 15
i have installed rebecca AIML interpreter as an eclipse plugin.

i have used rebecca since it came with an eclipse plugin and i can also program in java.

my question now is:
say a user(client) questions the bot:"retreive the tuples from a restaurants table"
the bot should then retrieve the tuples using an sql query:"select * from restaurants"

how do i program this in AIML?

urgent help needed...

good day.
 
Old 12-21-2007, 07:12 AM   #12
muskvar
Member
 
Registered: May 2007
Posts: 54

Original Poster
Rep: Reputation: 15
of course i have assumed that in my java code i have established a connection to the database server(I am using Java derby network server) using the Derby network client driver and created a database with tuples entered into the restaurants table under the database.
 
Old 12-21-2007, 01:02 PM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Here's a small sample from the debconf.aiml file from charlix which shows a little of the sort iof theing you want.

Code:
<category><pattern>OPEN EMULE *</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>OPEN * EMULE</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>OPEN * EMULE *</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>FIND EMULE *</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>FIND * EMULE</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>FIND * EMULE *</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>INSTALL EMULE *</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>INSTALL * EMULE</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
<category><pattern>INSTALL * EMULE *</pattern><template><srai>INSTALL FILESHARING</srai></template></category>
You may also need entries in a reductions.aiml or reducer.aiml file which make RETRIEVE * point to download or lookup or search, etc.

I really recommend that you download the charlix aiml files as it is the most comprehensive that I have seen for branching the aiml files into useful system functions, etc. It even has some functions where it runs Xdialog or zenity to provide dialogs for doing things, such as learning, etc.

You'll soon figure out that much of the utility and funny, hard-to-trace erros come about from the reductions of various ways of saying the same thing. You may need to start pretty much from scratch with these basic aiml data files so that you can focus the functionality, vocabulary and perceived 'personailty' of the bot. I worked for a few days on getting some utility out of some files until my head was like spaghetti... Hopefully you are a little younger than I am and you won't find it so distressing. It does help to start with just a few very short data files if you have trouble getting a feel for the flow of the reductions and referrals that take place.

You can get charlix here:
http://sourceforge.net/project/showf...roup_id=162919

I hope this helps you get further along. AIMl is used to program lots of robots to give them natural-language capability, so I have no doubt it can do what you want. Just needs a sharp person who can use both left and right sides of the brain...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration