Tuesday, November 16, 2010

Long Time.

Just noticed its been a LONG time since I blogged. I need to get in the habit of doing this regularly.

Over the last year I've been reading a number of books and watching a lot of online lectures. I recently completed Machine Learning by Tom Mitchell and am close to finishing Pattern Classification by Duda, Hart and Stork.

I also listened to Andrew Ng's lectures on Machine Learning. I realized that my linear algebra was a bit rusty so I also watched the Linear Algebra lectures at Khan Academy. I have also been working my way thru the WSDM2010 conference videos but I haven't found much of interest to me in these.



As usual, I have more books on my reading list than I can possibly read but I'll have to make another post to show the ones I'm planning on reading in the near future.

Sunday, November 1, 2009

Makrov Logic

I watched a video lecture on Markov Logic at http://videolectures.net/icml08_domingos_ipk/ yesterday and was very impressed by the technology. The idea is that you apply first order logic to various Natural Language Processing tasks. However, first order logic is too contraining because things can either be true or false. Specifically, if you get one piece of evidence that doesn't support your premis then it is considered false. Markov Logic solves this issue by applying weights to the first order formulas. Then, when a contracticting piece of evidence is encountered, instead of making that formula false, it just lowers the probability of it being true.

In the video, Pedor Domingos, explains how this can be used to resolve the two statements "Smoking causes cancer." and "Friends have similar smoking habits." Either of these might be true in the majority of cases but there might be a contradictory instance found for each. He also discusses Belief propagation and how this can be very slow on VERY large networks so he presents a Lifted Belief Propagation algorithm to reduce the network size being worked on. For learning he recommends a "Voted Perceptron" and gives and application example involving recognizing citations.

Domingos mentions how this could be also used in unsupervised co-reference resolution and Ontology induction. He includes a link to the "alchemy" system http://alchemy.cs.washington.edu/ they have developed which incorporates all of this logic.

The most obvious place where I think people would be interested in using this technology is in storing semantic information that is learned from text. My concern is that this might be too large of a network to handle even with the lifted belief prorogation but it certainly is an area worth research. My interest is how this could be used to learn and code grammar rules. I've been reading a bit about various HMM (http://acl.ldc.upenn.edu/acl2002/MAIN/pdfs/Main036.pdf) and Maximum Entropy Systems (http://acl.ldc.upenn.edu/A/A00/A00-2018.pdf) for parsing lately and what has struck me is that they mix statistics and automatic rule learning. I have always felt that the rule learning systems of the past were replaced with statistical models that, though they performed better, didn't recognize the advantages of the old rule based systems. The systems seem to encode the rules and learn patterns that override the basic statistics.

I think a technique like Markov logic could be used to take this to the next level. Typical Max Ent systems iterate over the learning text and select the rules that result in the highest probability of matching the test data. A Markov Logic system could recognize each rule or contradiction but wouldn't have to through out rules, it could just lower the probability of them being true. This seems like the best way to develop a grammar to me. Now if we can only figure out how to make it work on unsupervised data.

This is definitely an area I want to learn more about.

Thursday, October 15, 2009

Pattern Recognition in Speech and Natural Language Processing - Chapter 8

I've been reading Pattern Recognition in Speech and Natural Language Processing by Chou and Jang. I have to admit I wasn't really enjoying it much and skimmed much of the first 7 chapters. This wasn't so much that the book is bad, as the first 7 chapters are more about speech processing and my primary interest is in language processing.

That all changed when I got to chapter 8 and they started addressing HMM. I found the "Topic Classification" section rather interesting but was most interested in the section entitled "Unsupervised Topic Detection". In this part they discuss using inverse document frequency and regular word frequency to create a measurement of how likely a term is an important concept in the document. They then use this to create possible topics for the document. When they compared their results to human judges they found a very high (90%) relevence of the topics they chose this way. Pretty impressive as far as I am concerned.

I'm always interested in unsupervided techniques.

Wednesday, May 21, 2008

Response to comment...

Roger asked "How do you intend to verify whether you have understood a text?"

Good question!

The short answer is to look at the logical representation of the text in memory. It would be even better if I had an interface to be able to ASK questions of this logical representation. For instance, if the following sentence is read: "The man slowly climbed the stairs." Then we should be able to ask if the man climbed and the answer should be "yes". If we ask what the man climbed then the answer should be "the stairs". Additionally, I would like to see the system learn that men can climb stairs and that this can be done at varying speeds (or at least slowly).

Of course I have to learn to walk before I can fly...so there are more unanswered questions than answered ones right now. How will I query those facts? How will I represent the fact internally? How will I interpret the text into this internal representation? How will I parse the sentences before interpreting them? How will I recognize parts of speech? How will I learn those rules for recognition of parts of speech?

This is where I think I am now. I found with the Porter Stemmer how to recognize some words as verbs. Next I have to figure out recognize other parts of speech and what to do with the words I DON'T recognize. Maybe if it can get the list of words it doesn't understand down to a manageable level, it could ask a user for some information. Hopefully, by asking a user a few careful questions it will be able to learn rules that will allow it to categorize large quantities of unknown words. One thing I DON'T want to do is use some sort of preexisting knowledge of what parts of speech words are. I also don't want to train my application on test data and then have it only have that level of understanding. I would prefer to be able to make an application that, programmed with a core set of rules, would be able to build up its own dictionary and continuously refine its understanding with every bit of text it encounters.

Where I am so far...

I became interested in Natural Language Programming when I was reading Artificial Intelligence - a Modern Approach (2e) by Peter Novig. I read the first 13 chapters in depth but only did a single read through on the remaining chapters. I intend to go back finish the rest of it later. After that I started reading Foundations of Statistical Natural Language Processing by Manning and Schutze. Though I read the whole thing, I became very lost in the final chapters. One of the things that made me lose interest is that it was more about how to statistically recognize languages and my interest is more in getting a computer to understand and create an internal representation of what was read. Some of the concepts, I felt would be easier to understand after a read more introductory material as well.
This lead me to start reading Speech and Natural Language Processing by Jurafsky and Martin. I think the book is great and I just finished chapter five today. Chapter 3 introduced me to stemming. I found a text version of a novel on line (a cheap sci fi) and I've written an application to parse out all the words. I implemented the Porter Stemming algorithm and was pleased to find that, of the 8000 distinct words in my file, I could find determine that about 2000 of them where stems of other words. I have the system make a "guess" that a word is a verb if it finds the stem, -ing, -ed and -s versions of a word.
Chapter 5 is where the book became really interesting as far as I am concerned. I've implemented the Levenshtein minimum edit distance algorithm and am working on the forward algorithm. I plan to implement the Viterbi algorithm next week sometime.

Let the blogging begin...

Hi, I started this blog because I'm very interested in Natural Language Processing. My primary interest is in representing the semantics of text to a computer.
I am just beginning my study in this area and would appreciate any input anyone has in the form of comments!