Non-projective axioms for pregroup grammars as cut

24
Non-projective axioms for pregroup grammars as cut eliminations Denis B ´ echet [email protected] LINA, University of Nantes Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 1

Transcript of Non-projective axioms for pregroup grammars as cut

Non-projective axioms for pregroupgrammars as cut eliminations

Denis Bechet

[email protected]

LINA, University of Nantes

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 1

Non-projective axioms with pregroupPregroup analysis of “quand il l’avait ramené...”(when he took her home...):

l’ is assigned πr3so

llslπ3 rather than oll

A better analysis :

=⇒ We need non-projective axioms

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 2

Non-projective axioms with pregroup

How can we introduce “non projective axioms” ?

1. Using products of free pregroups (Kobele 2005)=⇒ NP complete (proof here)

2. Using an external product as with CategorialDependency Grammars (Dikovsky 2004) (demo here)=⇒ Not a pregroup

3. Using “cut elimination”, non-projective axioms arecreated from projective axioms (demo here)=⇒ Complex annotation system and less powerful

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 3

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

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 4

Pregroup grammars and languages

A grammar G = (Σ, (Pr,≤Pr), I, s):Σ a finite alphabet(Pr,≤) a finite partially ordered set (primitive types)that defines free pregroup (Tp,≤Tp)

I ⊂ Σ × Tp, a lexicon, assigns a finite set of types toeach 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

Can be adapted to any pregroup (not only free pregroup)

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 5

(not free) Pregroup grammars

A grammar G = (Σ, P, I, s):Σ a finite alphabet

P = (Tp, •, 1,≤Tp,l ,r ) a (not free) pregroup

I ⊂ Σ × Tp, a lexicon, assigns a finite set of types toeach c ∈ Σ

s ∈ Tp is a 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

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 6

Non-projective axioms with pregroup

How can we introduce “non projective axioms” ?

1. Using products of free pregroups (Kobele 2005)=⇒ NP complete (proof here)

2. Using an external product as with CategorialDependency Grammars (Dikovsky 2004) (demo here)=⇒ Not a pregroup

3. Using “cut elimination”, non-projective axioms arecreated from projective axioms (demo here)=⇒ Complex annotation system and less powerful

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 7

Product of pregoups (Kobele 2005)

For 2 pregroups P1 = (Tp1, •1, 11,≤Tp1,l1 ,r1 ) and

P2 = (Tp2, •2, 12,≤Tp2,l2 ,r2 ) :

P1 × P2 = (Tp1 × Tp2, ◦, (11, 12),≤,L ,R )

1. (x, y) ≤ (x′, y′) iff x ≤Tp1

x′ and y ≤Tp2

y′

2. (x, y) ◦ (x′, y′) = (x •1 x′, y •2 y′)

3. (x, y)L = (xl1 , yl2) and (x, y)R = (xr1 , yr2)

Kobele 2005 : “Cross product” over lexicalized grammars

L(G1 × G2) = L(G2) ∩ L(G1)

But, grammars using products of free pregroups are NPcomplete (proof here)

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 8

Product of pregroup : NP hard

Proof : we encode any SAT problem

The proof uses the product of three free pregroups on{t, f} : (P, ∆1, ∆2) (in fact P = ∆1 = ∆2)

P : for formula inferences

∆1 and ∆2 for the propagation of the boolean values ofvariables

A formula is transformed into a string.The formula can be satisfied iff the string is in the languagegenerated by a fixed grammar GSAT based on(P,Delta1, Delta2)

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 9

NP hard (formula transformation)

A formula F that contains (at most) n variables v1, . . . , vn istransformed into a string Tn(F ) :

Tn(F ) = a · · · a︸ ︷︷ ︸

n

[F ] e · · · e︸ ︷︷ ︸

n

[vi]n = b · · · b︸ ︷︷ ︸

i−1

c b · · · b︸ ︷︷ ︸

n−i

d · · · d︸ ︷︷ ︸

n

[F1 ∨ F2]n = ∨[F1]n[F2]n

[F1 ∧ F2]n = ∧[F1]n[F2]n

[¬F ]n = ¬[F ]n

For instance : T2(v1 ∨ (v1 ∧ v2)) = aa ∨ cbdd︸︷︷︸

for v1

∧ cbdd︸︷︷︸

for v1

bcdd︸︷︷︸

for v2

ee

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 10

NP hard (grammar)

GSAT is defined by the following lexicon :

a 7→ (1, tl, 1)or(1, f l, 1)

b 7→ (1, t, tl)or(1, f, f l)

c 7→ (t, t, tl)or(f, f, f l)

d 7→ (1, tl, t)or(1, f l, f)

e 7→ (1, t, 1)or(1, f, 1)

∧ 7→ (ttltl, 1, 1)or(ff ltl, 1, 1)or(ftlf l, 1, 1)or(ff lf l, 1, 1)

∨ 7→ (ttltl, 1, 1)or(tf ltl, 1, 1)or(ttlf l, 1, 1)or(ff lf l, 1, 1)

¬ 7→ (tf l, 1, 1)or(ftl, 1, 1)

The types corresponding to correct strings are ≤ (t, 1, 1)

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 11

NP hard (example 1)

