SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Functional Semantics for Pregroup Grammars
Gabriel Gaudreault
Concordia University, Montreal
CoCoNat 2015
19 July 2015
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Goals
Goal:
Figuring out a way to do semantics with pregroup grammars that
is intuitive and does not require learning higher-level mathematics
What I am presenting:
- A functional calculus that is sensible to the incoming direction of
the inputs and which has functional composition as main reduction
operation
- The 1-1 relation between it and a subset of pregroup grammars
that is relevant for linguistic analysis
- How the system can be used for linguistic analysis
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Overview
Categorial Grammars
Formal Semantics
Pregroup Grammars
λ-semantics for Pregroup Grammars?
λ↔-calculus
“Curry-Howard” Correspondence
Syntactic & Semantic Analysis
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Categorial Grammars
Main idea: We can assign mathematical types to words and then
check whether sentences are grammatical by looking at the string
of their corresponding types and using our derivation rules.
Types s, t := N, S, ... | s/t | s  t
Reduction rules inspired by arithmetic
Butterflies like oranges
N (N  S) / N N → S
(Noun phrase) (subject  verb / object) (Noun phrase)
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Semantics for the Lambek Calculus
Semantics through λ-calculus
λx.λy.love(x, y)
Elimination Rule ↔ Function Application
a : A λx.b(x) : A  B
b(a) : B
Introduction Rule ↔ Function Abstraction
x : A, Γ b : B
Γ λx.b : A  B
In parallel to grammaticality check we do meaning extraction
Alan : NP λw.work(x) : NP  S
work(Alan) : S
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Pregroups
(P, →, r , l , ·, 1) : Partially ordered monoid over P, in which every
element a ∈ P has a right and left adjoint, ar ∈ P, al ∈ P
respectively, subject to
a · ar
→ 1 → ar
· a al
· a → 1 → a · al
(think of arithmetic: 2 ∗ 2−1 = 1)
Has properties such as:
a → b ⇔ bl
→ al
⇔ br
→ ar
arl
= alr
= a
(a1...an)l
= al
n...al
1
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Pregroup Grammars
In PG, words get assigned pregroup types π, s, n, ¯n, i, etc. which
correspond to syntactic categories
Ordered structure: we can now define relations such as N → π3,
s2 → s
The role that inverses (A  B) and (A / B) played in the original
syntactic calculus is played by adjoints ar b and abl ...
πr s il i ir i il i ol nnnl¯n
s
will dance to save humanitymanA
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Pregroup Grammars
Difference with the Syntactic Calculus:
Those new types are associative — (ab)c = a(bc) — and can
combine in much more flexible ways because they are now
considered as a list of independent information pieces
abl
· bcl
→ acl
a/b · b/c → a/c
(in one step)
We can’t really use the λ-calculus to do semantics anymore, as it
is not clear what kind of functions our types represent:
(a  b)/c ⇒ c → a → b but ar
bcl
⇒?
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
λ↔
-calculus
Termσ Formation Rules
x ∈ Varσ
x ∈ Termσ
c ∈ Conσ
c ∈ Termσ
t ∈ TermΩrφ s ∈ Termφrπ
(t)s ∈ TermΩrπ
t ∈ Termπφl s ∈ TermφΩl
t(s) ∈ TermπΩl
t ∈ Termσ x ∈ Varφ
t.x ∈ Termσφl
x ∈ Varφ t ∈ Termσ
x.t ∈ Termφrσ
Example:
Alan ∈ Terme x.(x)work ∈ Termerp
(Alan)work ∈ Termp
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
λ↔
-calculus - Function Application
Γ1 t ∈ TermΩrφ Γ2 s ∈ Termφrπ
Γ1, Γ2 (t)s ∈ TermΩrπ
Γ1 t ∈ Termπφl Γ2 s ∈ TermφΩl
Γ1, Γ2 t(s) ∈ TermπΩl
Recall in simply typed λ-calculus:
Γ1 a : A Γ2 λx.f (x) : A → B
Γ1, Γ2 f [a/x]
Example:
Paul ∈ Terme x.(x)run ∈ Termer p
(Paul)run ∈ Termp
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
λ↔
-calculus - Function Abstraction
Γ, x ∈ Varφ t ∈ Termσ
Γ t.x ∈ Termσφl
x ∈ Varφ, Γ t ∈ Termσ
Γ x.t ∈ Termφrσ
Recall lambda abstraction:
Γ, x : A b : B
Γ λx.b(x) : A → B
Pregroup expansion rule:
x ∈ Vara x ∈ Vara
x.x ∈ Termara
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Reformulation of Pregroup Types
We redefine pregroup types as a deductive system.
init
A A
Γ, A B l I
Γ BAl
Γ1 ABl Γ2 BΣl
l E
Γ1, Γ2 AΣl
A, Γ B r I
Γ Ar B
Γ1 Σr A Γ2 Ar B r E
Γ1, Γ2 Σr B
We change the way of looking at Ar BCl : it now behaves more like
an non-commutative linear functional type A B C rather than
a cartesian product or sum A⊥ ⊕ B ⊕ C⊥
Σl
and Σr
stand for a sequences of left and right adjoint types Cl
1...Cl
n,
Cr
1 ...Cr
n respectively.
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Pregroup−λ↔
Grammars
Easy correspondence between the functional calculus and those
new pregroup types:
init
x : A x : A
Γ, x : A b : B l I
Γ b.x : BAl
Γ1 a : ABl Γ2 b : BΣl
l E
Γ1, Γ2 a(b) : AΣl
x : A, Γ b : B r I
Γ x.b : Ar B
Γ1 a : Σr A Γ2 b : Ar B r E
Γ1, Γ2 (a)b : Σr B
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
β-reduction
One of the major differences between that system and something
like a λ-calculus with 2 “directional”-λ’s is the β-reduction rules:
t|x (b|x1 ...|xn ) =β (t)[x := b] |x1 ...|xn
when t|x ∈ Termσφl and b|x1 ...|xn ∈ Termφπl
1...πl
n
This is the main reason why an untyped λ↔-calculus is not possible
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
β-reduction
t|x (b|x1 ...|xn ) =β (t)[x := b] |x1 ...|xn
when t|x ∈ Termσφl and b|x1 ...|xn ∈ Termφπl
1...πl
n
E.g.
the
ı(x).x : ¯nnl
green
green(y).y : nnl
ı(green(y)).y : ¯nnl
Compare this to
the
λx.ı(x) : NP/N
green
λy.green(y) : N/N z : N
green(z) : N
ı(green(z)) : NP
λz.ı(green(z)) : NP/N
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
β-reduction
t|x (b|x1 ...|xn ) =β (t)[x := b] |x1 ...|xn
when t|x ∈ Termσφl and b|x1 ...|xn ∈ Termφπl
1...πl
n
We still need to be able to pass abstracted predicates though
Someone
∃x.(x)y.y : s(πr
3s)l
runs
z.(z)run : πr
3s
∃x.(x) z.(z)run : s
∃x.(x)run : s
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
New Typing Structure
The pregroup types we will end up using in our analyses only form
a subset of the ones possible in the algebraic formulation. For
instance, there are
No more types of the form Ar , Arr B, Al B, AB, etc.
No more relations such as (AB)l ↔ Bl Al
Only one kind of contraction is possible: between
“disconnected” types
It is totally fine: we will end up not needing those relations and
types at all, and our contraction rule is sufficient
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
New Typing Structure
Predictions:
give never needs its equivalent type i(op)l
give a star to Bob
ipl ol ¯nnl n p¯nl N
→ ipl ol ¯n p¯nl ¯n
→ ipl ol o p
→ ipl p → i
for does not need φ(o¯j)l either
John wants for Mary to live
N πr
3sφl φ¯jl ol N ¯jil i
→ π3 πr
3sφl φ¯jl ol o ¯j
→ sφl φ¯jl ¯j
→ sφl φ → s
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
New Typing Structure
More examples:
somebody
ssl π
?
πr
Edward likes pie
s
s
John
N
who
¯nr ¯nsl πl
Carl
π
I like ice cream
s
¯n
John
N
who
¯nr ¯n(πs)l
?
πs
¯n
John
N
whom
¯nr ¯nol lsl
I like ice cream
s
?
ol
¯n
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Flexibility of Derivations
the
ı(x)|x : ¯nnl
green
green(y)|y : nnl
l E
ı(green(y))|y : ¯nnl
apple
apple : n
l E
ı(green(apple)) : ¯n
the
ı(x)|x : ¯nnl
green
green(y)|y : nnl
apple
apple : n
l E
green(apple) : n
l E
ı(green(apple)) : ¯n
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Constituency Analysis
flies
plural(fly(x)|x ) : n
in
y|(y)in(x)|x : nr n¯nl
the
ı(x)|x : ¯nnl
sky
sky : n
l E
ı(sky) : ¯n
l E
y|(y)in(ı(sky)) : nr n
l E
(plural(fly(x)|x )in(ı(sky)) : n
flies
z|fly(z) : πr s
in
y|(y)in(x)|x : sr s ¯nl
l E
z|(fly(z))in(x)|x : πr s ¯nl
the
ı(x)|x : ¯nnl
sky
sky : n
l E
ı(sky) : ¯n
l E
z|(fly(z))in(ı(sky)) : πr s
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Examples
Sentence with Quantifiers
First reading: Everybody has a special someone, who might all be
different from eachother
everybody
∀((person(z) → (z)x|z ))|x : s(πr
3s)l
loves
x|(x)love(y)|y : πr
3sol
somebody
z|∃((person(y) → z(y))|y ) : (sol
)r
s
x|∃((person(y) → (x)love(y))|y ) : πr
3s
∀((person(z) → ∃((person(y) → (z)love(y))|y ))|z ) : s
Second reading: There’s someone who everyone’s in love with
everybody
∀((person(z) → (z)x|z ))|x : s(πr
3s)l
loves
x|(x)love(y)|y : πr
3sol
∀((person(z) → (z)love(y)|z ))|y : sol
somebody
z|∃((person(x) → z(x))|x ) : (sol
)r
s
∃((person(x) → ∀((person(z) → (z)love(x)|z )))|x ) : s
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
Future
More in-depth analysis of semantic power of the new calculus,
i.e. what does an associative & compositional semantic layer
imply for semantic analysis?
Proving Church-Rosser Property
Category theoretical analysis of the new calculus
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
The End
Thank you for listening
Special thanks to: Alan Bale, Claudia Casadio, and Robert Seely
for their help in this project
Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars

Weitere ähnliche Inhalte

Was ist angesagt?

Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCSR2011
 
Reduction Monads and Their Signatures
Reduction Monads and Their SignaturesReduction Monads and Their Signatures
Reduction Monads and Their SignaturesMarco Maggesi
 
Du Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologDu Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologSerge Garlatti
 
leanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL ReasonerleanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL ReasonerAdriano Melo
 
The Lambda Calculus and The JavaScript
The Lambda Calculus and The JavaScriptThe Lambda Calculus and The JavaScript
The Lambda Calculus and The JavaScriptNorman Richards
 
A Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC LearningA Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC Learningdhruvgairola
 
Latent transwarp neural networks
Latent transwarp neural networksLatent transwarp neural networks
Latent transwarp neural networksLonghow Lam
 
Data Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description LogicsData Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description LogicsAdila Krisnadhi
 
Call-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineAlejandro Díaz-Caro
 
Calculating Projections via Type Checking
Calculating Projections via Type CheckingCalculating Projections via Type Checking
Calculating Projections via Type CheckingDaisuke BEKKI
 
lecture 30
lecture 30lecture 30
lecture 30sajinsc
 
Smooth entropies a tutorial
Smooth entropies a tutorialSmooth entropies a tutorial
Smooth entropies a tutorialwtyru1989
 
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphsIIUM
 
RChain - Understanding Distributed Calculi
RChain - Understanding Distributed CalculiRChain - Understanding Distributed Calculi
RChain - Understanding Distributed CalculiPawel Szulc
 
"PAC Learning - a discussion on the original paper by Valiant" presentation @...
"PAC Learning - a discussion on the original paper by Valiant" presentation @..."PAC Learning - a discussion on the original paper by Valiant" presentation @...
"PAC Learning - a discussion on the original paper by Valiant" presentation @...Adrian Florea
 
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial OrderingCMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Orderingallyn joy calcaben
 

Was ist angesagt? (20)

Csr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatovCsr2011 june17 14_00_bulatov
Csr2011 june17 14_00_bulatov
 
Reduction Monads and Their Signatures
Reduction Monads and Their SignaturesReduction Monads and Their Signatures
Reduction Monads and Their Signatures
 
Predicate Calculus
Predicate CalculusPredicate Calculus
Predicate Calculus
 
Du Calcul des prédicats vers Prolog
Du Calcul des prédicats vers PrologDu Calcul des prédicats vers Prolog
Du Calcul des prédicats vers Prolog
 
leanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL ReasonerleanCoR: lean Connection-based DL Reasoner
leanCoR: lean Connection-based DL Reasoner
 
The Lambda Calculus and The JavaScript
The Lambda Calculus and The JavaScriptThe Lambda Calculus and The JavaScript
The Lambda Calculus and The JavaScript
 
A Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC LearningA Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC Learning
 
Latent transwarp neural networks
Latent transwarp neural networksLatent transwarp neural networks
Latent transwarp neural networks
 
Logic DM
Logic DMLogic DM
Logic DM
 
Data Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description LogicsData Complexity in EL Family of Description Logics
Data Complexity in EL Family of Description Logics
 
Call-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type disciplineCall-by-value non-determinism in a linear logic type discipline
Call-by-value non-determinism in a linear logic type discipline
 
Calculating Projections via Type Checking
Calculating Projections via Type CheckingCalculating Projections via Type Checking
Calculating Projections via Type Checking
 
lecture 30
lecture 30lecture 30
lecture 30
 
Smooth entropies a tutorial
Smooth entropies a tutorialSmooth entropies a tutorial
Smooth entropies a tutorial
 
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphs
 
RChain - Understanding Distributed Calculi
RChain - Understanding Distributed CalculiRChain - Understanding Distributed Calculi
RChain - Understanding Distributed Calculi
 
"PAC Learning - a discussion on the original paper by Valiant" presentation @...
"PAC Learning - a discussion on the original paper by Valiant" presentation @..."PAC Learning - a discussion on the original paper by Valiant" presentation @...
"PAC Learning - a discussion on the original paper by Valiant" presentation @...
 
Tsp is NP-Complete
Tsp is NP-CompleteTsp is NP-Complete
Tsp is NP-Complete
 
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial OrderingCMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
 

Ähnlich wie pres_coconat

Simply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphismsSimply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphismsAlejandro Díaz-Caro
 
A Distributed Tableau Algorithm for Package-based Description Logics
A Distributed Tableau Algorithm for Package-based Description LogicsA Distributed Tableau Algorithm for Package-based Description Logics
A Distributed Tableau Algorithm for Package-based Description LogicsJie Bao
 
Csr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminskiCsr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminskiCSR2011
 
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18Olga Zinkevych
 
Jarrar: Description Logic
Jarrar: Description LogicJarrar: Description Logic
Jarrar: Description LogicMustafa Jarrar
 
"That scripting language called Prolog"
"That scripting language called Prolog""That scripting language called Prolog"
"That scripting language called Prolog"Sergei Winitzki
 
Divergence clustering
Divergence clusteringDivergence clustering
Divergence clusteringFrank Nielsen
 
Tensor-based Models of Natural Language Semantics
Tensor-based Models of Natural Language SemanticsTensor-based Models of Natural Language Semantics
Tensor-based Models of Natural Language SemanticsDimitrios Kartsaklis
 
Computational logic First Order Logic_part2
Computational logic First Order Logic_part2Computational logic First Order Logic_part2
Computational logic First Order Logic_part2banujahir1
 
(DL hacks輪読) Variational Inference with Rényi Divergence
(DL hacks輪読) Variational Inference with Rényi Divergence(DL hacks輪読) Variational Inference with Rényi Divergence
(DL hacks輪読) Variational Inference with Rényi DivergenceMasahiro Suzuki
 
Divergence center-based clustering and their applications
Divergence center-based clustering and their applicationsDivergence center-based clustering and their applications
Divergence center-based clustering and their applicationsFrank Nielsen
 
Сергей Кольцов —НИУ ВШЭ —ICBDA 2015
Сергей Кольцов —НИУ ВШЭ —ICBDA 2015Сергей Кольцов —НИУ ВШЭ —ICBDA 2015
Сергей Кольцов —НИУ ВШЭ —ICBDA 2015rusbase
 
Folding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #3 - third in a seriesFolding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #3 - third in a seriesPhilip Schwarz
 

Ähnlich wie pres_coconat (20)

lacl (1)
lacl (1)lacl (1)
lacl (1)
 
Simply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphismsSimply typed lambda-calculus modulo isomorphisms
Simply typed lambda-calculus modulo isomorphisms
 
A Distributed Tableau Algorithm for Package-based Description Logics
A Distributed Tableau Algorithm for Package-based Description LogicsA Distributed Tableau Algorithm for Package-based Description Logics
A Distributed Tableau Algorithm for Package-based Description Logics
 
Csr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminskiCsr2011 june17 15_15_kaminski
Csr2011 june17 15_15_kaminski
 
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
 
Jarrar: Description Logic
Jarrar: Description LogicJarrar: Description Logic
Jarrar: Description Logic
 
"That scripting language called Prolog"
"That scripting language called Prolog""That scripting language called Prolog"
"That scripting language called Prolog"
 
Divergence clustering
Divergence clusteringDivergence clustering
Divergence clustering
 
Tensor-based Models of Natural Language Semantics
Tensor-based Models of Natural Language SemanticsTensor-based Models of Natural Language Semantics
Tensor-based Models of Natural Language Semantics
 
g-lecture.pptx
g-lecture.pptxg-lecture.pptx
g-lecture.pptx
 
Pl vol1
Pl vol1Pl vol1
Pl vol1
 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
Computational logic First Order Logic_part2
Computational logic First Order Logic_part2Computational logic First Order Logic_part2
Computational logic First Order Logic_part2
 
(DL hacks輪読) Variational Inference with Rényi Divergence
(DL hacks輪読) Variational Inference with Rényi Divergence(DL hacks輪読) Variational Inference with Rényi Divergence
(DL hacks輪読) Variational Inference with Rényi Divergence
 
Pl vol1
Pl vol1Pl vol1
Pl vol1
 
Divergence center-based clustering and their applications
Divergence center-based clustering and their applicationsDivergence center-based clustering and their applications
Divergence center-based clustering and their applications
 
Сергей Кольцов —НИУ ВШЭ —ICBDA 2015
Сергей Кольцов —НИУ ВШЭ —ICBDA 2015Сергей Кольцов —НИУ ВШЭ —ICBDA 2015
Сергей Кольцов —НИУ ВШЭ —ICBDA 2015
 
FUZZY LOGIC
FUZZY LOGICFUZZY LOGIC
FUZZY LOGIC
 
Folding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #3 - third in a seriesFolding Cheat Sheet #3 - third in a series
Folding Cheat Sheet #3 - third in a series
 

pres_coconat

  • 1. Functional Semantics for Pregroup Grammars Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015 19 July 2015 Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 2. Goals Goal: Figuring out a way to do semantics with pregroup grammars that is intuitive and does not require learning higher-level mathematics What I am presenting: - A functional calculus that is sensible to the incoming direction of the inputs and which has functional composition as main reduction operation - The 1-1 relation between it and a subset of pregroup grammars that is relevant for linguistic analysis - How the system can be used for linguistic analysis Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 3. Overview Categorial Grammars Formal Semantics Pregroup Grammars λ-semantics for Pregroup Grammars? λ↔-calculus “Curry-Howard” Correspondence Syntactic & Semantic Analysis Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 4. Categorial Grammars Main idea: We can assign mathematical types to words and then check whether sentences are grammatical by looking at the string of their corresponding types and using our derivation rules. Types s, t := N, S, ... | s/t | s t Reduction rules inspired by arithmetic Butterflies like oranges N (N S) / N N → S (Noun phrase) (subject verb / object) (Noun phrase) Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 5. Semantics for the Lambek Calculus Semantics through λ-calculus λx.λy.love(x, y) Elimination Rule ↔ Function Application a : A λx.b(x) : A B b(a) : B Introduction Rule ↔ Function Abstraction x : A, Γ b : B Γ λx.b : A B In parallel to grammaticality check we do meaning extraction Alan : NP λw.work(x) : NP S work(Alan) : S Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 6. Pregroups (P, →, r , l , ·, 1) : Partially ordered monoid over P, in which every element a ∈ P has a right and left adjoint, ar ∈ P, al ∈ P respectively, subject to a · ar → 1 → ar · a al · a → 1 → a · al (think of arithmetic: 2 ∗ 2−1 = 1) Has properties such as: a → b ⇔ bl → al ⇔ br → ar arl = alr = a (a1...an)l = al n...al 1 Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 7. Pregroup Grammars In PG, words get assigned pregroup types π, s, n, ¯n, i, etc. which correspond to syntactic categories Ordered structure: we can now define relations such as N → π3, s2 → s The role that inverses (A B) and (A / B) played in the original syntactic calculus is played by adjoints ar b and abl ... πr s il i ir i il i ol nnnl¯n s will dance to save humanitymanA Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 8. Pregroup Grammars Difference with the Syntactic Calculus: Those new types are associative — (ab)c = a(bc) — and can combine in much more flexible ways because they are now considered as a list of independent information pieces abl · bcl → acl a/b · b/c → a/c (in one step) We can’t really use the λ-calculus to do semantics anymore, as it is not clear what kind of functions our types represent: (a b)/c ⇒ c → a → b but ar bcl ⇒? Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 9. λ↔ -calculus Termσ Formation Rules x ∈ Varσ x ∈ Termσ c ∈ Conσ c ∈ Termσ t ∈ TermΩrφ s ∈ Termφrπ (t)s ∈ TermΩrπ t ∈ Termπφl s ∈ TermφΩl t(s) ∈ TermπΩl t ∈ Termσ x ∈ Varφ t.x ∈ Termσφl x ∈ Varφ t ∈ Termσ x.t ∈ Termφrσ Example: Alan ∈ Terme x.(x)work ∈ Termerp (Alan)work ∈ Termp Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 10. λ↔ -calculus - Function Application Γ1 t ∈ TermΩrφ Γ2 s ∈ Termφrπ Γ1, Γ2 (t)s ∈ TermΩrπ Γ1 t ∈ Termπφl Γ2 s ∈ TermφΩl Γ1, Γ2 t(s) ∈ TermπΩl Recall in simply typed λ-calculus: Γ1 a : A Γ2 λx.f (x) : A → B Γ1, Γ2 f [a/x] Example: Paul ∈ Terme x.(x)run ∈ Termer p (Paul)run ∈ Termp Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 11. λ↔ -calculus - Function Abstraction Γ, x ∈ Varφ t ∈ Termσ Γ t.x ∈ Termσφl x ∈ Varφ, Γ t ∈ Termσ Γ x.t ∈ Termφrσ Recall lambda abstraction: Γ, x : A b : B Γ λx.b(x) : A → B Pregroup expansion rule: x ∈ Vara x ∈ Vara x.x ∈ Termara Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 12. Reformulation of Pregroup Types We redefine pregroup types as a deductive system. init A A Γ, A B l I Γ BAl Γ1 ABl Γ2 BΣl l E Γ1, Γ2 AΣl A, Γ B r I Γ Ar B Γ1 Σr A Γ2 Ar B r E Γ1, Γ2 Σr B We change the way of looking at Ar BCl : it now behaves more like an non-commutative linear functional type A B C rather than a cartesian product or sum A⊥ ⊕ B ⊕ C⊥ Σl and Σr stand for a sequences of left and right adjoint types Cl 1...Cl n, Cr 1 ...Cr n respectively. Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 13. Pregroup−λ↔ Grammars Easy correspondence between the functional calculus and those new pregroup types: init x : A x : A Γ, x : A b : B l I Γ b.x : BAl Γ1 a : ABl Γ2 b : BΣl l E Γ1, Γ2 a(b) : AΣl x : A, Γ b : B r I Γ x.b : Ar B Γ1 a : Σr A Γ2 b : Ar B r E Γ1, Γ2 (a)b : Σr B Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 14. β-reduction One of the major differences between that system and something like a λ-calculus with 2 “directional”-λ’s is the β-reduction rules: t|x (b|x1 ...|xn ) =β (t)[x := b] |x1 ...|xn when t|x ∈ Termσφl and b|x1 ...|xn ∈ Termφπl 1...πl n This is the main reason why an untyped λ↔-calculus is not possible Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 15. β-reduction t|x (b|x1 ...|xn ) =β (t)[x := b] |x1 ...|xn when t|x ∈ Termσφl and b|x1 ...|xn ∈ Termφπl 1...πl n E.g. the ı(x).x : ¯nnl green green(y).y : nnl ı(green(y)).y : ¯nnl Compare this to the λx.ı(x) : NP/N green λy.green(y) : N/N z : N green(z) : N ı(green(z)) : NP λz.ı(green(z)) : NP/N Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 16. β-reduction t|x (b|x1 ...|xn ) =β (t)[x := b] |x1 ...|xn when t|x ∈ Termσφl and b|x1 ...|xn ∈ Termφπl 1...πl n We still need to be able to pass abstracted predicates though Someone ∃x.(x)y.y : s(πr 3s)l runs z.(z)run : πr 3s ∃x.(x) z.(z)run : s ∃x.(x)run : s Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 17. New Typing Structure The pregroup types we will end up using in our analyses only form a subset of the ones possible in the algebraic formulation. For instance, there are No more types of the form Ar , Arr B, Al B, AB, etc. No more relations such as (AB)l ↔ Bl Al Only one kind of contraction is possible: between “disconnected” types It is totally fine: we will end up not needing those relations and types at all, and our contraction rule is sufficient Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 18. New Typing Structure Predictions: give never needs its equivalent type i(op)l give a star to Bob ipl ol ¯nnl n p¯nl N → ipl ol ¯n p¯nl ¯n → ipl ol o p → ipl p → i for does not need φ(o¯j)l either John wants for Mary to live N πr 3sφl φ¯jl ol N ¯jil i → π3 πr 3sφl φ¯jl ol o ¯j → sφl φ¯jl ¯j → sφl φ → s Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 19. New Typing Structure More examples: somebody ssl π ? πr Edward likes pie s s John N who ¯nr ¯nsl πl Carl π I like ice cream s ¯n John N who ¯nr ¯n(πs)l ? πs ¯n John N whom ¯nr ¯nol lsl I like ice cream s ? ol ¯n Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 20. Flexibility of Derivations the ı(x)|x : ¯nnl green green(y)|y : nnl l E ı(green(y))|y : ¯nnl apple apple : n l E ı(green(apple)) : ¯n the ı(x)|x : ¯nnl green green(y)|y : nnl apple apple : n l E green(apple) : n l E ı(green(apple)) : ¯n Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 21. Constituency Analysis flies plural(fly(x)|x ) : n in y|(y)in(x)|x : nr n¯nl the ı(x)|x : ¯nnl sky sky : n l E ı(sky) : ¯n l E y|(y)in(ı(sky)) : nr n l E (plural(fly(x)|x )in(ı(sky)) : n flies z|fly(z) : πr s in y|(y)in(x)|x : sr s ¯nl l E z|(fly(z))in(x)|x : πr s ¯nl the ı(x)|x : ¯nnl sky sky : n l E ı(sky) : ¯n l E z|(fly(z))in(ı(sky)) : πr s Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 22. Examples Sentence with Quantifiers First reading: Everybody has a special someone, who might all be different from eachother everybody ∀((person(z) → (z)x|z ))|x : s(πr 3s)l loves x|(x)love(y)|y : πr 3sol somebody z|∃((person(y) → z(y))|y ) : (sol )r s x|∃((person(y) → (x)love(y))|y ) : πr 3s ∀((person(z) → ∃((person(y) → (z)love(y))|y ))|z ) : s Second reading: There’s someone who everyone’s in love with everybody ∀((person(z) → (z)x|z ))|x : s(πr 3s)l loves x|(x)love(y)|y : πr 3sol ∀((person(z) → (z)love(y)|z ))|y : sol somebody z|∃((person(x) → z(x))|x ) : (sol )r s ∃((person(x) → ∀((person(z) → (z)love(x)|z )))|x ) : s Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 23. Future More in-depth analysis of semantic power of the new calculus, i.e. what does an associative & compositional semantic layer imply for semantic analysis? Proving Church-Rosser Property Category theoretical analysis of the new calculus Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars
  • 24. The End Thank you for listening Special thanks to: Alan Bale, Claudia Casadio, and Robert Seely for their help in this project Gabriel Gaudreault Concordia University, Montreal CoCoNat 2015Functional Semantics for Pregroup Grammars