Parsing pregroup grammars using partial composition echet (1) , - - PowerPoint PPT Presentation

parsing pregroup grammars using partial composition
SMART_READER_LITE
LIVE PREVIEW

Parsing pregroup grammars using partial composition echet (1) , - - PowerPoint PPT Presentation

Parsing pregroup grammars using partial composition echet (1) , Annie Foret (2) and Isabelle Tellier (3) Denis B (1) LINA, University of Nantes (2) IRISA, University of Rennes (3) LIFL, University of Lilles III Workshop on Pregroups and Linear


slide-1
SLIDE 1

Parsing pregroup grammars using partial composition

Denis B´ echet(1), Annie Foret(2) and Isabelle Tellier(3)

(1) LINA, University of Nantes (2) IRISA, University of Rennes (3) LIFL, University of Lilles III

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 1

slide-2
SLIDE 2

Parsing with word separation

Parsing of “whom have you seen ?” (q′ ≤Pr s) whom have you seen

q′ollql qpl

2πl 2

π2 p2ol q′ollql, qpl

2πl 2, π2 [1] [1]

, p2ol

[2]

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 2

slide-3
SLIDE 3

PLAN

Introduction Background Free pregroup Pregroup grammar and language Parsing Parsing with word separation Rewriting Partial composition Majority partial composition Conclusion

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 3

slide-4
SLIDE 4

Free pregroup

(Id) p(n) ≤ p(n) X ≤ Y Y ≤ Z (CUT) X ≤ Z XY ≤ Z (AG) Xp(n)p(n+1)Y ≤ Z X ≤ Y Z (AD) X ≤ Y p(n+1)p(n)Z Xp(k)Y ≤ Z (INDG) Xq(k)Y ≤ Z X ≤ Y p(k)Z (INDD) X ≤ Y q(k)Z q ≤Pr p if k is even or p ≤Pr q if k is odd

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 4

slide-5
SLIDE 5

Free pregroup grammar and language

A grammar G = (Σ, (Pr, ≤Pr), I, s):

Σ finite alphabet (Pr, ≤) finite partially ordered set (primitive types)

that defines free pregroup (Tp, ≤Tp)

I ⊂ Σ × Tp, a lexicon, assigns a finite set of types to

each c ∈ Σ

s ∈ Pr is a primitive type for correct sentences

The language L(G) ∈ Σ+:

v1 · · · vn ∈ L(G)

iff for 1 ≤ i ≤ n, ∃Xi ∈ I(vi) such that X1 · · · Xn ≤Tp s

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 5

slide-6
SLIDE 6

Parsing using rewriting (1)

Because s is a primitive type, v1 · · · vn ∈ L(G) iff for 1 ≤ i ≤ n, ∃Xi ∈ I(vi) and ∃s′ ∈ Pr such that:

  • X1 · · · Xn

(1)∗

− → s′ s′ ≤Pr s

(1)∗

− → : the reflexive and transitive closure of

(1)

− →: Xp(n)q(n+1)Y

(1)

− → XY

if q ≤Pr p and n is even or if p ≤Pr q and n is odd

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 6

slide-7
SLIDE 7

Parsing using rewriting (1) : example

Parsing of “whom have you seen ?” (q′ ≤Pr s) whom have you seen

q′ollql qpl

2πl 2

π2 p2ol q′ollqlqpl

2πl 2π2p2ol (1)

− → q′ollpl

2πl 2π2p2ol (1)

− → q′ollpl

2p2ol (1)

− → q′ollol

(1)

− → q′

and q′ ≤Pr s

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 7

slide-8
SLIDE 8

Parsing using rewriting (1) : “proof net”

Parsing of “whom have you seen ?” (q′ ≤Pr s) whom have you seen

q′ollql qpl

2πl 2

π2 p2ol

q′ollqlqpl

2πl 2π2p2ol

(q′ ≤Pr s)

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 8

slide-9
SLIDE 9

Parsing with word separation (list)

Three rewriting rules (Γ, ∆ ∈ Tp∗, X, Y ∈ Tp, p, q ∈ Pr): [M] (merge): Γ, X, Y, ∆

M

− → Γ, XY, ∆.

[I ] (internal): Γ, Xp(n)q(n+1)Y, ∆

I

− → Γ, XY, ∆, if q ≤Pr p

and n is even or if p ≤Pr q and n is odd. [E ] (external): Γ, Xp(n), q(n+1)Y, ∆

E

− → Γ, X, Y, ∆, if q ≤Pr p and n is even or if p ≤Pr q and n is odd.

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 9

slide-10
SLIDE 10

Parsing with word separation (example)

Parsing of “whom have you seen ?” (q′ ≤Pr s) whom have you seen

q′ollql qpl

2πl 2

π2 p2ol q′oll ql, q pl

2πl 2, π2, p2ol E

− → q′oll, pl

