Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

24.01.00GK Prolog - Maschinelle Übersetzung II 1 Maschinelle Übersetzung II Prolog Grundkurs WS 99/00 Christof Rumpf

Ähnliche Präsentationen


Präsentation zum Thema: "24.01.00GK Prolog - Maschinelle Übersetzung II 1 Maschinelle Übersetzung II Prolog Grundkurs WS 99/00 Christof Rumpf"—  Präsentation transkript:

1 24.01.00GK Prolog - Maschinelle Übersetzung II 1 Maschinelle Übersetzung II Prolog Grundkurs WS 99/00 Christof Rumpf rumpf@uni-duesseldorf.de

2 24.01.00GK Prolog - Maschinelle Übersetzung II 2 Every man loves a woman. s(P) --> np(X,Q,P), vp(X,Q). vp(X,P) --> tv(X,Y,Q), np(Y,Q,P). np(X,Q,P)--> det(X,R,Q,P), n(X,R). tv(X,Y,loves(X,Y)) --> [loves]. det(X,R,Q,all(X,R->Q)) --> [every]. det(X,R,Q,exists(X,Q+R))--> [a]. n(X,man(X)) --> [man]. n(X,woman(X)) --> [woman].

3 24.01.00GK Prolog - Maschinelle Übersetzung II 3 Anfragen an die DCG ?-s(P,[every,man,loves,a,woman],[]). P = all(X,man(X)->exists(Y,woman(Y)+loves(X,Y))) yes ?-s(all(X,man(X)->exists(Y,woman(Y)+loves(X,Y))),S,[]) S = [every,man,loves,a,woman] yes ?-s(P,S,[])....->; P = all(X,man(X)->exists(Y,woman(Y)+loves(X,Y))) S = [every,man,loves,a,woman]->;... (16 Lösungen)

4 24.01.00GK Prolog - Maschinelle Übersetzung II 4 NPs mit Relativsätzen Every man that lives loves a woman.  x (man(x)  lives(x))   y (woman(y)  loves(x,y)) all(X,(man(X) + lives(X)) -> exists(Y,woman(Y) + loves(X,Y)))

5 24.01.00GK Prolog - Maschinelle Übersetzung II 5 Erweiterung: Relativsätze np(X,Ext,NP)--> det(X,Rel,Ext,NP), n(X,N), rel(X,N,Rel). rel(_,P,P)--> []. rel(X,N,(N+VP))--> [that], vp(X,VP). vp(X,VP)--> iv(X,VP). iv(X,lives(X))--> [lives].

6 24.01.00GK Prolog - Maschinelle Übersetzung II 6 Rekursion über Relativsätze s(_,S,[])....->; S = [every,man,that,loves,a,man,that, loves,a,man,that,loves,a,man,that, loves,a,man,that,loves,a,man, that,... np--> det,n,rel. rel--> [that],vp. vp--> tv,np.

7 24.01.00GK Prolog - Maschinelle Übersetzung II 7 Eigennamen John loves every woman.  x woman(x)  loves(john, x) all(X,woman(X) -> loves(john,X)) np(X,P,P) --> pn(X). pn(john) --> [john].

8 24.01.00GK Prolog - Maschinelle Übersetzung II 8 Problem mit Eigennamen ?- P = all(X,woman(X) -> loves(john,X)), s(P,S,[]). P = all(A,woman(A) -> loves(john,A)) S = [john,loves,every,woman] X = A ->; P = all(john,woman(john) -> loves(john,john)) S = [every,woman,loves,john] X = john

9 24.01.00GK Prolog - Maschinelle Übersetzung II 9 Kapselung quantifizierter Variablen Quantifizierte Variablen sollen zwar untereinander unifizierbar sein, aber nicht mit Individuen- konstanten. Lösung: Ersetze in allen Kategorien det/4 die quantifizierte Variable X durch einen Term var(X). Beispiel: det(var(X), P, Q, all(var(X),P -> Q)) --> [every].

10 24.01.00GK Prolog - Maschinelle Übersetzung II 10 Quantorenskopus-Ambiguität Der englische Satz Every man loves a woman. hat zwei Lesarten:  x man(x)   y (woman(y)  loves(x,y)) Jeder Mann liebt (irgendeine) Frau.  y woman(y)   x (man(x)  loves(x,y)) Jeder Mann liebt dieselbe Frau.

11 24.01.00GK Prolog - Maschinelle Übersetzung II 11 Lesart 1: irgendeine Frau S NP VP Det N V NP every man loves Det N all(X,N->VP) man(X) loves(X,Y) a woman exists(Y,N+V) woman(Y)

12 24.01.00GK Prolog - Maschinelle Übersetzung II 12 Lesart 2: dieselbe Frau S NP VP Det N V NP every man loves Det N all(X,SN->V) man(X) loves(X,Y) a woman exists(Y,ON+SNP) woman(Y)


Herunterladen ppt "24.01.00GK Prolog - Maschinelle Übersetzung II 1 Maschinelle Übersetzung II Prolog Grundkurs WS 99/00 Christof Rumpf"

Ähnliche Präsentationen


Google-Anzeigen