Logica & Linguaggio: Grammatiche
Categoriali
Raffaella Bernardi
Università degli Studi di Trento
P.zza Venezia, Room: 2.05, e-mail: [email protected]
Contents
First
Last
Prev
Next
J
Contents
1
2
3
4
5
6
7
Syntax-Semantics: Parallel vs. Non-parallel . . . . . . . . . . . . . . . . . . .
1.0.1
Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Montague Universal Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Categorial Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1
CG Lexicon: Toy Fragment . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2
Categorie Sintattiche: complesse . . . . . . . . . . . . . . . . . . . . . .
Intermezzo: Inferenze Logiche . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CG: Analisi Sintattica come Inferenza Logica . . . . . . . . . . . . . . . . .
5.1
Esempi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2
Relative Pronoun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3
Pronome Relativo: Alberi sintattici . . . . . . . . . . . . . . . . . . .
5.4
Pronome Relativo: Inferenza . . . . . . . . . . . . . . . . . . . . . . . . .
Riassunto: Regole di Inferenze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1
Riassunto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2
Proprietà delle Strutture sintattiche . . . . . . . . . . . . . . . . . . .
6.3
Linguistica e Matematica . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sintassi-Semantica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents
First
Last
Prev
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Next
J
8
9
7.1
Teoria degli Insiemi: Lessico . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2
Categorie sintattiche e Tipi semantici . . . . . . . . . . . . . . . . . .
7.4
DP e i Quantificatori . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.5
‘Type Raising’ come inferenza . . . . . . . . . . . . . . . . . . . . . . . .
7.6
Logica e Linguaggio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CG: categories and terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.1
DP and quantified DP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Administrativa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents
First
Last
Prev
21
22
23
24
25
26
27
28
Next
J
1.
Syntax-Semantics: Parallel vs. Non-parallel
We could build the meaning representation of an expression either
(a) in parallel with the construction of its syntactic structure, or
(b) after having built the syntactic analysis.
(a) is the method followed by most formal grammar frameworks as Categorial
Grammar (CG), Head-Driven Phrase Structure Grammar (HPSG), Lexical
Functional Grammar (LFG), Tree-Adjoining Grammar (TAG).
(b) is used by the Government and Binding Theory and the Minimalist Program
(both due to Chomsky).
Contents
First
Last
Prev
Next
J
1.0.1.
wing:
Advantages The reasons for preferring the first approach are the follo-
Psycholinguistic works suggest that human processing proceeds incrementally through the simultaneous application of syntactic, semantics, and phonological
constraints to resolve syntactic ambiguity. (Though, note that these systems
are models of linguistic competence rather than performance. Hence, these
results could not provide direct support of either of the approaches.)
Computational approach requires a way to rule out a semantically ill-formed
phrase as soon as it is encountered. Therefore, (a) offers a more efficient
architecture for implementing constraint satisfaction. For instance,
1. The delegates met for an hour.
2. The committee met for an hour.
3. *The woman met for an hour.
The use of “met” as intransitive verb requires a subject denoting a plural entity.
Contents
First
Last
Prev
Next
J
2.
Montague Universal Grammar
The rule-to-rule and lambda techniques are used in the approach to natural language
semantics developed by Richard Montague. In his theory, there are
I syntactic rules which show how constituents maybe combined to form other constituents.
I translation rules (associated with each such syntax rule) which show how the
logical expressions for the constituents have to be joined together to form the logical
form of the whole.
For instance, the syntactic and semantics rule for composing and DP with and IV:
S2: If δ ∈ PIV and α ∈ PDP , then F1 (α, δ) ∈ PS and F1 (α, δ) = αδ 0 , where δ 0 is the result
of replacing the main verb in δ by its third-person singular present form.
T2: If δ ∈ PIV and α ∈ PDP and δ| → δ 0 and α| → α0 , then F1 (α, δ)| → α0 (δ 0 ).
As grammar, he used Categorial Grammar.
Contents
First
Last
Prev
Next
J
3.
Categorial Grammar
I Who: Lesniewski (1929), Ajdukiewicz (1935), Bar-Hillel (1953).
I Aim: To build a language recognition device.
I How: Linguistic strings are seen as the result of concatenation obtained by
means of syntactic rules starting from the categories assigned to lexical items.
The grammar is known as Classical Categorial Grammar (CG).
I Connection with Type Theory: The syntax of type theory closely resembles
the one of categorial grammar. The links between types (and lambda terms)
with models, and types (and lambda terms) with syntactic categories, gives an
interesting framework in which syntax and semantic are strictly related. (We
will come back on this later.)
Categories: Given a set of basic categories ATOM, the set of categories CAT is the
smallest set such that:
CAT := ATOM | CAT\CAT | CAT/CAT
Contents
First
Last
Prev
Next
J
3.1.
CG Lexicon: Toy Fragment
Let ATOM be {n, s, dp} (for nouns, sentences and noun phrases, respectively) and LEX as
given below.
Lexicon
Sara
student
wrote
dp
n
(dp\s)/dp
Sara walks ∈ s?
;
the
walks
dp/n
dp\s
dp , dp\s ∈ s?
|{z} |{z}
Sara
Yes
walks
simply [BA]
s
dp
dp\s
Sara
walks
Contents
First
Last
Prev
Next
J
3.2.
Categorie Sintattiche: complesse
Visto:
S
S
DP
VP
DP
sara
IV
sara
cammina
Nuovo:
dp\s
sara cammina
TV
DP
conosce ilaria
s
s
dp
VP
dp
dp\s
sara (dp\s)/dp
conosce
dp
ilaria
Grammatiche Categoriali: categorie sintattiche piú complesse!
Contents
First
Last
Prev
Next
J
4.
Intermezzo: Inferenze Logiche
Già visto (inferenza):
I Premesse:
1. Roberto verrà oppure Massimo verrà.
2. Se Roberto non ha trovato una baby sitter, Roberto non verrà.
3. Roberto non ha trovato una baby sitter
I Conclusione:
1. Massimo verrà.
Nuovo:
{p ∨ q, r → ¬p, r} ⇒
{z
}
|
premesse
p∨q
q
|{z}
conclusione
r → ¬p r
¬p
q
Contents
First
Last
Prev
Next
J
5.
CG: Analisi Sintattica come Inferenza Logica
Regole di inferenza: Modus Ponens.
B
B/A, A ⇒ B
B/A A
(/E)
B
A, A\B ⇒ B
A A\B
(\E)
B
B/A A
β
α
B
A A\B
α
β
Contents
First
Last
Prev
Next
J
5.1.
Esempi
Dato ATOM = {dp, s, n}, possiamo costruire il lessico:
Lessico
John, Mary
student
walks
sees
∈
∈
∈
∈
dp
n
dp\s
(dp\s)/dp
Analisi Sintattica
John walks ∈ s?
the ∈ dp/n
; dp, dp\s ⇒ s
dp
Si
dp\s
(\E)
s
John sees Mary ∈ s? ; dp, (dp\s)/dp, dp ⇒ s
dp
Si
(dp\s)/dp dp
(/E)
dp\s
(\E)
s
Contents
First
Last
Prev
Next
J
5.2.
Relative Pronoun
Question Which would be the syntactic category of a relative pronoun in subject
position? E.g. “the student who knows Lori”
[the [[student]n [who [knows Lori](dp\s) ]? ]n
who knows Lori ∈ n\n?
;
(n\n)/(dp\s), (dp\s)/dp, dp ⇒ n\n?
knows
Lori
(dp\s)/dp
dp
who
(MPr )
(n\n)/(dp\s)
dp\s
(MPr )
n\n
n\n
(n\n)/(dp\s)
who
(dp\s)
(dp\s)/dp
dp
knows
Lori
Contents
First
Last
Prev
Next
J
5.3.
Pronome Relativo: Alberi sintattici
The book which [Sara wrote [. . .]]s is interesting .
{z
}
{z
}|
|
dp\s
dp
s
s
Sara
dp\s
dp\s
dp
(dp\s)/dp
dp
wrote
x
dp
(dp\s)/dp
Sara
s/dp
s
dp\s
dp
(dp\s)/dp
Sara
wrote
dp
x
wrote
[. . .]
dp
x
Contents
First
Last
Prev
Next
J
5.4.
Pronome Relativo: Inferenza
Ragionamento ipotetico (regole di introduzione dell’implicazione) cattura l’idea della
“traccia” proposta in Linguistica.
The book which [Sara wrote [. . .]]s is interesting .
{z
}
{z
}|
|
dp
dp\s
wrote ` (dp\s)/dp [x ` dp]1
(/E)
Sara ` dp
wrote x ` dp\s
(\E)
Sara wrote x ` s (/I)1
which ` (n\n)/(s/dp)
Sara wrote ` s/dp
(/E)
which Sara wrote ` n\n
(n\s)/(s/dp), dp, (dp\s)/dp ⇒ n\n
Contents
First
Last
Prev
Next
J
6.
Riassunto: Regole di Inferenze
(np\s)
(np\s)/np
conosce
∆ ` B/A Γ ` A
(/E)
∆◦Γ`B
np
ilaria
(np\s)/np
(np\s)
(np\s)/np
conosce
[...]
np
x
∆ ◦ A ` B (/I)
∆ ` B/A
I (/E) MP cattura le dipendenze locali
I (/I) Ragionamento Ipotetico cattura le dipendenze a distanza.
Contents
First
Last
Prev
Next
J
6.1.
Riassunto
Premessa: Le parole possono essere interpretate come insiemi, e quindi come funzioni.
Domande:
I Categorie Sintattiche: Come si riflette ciò sulle categorie sintattiche?
I Costituenti: Come si riflette ciò sulle strutture sintattiche?
Risposte
I Usiamo categorie sintattiche più complesse, correspondenti alla semantica.
I Usiamo Modus Ponens e Ragionamento Ipotetico.
Metodo Abbiamo usato una logica per analizzare le strutture sintattiche e catturare
il legame tra sintassi e semantica del linguaggio naturale.
Qual è la logica dietro le strutture linguistiche?
Contents
First
Last
Prev
Next
J
6.2.
Proprietà delle Strutture sintattiche
I non commutativa: mary walks ` s ma walks mary 6` s.
I non associativa [thedet studentn ]dp walksvp ` s ma [thedet [studentn walksvp ]? 6`
s.
I importanza del numero delle occorrenze: mary walks ` s but mary mary walks 6`
s, and mary walks ` s but walks 6` s.
I ...
Contents
First
Last
Prev
Next
J
6.3.
Linguistica e Matematica
In Matematica:






2 ≤ 94
iff
2×4 ≤ 9
iff
4 ≤ 29






× è commutativo.
In Linguistica:






dp : sara ` s/iv
iff
dp : sara◦iv : cammina ` s
iff
cammina : iv ` dp\s






◦ non è commutativo.
Contents
First
Last
Prev
Next
J
7.
Sintassi-Semantica
Syntactic Categories and Semantic Types
Let us define a function type : CAT → TYPE which maps syntactic categories to
semantic types.
type(np) = e;
type(s) = t;
type(n) = (e → t).
type(A/B) = (type(B) → type(A));
type(B\A) = (type(B) → type(A));
Contents
First
Last
Prev
Next
J
7.1.
Teoria degli Insiemi: Lessico
Già visto (semantica –interpretazione):
[[tommaso]]
[[valerio]]
[[roberto]]
[[raffaella]]
[[studente]]
[[docente]]
[[italiano]]
[[parla]]
[[ascolta]]
[[conosce]]
=
=
=
=
=
=
=
=
=
=
tommy;
valerio;
roby;
raffa;
{tommy, valerio};
{roby};
{tommy, valerio, raffa, roby};
{raffa}.
{tommy, valerio, roby};
{hroby, raffai, hraffa,robyi};
Qual è il significato di “Ogni studente”?
[[ogni studente]]
=
=
=
{X ⊆ E | [[student]] ⊆ X}
{{tommy, valerio}, {tommy, valerio, raffa, roby}, {tommy, valerio, roby}}
{[[studente]], [[italiano]], [[ascolta]]}
ie. un insieme di proprietà.
Nuovo: Tutto ciò si riflette sulla sintassi? Quali sono le categorie sintattiche del lessico?
Contents
First
Last
Prev
Next
J
7.2.
Categorie sintattiche e Tipi semantici
Parola
Roberto
parla
conosce
ogni studente
CAT
dp
dp\s
(dp\s)/dp
s/(dp\s)
TIPO
e
e→t
e → (e → t)
(e → t) → t
RAP. SEMA
r
λx.Parla(x)
λx.Conosce(x)
λX.∀x.Studente(x) → X(x)
Contents
First
Last
Prev
Next
J
7.4.
DP e i Quantificatori
Problema: Es. “Roberto and every student left”.
I “And” coordina costituenti della stessa categoria sintattica.
I Roberto: dp
I every student: s/(dp\s)
Soluzione proposta da Linguisti (Partee): “Type raising”
[[roberto]]
[[roberto]]
= roby;
= {X|X(roby) = 1}
= {[[italiano]], [[docente]], [[ascolta raffa]]}
Contents
First
Last
Prev
Next
J
7.5.
‘Type Raising’ come inferenza
Portendo dall’assegnare a “Roberto” la categoria dp, le regole di inferenza dimostrano:
john ` dp [P ` dp\s]1
(\E)
roberto P ` s (/I)1
roberto ` s/(dp\s)
dp ⇒ s/(dp\s)
Per cui può essere coordinato con un QP, senza bisogno di postulare il “type raising”.
Contents
First
Last
Prev
Next
J
7.6.
Logica e Linguaggio
Già visto:
I Il significato di una frase è il suo valore di verità. (Tarski)
I Il significato di una frase è ottenuto composizionalmente partendo dal significato delle parole. (Frege)
I Il significato delle parole è catturato dalla teoria degli insiemi
Nuovo: Possiamo definire formalmente il legame tra Sintassi e Semantica del
Linguaggio Naturale?
Contents
First
Last
Prev
Next
J
8.
CG: categories and terms
Modus ponens corresponds to functional application.
B/A : t A : r
(/E)
B : t(r)
A : r A\B : t
(\E)
B : t(r)
Example
dp : john dp\s : walk
(\E)
s : walk(john)
dp\s : λx.walk(x)
(λx.walk(x))(john) ;λ−conv. walk(john)
(dp\s)/dp : know dp : mary
(/E)
dp : john
dp\s : know(mary)
(\E)
s : know(mary)(john)
Contents
First
Last
Prev
Next
J
8.1.
DP and quantified DP
John and one student left.
We can assign to John the category dp and term assignment john and derive the
category and term of quantified dp.
roberto ` dp : roby [P ` dp\s : P ]1
(\E)
roberto P ` s : P (roby)
(/I)1
roberto ` s/(dp\s) : λP.P (roby)
We have proved: dp ` s/(dp\s). This means, we can assign John the category dp
(considering it an entity, i.e. a term of type e) and derive from it the higher order
category of quantified DP as it would be necessary for, e.g. coordination of a DP
and a QP.
[[roberto]] = roby;
[[roberto]] = {X|X(roby) = 1}
= {[[italiano]], [[docente]], [[ascolta raffa]]}
Contents
First
Last
Prev
Next
J
9.
Administrativa
Esame di Giugno (forse il 6): scritto ad Aprile. Quando? Giugno: discussione
esercizi svolti.
Contents
First
Last
Prev
Next
J
Scarica

Logica & Linguaggio: Grammatiche Categoriali