2πl 2, π2 , p2ol M

− → q′oll, pl

2πl 2π2, p2ol I

− → q′oll, pl

2, p2 ol E

− → q′oll, , ol

M

− → q′ oll, ol

E

− → q′

and q′ ≤Pr s

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 10

slide-11
SLIDE 11

Parsing with word separation (lemma)

Parsing (for a pregroup grammar) can be done using MIE∗

− → : v1 · · · vn ∈ L(G) iff

for 1 ≤ i ≤ n, ∃Xi ∈ I(vi) and ∃s′ ∈ Pr such that:

  • X1, · · · , Xn

MIE∗

− → s′ s′ ≤Pr s

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 11

slide-12
SLIDE 12

Internal before Merge/External (lemma)

I

− → can be performed before

M

− → and

E

− →: v1 · · · vn ∈ L(G) iff

for 1 ≤ i ≤ n, ∃Xi ∈ I(vi), ∃Yi ∈ Tp and ∃s′ ∈ Pr such that:

      

for 1 ≤ i ≤ n, Xi

I∗

− → Yi Y1, · · · , Yn

ME∗

− → s′ s′ ≤Pr s

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 12

slide-13
SLIDE 13

Internal before Merge/External (example)

q′oll ql, q pl

2πl 2, π2, p2ol E

− → q′oll, pl

2πl 2, π2 , p2ol M

− → q′oll, pl

2πl 2π2, p2ol I

− → q′oll, pl

2, p2 ol E

− → q′oll, , ol

M

− → q′ oll, ol

E

− → q′

becomes:

q′oll ql, q pl

2πl 2, π2, p2ol E

− → q′oll, pl

2 πl 2, π2 , p2ol E

− → q′oll, pl

2, , p2ol M

− → q′oll, pl

2, p2 ol E

− → q′oll, , ol

M

− → q′ oll, ol

E

− → q′

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 13

slide-14
SLIDE 14

Partial composition

E∗

− → and

M

− → corresponding to the same couple of types are

joined together in

C

− → :

[C] (partial composition): For k ∈ N,

Γ, Xp(n1)

1

· · · p(nk)

k

, q(nk+1)

k

· · · q(n1+1)

1

Y, ∆

E

− → Γ, XY, ∆, if qi ≤Pr pi and ni is even or if pi ≤Pr qi and ni is odd, for 1 ≤ i ≤ k.

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 14

slide-15
SLIDE 15

Partial composition (example)

q′oll ql, q pl

2πl 2, π2, p2ol E

− → q′oll, pl

2 πl 2, π2 , p2ol E

− → q′oll, pl

2, , p2ol M

− → q′oll, pl

2, p2 ol E

− → q′oll, , ol

M

− → q′ oll, ol

E

− → q′

becomes:

q′oll ql, q pl

2πl 2, π2, p2ol E

− → q′oll, pl

2πl 2, π2 [1]

, p2ol

C

− → q′oll, pl

2, p2 ol E

− → q′oll, , ol [0]

C

− → q′ oll, ol

E

− → q′

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 15

slide-16
SLIDE 16

Partial composition (lemma)

Lemma: For a list of types Γ and p ∈ Pr, Γ ME∗

− → p iff Γ

C∗

− → p

Corollary:

v1 · · · vn ∈ L(G) iff

for 1 ≤ i ≤ n, ∃Xi ∈ I(vi), ∃Yi ∈ Tp and ∃s′ ∈ Pr such that:

      

for 1 ≤ i ≤ n, Xi

I∗

− → Yi Y1, · · · , Yn

C∗

− → s′ s′ ≤Pr s

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 16

slide-17
SLIDE 17

Partial composition (example)

q′oll ql, q pl

2πl 2, π2, p2ol E

− → q′oll, pl

2 πl 2, π2 , p2ol E

− → q′oll, pl

2, , p2ol M

− → q′oll, pl

2, p2 ol E

− → q′oll, , ol

M

− → q′ oll, ol

E

− → q′

becomes:

q′ollql, qpl

2πl 2 [1]

, π2, p2ol

C

− → q′ollpl

2πl 2, π2 [1]

, p2ol

C

− → q′ollpl

2, p2ol [2] C

− → q′

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 17

slide-18
SLIDE 18

Partial composition (parse tree)

q′ollql, qpl

2πl 2 [1]

, π2, p2ol

C

− → q′ollpl

2πl 2, π2 [1]

, p2ol

C

− → q′ollpl

2, p2ol [2] C

− → q′

corresponds to the following parse tree:

q′ollql, qpl

2πl 2 [1]

, π2

[1]

, p2ol

[2]

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 18

slide-19
SLIDE 19

Parsing using partial composition

Partial composition does not give a polynomial parsing algorithm because the result of partial composition is not bounded by the lexicon:

Γ, q′ollql, qpl

2πl 2 [1]

, ∆

C

