Making a copy of WEKA Instances

This ‘thing’ took about 30 minutes to figure out. According to the WEKA documentation, if you add a new Instance to an existing Instances object, String values are not transferred ! In case you are working on copying a dataset with a string attribute, you need to transfer the string manually. The code segment below copies the i^th instance from source to dest where the first attribute (at index 0) is a string attribute....

April 12, 2010

Google as a Question Answering System

A Question Answering (QA) system is an Information Retrieval system which gives the answer to a question posed in natural language. For example, if you ask it Who wrote Hamlet?, it should answer Shakespeare. A few years ago (don’t ask me how many), search engines did not focus on language queries. Recently [sic], Google has started incorporating some NLP (Natural Language Processing) in their results. You can try it out by typing the same question in the search box yourself ( or clicking here )....

February 6, 2010

How to get formants of phones from sound files

This tutorial is mostly for people (esp. my AI students) who want to find formants of any sounds sample. So here are the things/software you will need. a good mic (recommended but not necessary) a quite room any software which can cut and save wav files. I use Praat. the console version of Praat, called PraatCon. This will be used to extract the formants from wav files. about 30 mins. Once you have all these things, here is what you do for recording the phone sounds...

July 22, 2009

River Crossing and State Space Search

I made a small 10 min demo to simulate the classic river crossing puzzle for teaching state space search in my AI class. I did exercise my right to be creative by changing the characters a bit. Jerry, Tom and Spike have to cross a river, going from the right side to left, in a boat. While you are in the boat, they behave. But as soon as you leave Tom with Jerry or Tom with Spike on one side WITHOUT the boat, they start fighting....

June 26, 2009