[Corpora-List] algo for semantic structure
Dan Garrette
dhgarrette at gmail.com
Sun Sep 7 19:07:29 UTC 2008
Vrone,
The most common way to turn syntax into semantics is by defining logical
expressions for each part of speech in a sentence and then composing those
parts to make the meaning of the whole. For instance, to find the meaning
of the sentence "John sees a man" we can start by assigning a logical
meaning of each word in the sentence:
[John] john
[sees] \x.\y.sees(x,y)
[a] \P.\Q.exists x.(P(x) & Q(x))
[man] \x.man(x)
*Note: The backslash symbol "\" represents the "lambda" operator used in
lambda calculus.
We can then "compose" the meanings of individual parts to derive the meaning
of the whole sentence by using function application. So, to find the
meaning of "a man" we can apply the function for "a" to the function for
"man":
(\P.\Q.exists x.(P(x) & Q(x)))(\x.man(x))
beta-reduces to: \Q.exists x.(man(x) & Q(x))
"sees" applied to "John" (and beta-reduced) results in :
\y.sees(john,y)
And "a man" applied to "john sees" results in the meaning of the whole
sentence:
exists x.(man(x) & sees(john,x)).
Now, this explanation was probably a bit quick, so I invite you to check out
the Natural Language Toolkit (www.nltk.org) for further reading. The
Toolkit, for which I have developed a large amount of the semantics-related
material, contains documentation that explains, in depth, how to compute the
meaning of a sentence. Particularly, see the chapter on Logical Semantics
[1]. You should also download the open-source code, written entirely in
Python, to see precisely how these algorithms are implemented. The NLTK
contains not only code to compose logical expressions defined in context
free grammars, but also code implementing Glue Semantics (a more powerful
method of composing expressions) and code to interface with theorem provers
and model builders, which allow the user to perform inferences with the
representations.
For more information, feel free to contact me,
Dan Garrette
dhgarrette at gmail.com
[1] http://nltk.org/doc/en/ch11.html
---------- Original message ----------
From: Vrone <vrone at hotmail.co.uk>
Date: Thu, Sep 4, 2008 at 12:20 AM
Subject: [Corpora-List] algo for semantic structure
To: corpora at uib.no
Hi all,
Can any one give an idea about best algorithm to transform syntactic
structure into a semantic structure, in NLP context.
Regards,
Vrone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/corpora/attachments/20080907/01d549d7/attachment.htm>
-------------- next part --------------
_______________________________________________
Corpora mailing list
Corpora at uib.no
http://mailman.uib.no/listinfo/corpora
More information about the Corpora
mailing list