Programming Assignment:

Hooking up a Text Editor to a Common Sense Knowledge Base

 

Henry Lieberman

 

For a "warm-up" assignment in using Common Sense knowledge
in applications, I would like to to ask you to do a very simple
implementation of hooking a text editor dynamically to the Open Mind
Common Sense Web interface I showed in class. You may use any
programming language, browser, or whatever is convenient.
You may work alone or in small groups [2-3]. This is due for the meeting
on 3 October.

The idea is to have two windows, a Text Editor window, and an Open Mind
window, side-by-side.

When you type in the text editor, the Open Mind window should display a
set of facts from Open Mind that are relevant to the text you are typing.

There is a CGI interface to the Open Mind Web site that you may use to
collect facts from Open Mind. For example, if you typed

"Today I walked my dog."

You should issue a query to Open Mind like:

http://openmind.media.mit.edu/cgi-bin/get.cgi?concept=dog&number=3

and get back the string

"A dog is a pet.
A collie is a kind of dog.
Dogs and cats don't like each other."

You can also download the entire Open Mind database for off-line processing.
On the Open Mind site, click "Are you an AI Researcher?" for details.

Try to make the application as dynamic as you can; try not to require a
"submit" button or other explicit user action. It can refresh the
Open Mind window periodically, or when an "interesting" word is typed.
The windows can either be browser windows, or your favorite text-editor
windows [e.g. Emacs], or any window on your computer than can display text.

The simplest implementation doesn't need any natural language
analysis at all, but to make it just a bit smarter, here is a list that
will allow you to eliminate "stop words", approximately the
thousand most frequent words in English.

http://www.media.mit.edu/~lieber/Teaching/Common-Sense-Course/Stop-Words.Text

Feel free to consult Hugo and I or your other class members if you have specific
questions; we can give hints about implementing this on various platforms.

Once you get the application working, play with it a bit and type different
sorts of things and reflect on your experience. Do the exercise of describing
your activities yesterday and see what it comes up with. What if you type
something very different, e.g. a review of one of the articles we read?
Were the results useful? Garbage? What did they make you think about?
Did seeing the results affect the way you wrote? Post your reactions on the course bulletin board.

The assignment requirement is just to do the basic implementation
described above, but feel free to add your own ideas or variants.
If you want, you can expand the basic application to a full course project
for the semester. But don't feel constrained to base your term project
on this; other ideas are welcome. Below are a few ideas for expanding the
project. Feel free to post your own ideas along these lines on the course
bulletin board, even if you don't think you'll implement them yourself.
Maybe someone else will pick them up or you can gather a team to do them.

Ideas for extending the text editor project:

If you have some experience with natural language understanding, what sort of
processing on the text can you do to make the results smarter? e,g, use a
part-of-speech tagger or parser?

Can you think of a way to have Open Mind learn new common sense knowledge
from what the user is typing?

How could you make Open Mind's results "useful" to the user who is typing the text,
other than just by looking at it, e.g. as reminders, prompts,
checking for consistency, etc.?

Instead of just general typing, pick a particular user scenario or
application domain, and make something that would be specifically adapted to
working in that domain [e.g. medicine, engineering, lawyers, rock musicians, etc.].

Pick another application other than a text editor to connect Open Mind with
[spreadsheet, drawing program, etc.].

Could you make use of Open Mind's activity patterns instead of the raw statements?

Could you do any "inference" on the results [chain Open Mind facts such as
"A dog is a pet. A pet is a companion."]?

Play with an idea that I call "Spiral Contexts". That is, you start out with a
small amount of context, e.g. "dog", then consider increasingly larger amounts of
context, e.g. "dog"+"walked".

... What are your ideas?

- Henry