Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun...

27
Categorical methods in linguistics Robin Piedeleu 2014-10-16

Transcript of Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun...

Page 1: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Categorical methods in linguistics

Robin Piedeleu

2014-10-16

Page 2: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

What does

share with

?

Page 3: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Categories capture composition

B C

A

g

fg ○ f

Page 4: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Reconciling syntax and semantics

Page 5: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Formal, symbolic, logical

"I reject the contention that an important theoretical differenceexists between formal and natural languages."

- English as a Formal Language, Montague

Compositional but incomplete model of meaning.

Page 6: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Distributional

"You shall know the word by the company it keeps"

- J.R. Firth

queen

plant

economy

monarch

law

growth

vegetable

Good model of meaning of individual words but not obviouslycompositional

Page 7: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Compositional distributional model

▸ With categorical methods we wish to provide a general andabstract interface between these two approaches.

▸ A functorFSyntax Semantics

▸ What structure do we need to express basic syntactic andsemantic information? Category in which

▸ objects are grammatical types;▸ morphisms are ???.

Page 8: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

What structure?

▸ Monoidal: type of a sentence is the tensor of the types of thewords

My fake plants died ∶ Pr ⊗Adj ⊗N ⊗V i

▸ Closed: exponentials equipped with evaluation morphisms∗

NP ⊗ (NP ⇒ S)EvalNP,SÐÐÐÐ→ S

∗ satisfying the appropriate universal properties.

Page 9: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

What structure?

▸ Monoidal: type of a sentence is the tensor of the types of thewords

My fake plants died ∶ Pr ⊗Adj ⊗N ⊗V i

▸ Closed: exponentials equipped with evaluation morphisms∗

NP ⊗ (NP ⇒ S)EvalNP,SÐÐÐÐ→ S

∗ satisfying the appropriate universal properties.

Page 10: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

What structure?

▸ Monoidal: type of a sentence is the tensor of the types of thewords

My fake plants died ∶ Pr ⊗Adj ⊗N ⊗V i

▸ Closed: exponentials equipped with evaluation morphisms∗

(S ⇐ NP)⊗NPLaveNP,SÐÐÐÐ→ S

∗ satisfying the appropriate universal properties.

Page 11: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

A more convenient framework: compact closed categories

We get a diagrammatic calculus for free!

ηlA =

εlA =

A A

A AεrA =A A

AηrA =

A

Page 12: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

A more convenient framework: compact closed categories

We get a diagrammatic calculus for free!

A

A

= =A

A

A

and

A

A

A

= A

A

A

A=

Page 13: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

A more convenient framework: compact closed categories

We get a diagrammatic calculus for free!

A⊗ (Ar ⊗B)εrA⊗1BÐÐÐ→ B (B ⊗Al)⊗A

1B⊗εlAÐÐÐ→ A

A A

B

A

B

A

EvalA,B LaveA,B

Page 14: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Reductions

▸ Morphisms in the internal language of a monoidal closedcategory.

▸ A reduction looks like

John likes MaryN r ⊗ S ⊗N lN N

Page 15: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

What structure?

▸ Monoidal: type of a sentence is the tensor of the types of thewords

My fake plants died ∶ Pr ⊗Adj ⊗N ⊗V i

▸ Closed: exponentials equipped with evaluation morphisms∗

NP ⊗ (NP ⇒ S)EvalNP,SÐÐÐÐ→ S

▸ Dagger: involutive, identity on object contravariant functor∗.To compare the proximity of meaning:

IloveÐÐ→ N r ⊗ S ⊗N l like†

ÐÐ→ I

∗satisfying coherence conditions with the compact closed structure.

Page 16: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

What structure?

▸ Monoidal: type of a sentence is the tensor of the types of thewords

My fake plants died ∶ Pr ⊗Adj ⊗N ⊗V i

▸ Closed: exponentials equipped with evaluation morphisms∗

NP ⊗ (NP ⇒ S)EvalNP,SÐÐÐÐ→ S

▸ Dagger: involutive, identity on object contravariant functor∗.To compare the proximity of meaning:

IloveÐÐ→ N r ⊗ S ⊗N l like†

ÐÐ→ I

∗satisfying coherence conditions with the compact closed structure.

Page 17: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Functorial interpretation

Strict monoidal functor from our syntactic category to our semanticcategory.

John likes Mary

N r ⊗ S ⊗N lN N

Page 18: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Functorial interpretation

Strict monoidal functor from our syntactic category to our semanticcategory.

John likes Mary

N r ⊗ S ⊗N lN NJohn

SMary

likes

=

Examples:

GrFÐÐÐÐ→ FdHilb, ∑

ijk

⟨John∣vi ⟩sj⟨vk ∣Mary⟩

Page 19: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Functorial interpretation

Strict monoidal functor from our syntactic category to our semanticcategory.

John likes Mary

N r ⊗ S ⊗N lN NJohn

SMary

likes

=

Examples:

GrFÐÐÐÐ→ FdHilb, ∑

ijk

⟨John∣vi ⟩sj⟨vk ∣Mary⟩

Page 20: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Functorial interpretation

Strict monoidal functor from our syntactic category to our semanticcategory.

John likes Mary

N r ⊗ S ⊗N lN NJohn

SMary

likes

=

Examples:

GrFÐÐÐÐ→ CPM(FdHilb)

Page 21: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Examples:

GrFÐÐÐÐ→ CPM(FdHilb)

⌜TrN,N(ρ(like) ○ (ρ(John)⊗ 1S ⊗ ρ(Mary)))⌝

Page 22: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Disambiguation

Queen

Context determines meaning:

▸ "the queen overruled the decision of the prime minister"▸ "Queen captures the rook in a1"

Page 23: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Toy example

Bank

Context determines meaning:

"river bank"

Page 24: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Flow of ambiguity

adj

noun

↦adj noun

Page 25: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Flow of ambiguity

a

noun

↦adj noun

a

More refined process: CP∗

Page 26: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Flow of ambiguity

a

noun

↦adj noun

a

More refined process: CP∗

Page 27: Categorical methods in linguistics categorical... · 2014. 10. 21. · Flow of ambiguity a noun (adj noun a Morerefinedprocess: CP∗ Moral of the story Contextual features of natural

Moral of the story

Contextual features of natural language can be builtin the wires.