CATEGORIAL GRAMMARS AND THE NATURAL LANGUAGE PROCESSING Ismaïl Biskri Mathematics and...
-
Upload
lionel-douglas -
Category
Documents
-
view
222 -
download
1
Transcript of CATEGORIAL GRAMMARS AND THE NATURAL LANGUAGE PROCESSING Ismaïl Biskri Mathematics and...
CATEGORIAL GRAMMARS AND THE NATURAL LANGUAGE PROCESSING
Ismaïl BiskriMathematics and Computer-Science Department
University of Quebec in Trois-Rivières
www.uqtr.ca/~biskri
HUSSERL (1913)
Philosophical Origins. Notions of :
– Categorem– Syncategorem
Example : – Noun : Categorem– Sentence : Categorem– Verb : Syncategorem
LESNEWSKI (1922)
Logical foundations. Two kind of expressions :
– Noun– Proposition
Noun : objects, class of objects. Proposition : statement (describing a
“state”).
LESNEWSKI (1922)
Nouns and Propositions are Categorems. Other expressions are Syncategorems.
Syncategorem acts like an operator. Categorem acts like an operand.
LESNEWSKI (1922)
Inferential System We assume that we have a set of basic types The set of all types is defined recursively as
follows:– Basic types are types ;– If x and y are types then Fxy is a type.
(F is an applicative operator ; F is applied to an expression of type x, it yields an other expression of type y)
AJDUKIEWICZ (1935)
Basic expressions (categories) : – Noun (N)– Sentences (S)
If x and y are categories then is a category
Reduction rules– y x
– y x
y
x
y
x
y
x
AJDUKIEWICZ (1935)
Example
John laughs------ --------N
-----------------------------------S
N
S
BAR-HILLEL (1953)
Basic expressions (categories) : – Noun (N)– Sentences (S)
If x and y are categories then x/y and x\y are categories
Reduction rules :– x/y y x
– y y\x x
BAR-HILLEL (1953)
Example
John admires Mary------ ---------- -------N (N\S)/N N
-----------------------N\S
--------------------S
LAMBEK (1958, 1962)
Lambek Calculus. We will use Steedman’s notation
– X/Y will be X/Y– Y\X will be X\Y
Many axioms Many inference rules Many theorems
LAMBEK (1958, 1962)
Axioms
X X (reflexivity)
(X – Y) – Z X – (Y – Z) (associativity)
X – (Y – Z) (X – Y) – Z (associativity)
LAMBEK (1958, 1962)
Inference rules If X Y and Y Z then X Z
(transitivity) If X – Y Z then X Z/Y If X – Y Z then Y Z\X If X Z/Y then X – Y Z If Y Z\X then X – Y Z
LAMBEK (1958, 1962)
Some Theorems X (X – Y)/Y (Z/Y) – Y Z Y Z\(Z/Y) (Z/Y) – (Y/X) Z/X Z/Y (Z/X)/(Y/X) (Y\X)/Z (Y/Z)\X
ADES, STEEDMAN (1982)
Combinatory Categorial Grammar Two concepts :
– Syntactic category
– Semantic category
Example :
the category of admires is
(S : admire' np2 np1\NP : np1)/NP : np2
ADES, STEEDMAN (1982)
Some rules Functional application (>) :
– X/Y : f – Y : y X : f y
Functional composition (>B) : – X/Y : f – Y/Z : g X/Z : z(f(gz)
Type Raising (>T) :– X : x Y/(Y\X) : f(fx)
ADES, STEEDMAN (1982, 1989))
Example
John- loves- Mary------ ----------- -------N: John‘ (S:loves‘ np2 np1\NP: np1)/NP: np2 NP: Mary'--------->TS : pred John'/(S: pred John'\NP: John')----------------------------------------------------------->BS: loves' np2 John'/NP: np2------------------------------------------------------------------------->S: loves' Mary' John'
BISKRI , DESCLES (1995, 1997)
Applicative Combinatory Categorial Grammar.
Canonical association between Combinatory Categorial rules and Combinators of Combinatory Logic (Curry, Feys, 1958).
Combinatory Categorial rules : syntactic parsing.
Combinatory Logic : functional semantic parsing
BISKRI, DESCLES (1995, 1997)
Combinatory Logic Combinators : B, C, C*, S, etc.
Beta-Reduction rules :
B f g x f (g x) ; C* x f f x
Combinatory expression Normal Form– B C* x y z t is not in normal form– B C* x is in normal form– x (y z) is in normal form
BISKRI, DESCLES (1995, 1997)
Some rules Functional application (>) :
– X/Y : f – Y : y X : f y
Functional composition (>B) : – X/Y : f – Y/Z : g X/Z : B f g
Type Raising (>T) :– X : x Y/(Y\X) : C* x
BISKRI, DESCLES (1995, 1997)
Example 11 [N:John]-[(S\N)/N:loves]-[N:Mary]Typed concatenated structure
2 [S/(S\N):(C* John)]-[(S\N)/N:loves]-[N:Mary] (>T)3 [S/N:(B (C* John) loves)]-[N:Mary] (>B) 4 [S:((B (C* John) loves) Mary)] (>)
Typed applicative structure5 [S : ((B (C* John) loves) Mary)]6 [S : ((C* John) (loves Mary))] (B)
7 [S : ((loves Mary) John)] (C*)
BISKRI, DELISLE (2000)
Example 2 :[N/N:la]-[N:liberté]-[(S\N)/N:renforce]-[N/N:la]-[N:démocratie]
2. [N:(la-liberté)]-[(S\N)/N:renforce]-[N/N:la]-[N:démocratie] (>)
3. [S/(S\N):(C* (la liberté))]-[(S\N)/N: renforce]-[N/N: la]-[N: démocratie] (>T)
4. [S/N : (B (C* (la liberté)) renforce)]-[N/N : la]-[N : démocratie] (>B)
5. [S/N : (B (B (C* (la liberté)) renforce) la)]-[N : démocratie] (>B)
6. [S : ((B (B (C* (la liberté)) renforce) la) démocratie)] (>)
7. [S : ((B (B (C* (la liberté)) renforce) la) démocratie)]
8. [S : ((B (C* (la liberté)) renforce) (la démocratie))] B
9. [S : ((C* (la liberté)) (renforce (la démocratie)))] B10. [S : ((renforce (la démocratie)) (la liberté)))] C*11. [S : renforce (la démocratie) (la liberté)]
BISKRI, DELISLE (2000)
Example 3
1. [(S/N1)/N2:thoudaiimou]-[N1:elhouriyathou]-[N2:eddimouqratiyatha]2. [(S/N1)/N2:thoudaiimou]-[S\(S/N1):(C*elhouriyathou)]-
[N2:eddimouqratiyatha] (<T)
3. [S/N2 : (B (C* elhouriyathou) thoudaiimou)]-[N2 : eddimouqratiyatha](<Bx)
4. [S : ((B (C* elhouriyathou) thoudaiimou) eddimouqratiyatha)] (>)5.
[S : ((B (C* elhouriyathou) thoudaiimou) eddimouqratiyatha)]
6. [S : ((C* elhouriyathou) (thoudaiimou eddimouqratiyatha))] B
7. [S : ((thoudaiimou eddimouqratiyatha) elhouriyathou)] C*
8. [S : thoudaiimou eddimouqratiyatha elhouriyathou]
BISKRI, DESCLES (1995)
The Backward Modifier : Example 4
1 [N : John]-[(S\N)/N : loves]-[N : Mary]-[(S\N)\(S\N) : madly]…4 [S : ((B (C* John) loves) Mary)]-[(S\N)\(S\N) : madly]5 [S : ((C* John) (loves Mary))]-[(S\N)\(S\N) : madly] (B)6 [S/(S\N) : (C* John)]-[S\N : (loves Mary)]-[(S\N)\(S\N) : madly]
(>dec)7 [S/(S\N) : (C* John)]-[S\N : (madly (loves Mary))] (<)8 [S : ((C* John) (madly (loves Mary)))] (>)
9 [S : ((C* John) (madly (loves Mary)))]10 [S : ((madly (loves Mary)) John)] (C*)
BISKRI, DESCLES (1995)
Coordinationa) Two segments of the same kind, with the same structure and contiguous to
AND :[John loves]S/N and [William hates]S/N these pictures
b) Two segments into an elliptic construction :John loves [Mary madly] and [Jenny wildly][John] loves [Mary] and [William Jenny]
c) Two segments of different structures :Mary walks [slowly] and [with happiness].John [sings] and [plays the violin].
d) Two segments without distributivity :The flag is [white] and [red](≠ The flag is white and the flag is red).
BISKRI, DESCLES (1995)
Example 51 [N:John]-[(S\N)/N:loves]-[N:Mary]-[CONJD:and]-[(S\N)/N:hates]-[N:Jenny]
...4 [S:((B (C* John) loves) Mary)]-[CONJD:and]-[(S\N)/N:hates]-[N:Jenny]5 [S:((B (C* John) loves) Mary)]-[CONJD:and]-[S\N:(hates Jenny)] (>)6 [S:((C* John) (loves Mary))]-[CONJD:and]-[S\N:(hates Jenny)] (B)7 [S/(S\N):(C* John)]-[S\N:(loves Mary)]-[CONJD:and]-[S\N:(hates Jenny)]
(>dec)8 [S/(S\N):(C* John)]-[S\N:( and (loves Mary) (hates Jenny))] (<CONJD>)9 [S:((C* John) ( and (loves Mary) (hates Jenny)))] (>)
10 [S : ((C* John) ( and (loves Mary) (hates Jenny)))]11 [S : (( and (loves Mary) (hates Jenny)) John)] (C*)12 [S : (and ((loves Mary) John) ((hates Jenny) John))] ()