T1(v1 ∧ v1) = a ∧ cd cd e

For v1 = t, the formula is true.

There exists an assignement of the symbols of T1(v1 ∧ v1)through GSAT whose product is ≤ (t, 1, 1) :

(1, tl, 1)︸ ︷︷ ︸

for a

(ttltl, 1, 1)︸ ︷︷ ︸

for ∧

(t, t, tl)︸ ︷︷ ︸

for c

(1, tl, t)︸ ︷︷ ︸

for d

(t, t, tl)︸ ︷︷ ︸

for c

(1, tl, t)︸ ︷︷ ︸

for d

(1, t, 1)︸ ︷︷ ︸

for e

≤ (t, 1, 1)

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 12

NP hard (example 2)

T2(v1 ∧ ¬v2) = aa ∧ cbdd ¬ bcdd ee

For v1 = t and v2 = f , the formula is true.

There exists an assignement of the symbols of T2(v1 ∧ ¬v2)through GSAT whose product is ≤ (t, 1, 1) :

(1, f l, 1)︸ ︷︷ ︸

for a

(1, tl, 1)︸ ︷︷ ︸

for a

(ttltl, 1, 1)︸ ︷︷ ︸

for ∧

(t, t, tl)︸ ︷︷ ︸

for c

(1, f, f l)︸ ︷︷ ︸

for b

(1, f l, f)︸ ︷︷ ︸

for d

(1, tl, t)︸ ︷︷ ︸

for d

(tf l, 1, 1)︸ ︷︷ ︸

for ¬

(1, t, tl)︸ ︷︷ ︸

for b

(f, f, f l)︸ ︷︷ ︸

for c

(1, f l, f)︸ ︷︷ ︸

for d

(1, tl, t)︸ ︷︷ ︸

for d

(1, t, 1)︸ ︷︷ ︸

for e

(1, f, 1)︸ ︷︷ ︸

for e

≤ (t, 1, 1)

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 13

Product of pregroup : NP complete

A grammar using the product of N free pregroups is in NPbecause, to test if a string is in the language, we just haveto know the right assignment through the grammar and testthat the N pregroup type components are less (or equal)than the corresponding pregroup type componentsassociated to correct sentences.

⇒ Product of N free pregroups for N ≥ 3 is NP complete

Remark: This is also true for N = 2 (the proof is similar butthe construction is more complex)

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 14

Non-projective axioms with pregroup

How can we introduce “non projective axioms” ?

1. Using products of free pregroups (Kobele 2005)=⇒ NP complete (proof here)

2. Using an external product as with CategorialDependency Grammars (Dikovsky 2004) (demo here)=⇒ Not a pregroup

3. Using “cut elimination”, non-projective axioms arecreated from projective axioms (demo here)=⇒ Complex annotation system and less powerful

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 15

External product with a free pregroup

Is it possible to have a product of a free pregroup with asimpler structure (i.e. with a polynomial complexity) ?

⇒ Pregroup with potential

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 16

Free pregroup with potential

Structure like Categorial Dependency Grammar (Dikovsky2004) but with a free pregroup rather than a set of flatcategorial types :P × ∆1 × · · · × ∆n

P : a (free) pregroup used by the grammar as apregroup grammar

∆i : strings of parentheses used by the grammar as aDyck language (with only one couple of parentheses)

Proprety :- Parsing is polynomial- Some languages are context-sensitive languagesProblems :- Strings of parentheses do not form a pregroup- We need to introduce “anchors”

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 17

Free pregroup with potential

Strings of parentheses do not form a pregroup because :

We need at the same time a left adjoint and a right adjointfor “տo”

If (տo)l = (տo)r = ւo then the structure is not a Dycklanguage

If (տo)l 6= (տo)r then the structure has at least threegenerators

=⇒ A free pregroup with potential is not a pregroup

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 18

Free pregroup with potential

We need to introduce “anchors” to control the end positionof a “non projective axiom”

Accept also :

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 19

Free pregroup with potential

Without “anchors” :

With “anchors” :

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 20

Non-projective axioms with pregroup

How can we introduce “non projective axioms” ?

1. Using products of free pregroups (Kobele 2005)=⇒ NP complete (proof here)

2. Using an external product as with CategorialDependency Grammars (Dikovsky 2004) (demo here)=⇒ Not a pregroup

3. Using “cut elimination”, non-projective axioms arecreated from projective axioms (demo here)=⇒ Complex annotation system and less powerful

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 21

Free pregroup with cut annotations

We introduce cut annotations [· · · ] on types

l′ 7→ [πr3[so

llsl]π3]

After “annotated cut elimination” of [πr3[so

llsl]π3] :

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 22

Free pregroup with cut annotations

Non-projective axioms introduced at a final step

The complexity is polynomial

Does not extend the class of languages

Needs (not natural) annotations on types

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 23

Conclusion

Non-projective axioms in pregroup are not easy tointroduce

Here, 3 propositions (2 are implemented) that are notcompletely satisfying :

Must be polynomialUses a (not free) pregroupExtends the class of languages beyong the class ofcontext free languages

Better solution ?

Joachim Lambek – Mathematics, Logic and Language – Chieti, 8–9 July 2011 – p. 24