views:

91

answers:

3

I've studied some simple semantic network implementations and basic techniques for parsing natural language. However, I haven't seen many projects that try and bridge the gap between the two.

For example, consider the dialog:

"the man has a hat"
"he has a coat"
"what does he have?" => "a hat and coat"

A simple semantic network, based on the grammar tree parsing of the above sentences, might look like:

the_man = Entity('the man')
has = Entity('has')
a_hat = Entity('a hat')
a_coat = Entity('a coat')
Relation(the_man, has, a_hat)
Relation(the_man, has, a_coat)
print the_man.relations(has) => ['a hat', 'a coat']

However, this implementation assumes the prior knowledge that the text segments "the man" and "he" refer to the same network entity.

How would you design a system that "learns" these relationships between segments of a semantic network? I'm used to thinking about ML/NL problems based on creating a simple training set of attribute/value pairs, and feeding it to a classification or regression algorithm, but I'm having trouble formulating this problem that way.

Ultimately, it seems I would need to overlay probabilities on top of the semantic network, but that would drastically complicate an implementation. Is there any prior art along these lines? I've looked at a few libaries, like NLTK and OpenNLP, and while they have decent tools to handle symbolic logic and parse natural language, neither seems to have any kind of proabablilstic framework for converting one to the other.

A: 

I'm not exactly sure if this is what you want, but take a look at natural language generation wikipedia, the "reverse" of parsing, constructing derivations that conform to the given semantical constraints.

johanbev
Yeah, thanks, but technically that's the exact opposite of what I'm looking for ;)
Chris S
+3  A: 

There is quite a lot of history behind this kind of task. Your best start is probably by looking at Question Answering.

The general advice I always give is that if you have some highly restricted domain where you know about all the things that might be mentioned and all the ways they interact then you can probably be quite successful. If this is more of an 'open-world' problem then it will be extremely difficult to come up with something that works acceptably.

The task of extracting relationship from natural language is called 'relationship extraction' (funnily enough) and sometimes fact extraction. This is a pretty large field of research, this guy did a PhD thesis on it, as have many others. There are a large number of challenges here, as you've noticed, like entity detection, anaphora resolution, etc. This means that there will probably be a lot of 'noise' in the entities and relationships you extract.

As for representing facts that have been extracted in a knowledge base, most people tend not to use a probabilistic framework. At the simplest level, entities and relationships are stored as triples in a flat table. Another approach is to use an ontology to add structure and allow reasoning over the facts. This makes the knowledge base vastly more useful, but adds a lot of scalability issues. As for adding probabilities, I know of the Prowl project that is aimed at creating a probabilistic ontology, but it doesn't look very mature to me.

There is some research into probabilistic relational modelling, mostly into Markov Logic Networks at the University of Washington and Probabilstic Relational Models at Stanford and other places. I'm a little out of touch with the field, but this is is a difficult problem and it's all early-stage research as far as I know. There are a lot of issues, mostly around efficient and scalable inference.

All in all, it's a good idea and a very sensible thing to want to do. However, it's also very difficult to achieve. If you want to look at a slick example of the state of the art, (i.e. what is possible with a bunch of people and money) maybe check out PowerSet.

StompChicken
PR-OWL looks interesting, in that they've realized a usable semantic network needs to handle uncertainty. However, I've never liked OWL because it was never clear to me how they reify entities. Plus, like you mentioned, the project appears to be vapor at this point with no actual published code.
Chris S
+2  A: 

Interesting question, I've been doing some work on a strongly-typed NLP engine in C#: http://blog.abodit.com/2010/02/a-strongly-typed-natural-language-engine-c-nlp/ and have recently begun to connect it to an ontology store.

To me it looks like the issue here is really: How do you parse the natural language input to figure out that 'He' is the same thing as "the man"? By the time it's in the Semantic Network it's too late: you've lost the fact that statement 2 followed statement 1 and the ambiguity in statement 2 can be resolved using statement 1. Adding a third relation after the fact to say that "He" and "the man" are the same is another option but you still need to understand the sequence of those assertions.

Most NLP parsers seem to focus on parsing single sentences or large blocks of text but less frequently on handling conversations. In my own NLP engine there's a conversation history which allows one sentence to be understood in the context of all the sentences that came before it (and also the parsed, strongly-typed objects that they referred to). So the way I would handle this is to realize that "He" is ambiguous in the current sentence and then look back to try to figure out who the last male person was that was mentioned.

In the case of my home for example, it might tell you that you missed a call from a number that's not in its database. You can type "It was John Smith" and it can figure out that "It" means the call that was just mentioned to you. But if you typed "Tag it as Party Music" right after the call it would still resolve to the song that's currently playing because the house is looking back for something that is ITaggable.

Hightechrider
The problem is generally called anaphora resolution. If you just restrict it to resolving 'he' and 'she' it's called pronoun resolution. There are systems that can do it, but not usually very well. Last time I used one, it caused a lot of errors because it couldn't tell that Barack Obama was a man's name.
StompChicken
Anaphora/pronoun resolution is one issue, but the problem is more general than that. If I refer to "the man" in two different discourses, it may or may not refer to the same entity. In an open-world domain, this problem potentially applies to any word in a sentence.
Chris S
In that case it's usually called (cross-document) entity resolution. There was a contest on that a while ago: http://www.kdnuggets.com/news/2007/n08/10i.html Not sure what came of it.
StompChicken
Yeah, I remember the Spock challenge. It was never well defined, and the company running it seemed to lose interest in the event and was never very responsive to participant's questions.
Chris S