− → Γ, q′ollpl

2πl 2, ∆

3 , 3 4

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 19

slide-20
SLIDE 20

Majority partial composition

A partial composition

C

− → is a majority partial composition

(noted

@

− →) if the width of the result is less or equal to the

maximum of the widths of the arguments A non majoritory partial composition:

Γ, q′ollql, qpl

2πl 2 [1]

, ∆

C

− → Γ, q′ollpl

2πl 2, ∆

A majoritory partial composition:

Γ, q′ollql, qolπl

2 [2]

, ∆

@

− → Γ, q′πl

2, ∆

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 20

slide-21
SLIDE 21

Parsing using majority composition

Main theorem:

v1 · · · vn ∈ L(G) iff

for 1 ≤ i ≤ n, ∃Xi ∈ RI∗(I)(vi), and ∃s′ ∈ Pr such that:

  • X1, · · · , Xn

@∗

− → s′ s′ ≤Pr s

where RI∗(I) is the completion of I by

I∗

− →

Proof: property of (planar) proof nets. there exists a type in

Γ that is only linked to its immediate neighour(s)

q′ollql, qpl

2πl 2, π2, p2ol

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 21

slide-22
SLIDE 22

Parsing using @ (example)

q′ollql, qpl

2πl 2 [1]

, π2, p2ol

C

− → q′ollpl

2πl 2, π2 [1]

, p2ol

C

− → q′ollpl

2, p2ol [2] C

− → q′

is transformed into:

q′ollql, qpl

2πl 2, π2 [1]

, p2ol

@

− → q′ollql, qpl

2 [1]

, p2ol

@

− → q′ollpl

2, p2ol [2] @

− → q′

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 22

slide-23
SLIDE 23

Polynomial parsing using @

Partial composition gives a polynomial parsing algorithm because the result of partial composition is bounded by the maximum width of the types of the lexicon. For a grammar G and a list of words v1, · · · , vn ∈ Σ+, we compute for 1 ≤ i ≤ j ≤ n, T G

v1,··· ,vn(i, j) ⊂ Tp, the possible

types associated to the sublist of words vi, · · · , vj using majority partial composition:

i = j : T G

v1,··· ,vn(i, j) = RI∗(I)(vi)

i < j : T G

v1,··· ,vn(i, j) = j−1 k=i

     Z

  • ∃X ∈ T G

v1,··· ,vn(i, k)

∃Y ∈ T G

v1,··· ,vn(k + 1, j)

X, Y

@

− → Z     

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 23

slide-24
SLIDE 24

Polynomial parsing using @

v1, · · · , vn ∈ L(G) iff ∃s′ ∈ Pr such that s′ ∈ T G

v1,··· ,vn(1, n) and s′ ≤Pr s

Algorithm:

  • 1. Search the types associated by G to each word
  • 2. Add the types deduced by

I∗

− →

  • 3. Compute recursively the possible types associated to a

contiguous segment of words of the string using

@

− →

  • 4. Look at the primitive types associated to the complete

string

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 24

slide-25
SLIDE 25

Polynomial parsing using @ (example)

Parsing of “whom have you seen ?”

  • 1. Lexicon:
  • whom

→ {q′ollql}

have

→ {qpl

2πl 2}

you

→ {π2}

seen

→ {p2ol}

  • 2. Completion of the lexicon using

I

− →: nothing to add

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 25

slide-26
SLIDE 26

Polynomial parsing using @ (example)

Parsing of “whom have you seen ?”

  • 3. Types associated to segment of words:

Length = 1: whom have you seen

{q′ollql} {qpl

2πl 2}

{π2} {p2ol}

Length = 2: whom have have you you seen

∅ {qpl

2}

Length = 3: whom have you have you seen

{q′ollpl

2}

{qol}

Length = 4: whom have you seen

{q′ and q′ollol}

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 26

slide-27
SLIDE 27

Polynomial parsing using @ (example)

Parsing of “whom have you seen ?”

  • 4. Primitive types for the string: q′ and q′ ≤Pr s

= ⇒ this is a correct sentence

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 27

slide-28
SLIDE 28

Polynomial parsing using @ (example)

Associativity usually gives several parse trees:

q′ollql, qpl

2πl 2, π2 [1] [1]

, p2ol

[2]

q′ollql, qpl

2πl 2, π2 [1]

, p2ol

[1] [2]

Remark:

q′ollql, qpl

2πl 2 [1]

, π2

[1]

, p2ol

[2]

is not a parse tree (one partial composition is not a majority partial composition)

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 28

slide-29
SLIDE 29

Conclusion

Polynomial parsing algorithm using majority partial composition of types associated to the words of a string Need to complete the lexicon with types deduced using “internal” rewriting Can be adapted to associative Lambek calculus (using modules)

Workshop on Pregroups and Linear Logic – Chieti, 6-7 May 2005 – p. 29