Upload
others
View
13
Download
0
Embed Size (px)
Citation preview
Parallel Systems as Mildly Context-Sensitive
Grammar Formalisms
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Sequential mildly context-sensitive grammar formalisms
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Sequential mildly context-sensitive grammar formalisms
Parallel mildly context-sensitive grammar formalisms
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Sequential mildly context-sensitive grammar formalisms
Parallel mildly context-sensitive grammar formalisms
• Motivation for parallel mildly context-sensitive grammar formalisms
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Sequential mildly context-sensitive grammar formalisms
Parallel mildly context-sensitive grammar formalisms
• Motivation for parallel mildly context-sensitive grammar formalisms
• Notions: ET0L systems, k-uniformly-limited ET0L systems
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Sequential mildly context-sensitive grammar formalisms
Parallel mildly context-sensitive grammar formalisms
• Motivation for parallel mildly context-sensitive grammar formalisms
• Notions: ET0L systems, k-uniformly-limited ET0L systems
• Left-restricted k-uniformly-limited ET0L systems and languages
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Sequential mildly context-sensitive grammar formalisms
Parallel mildly context-sensitive grammar formalisms
• Motivation for parallel mildly context-sensitive grammar formalisms
• Notions: ET0L systems, k-uniformly-limited ET0L systems
• Left-restricted k-uniformly-limited ET0L systems and languages
• Results
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Introduction
• Motivation for mildly context-sensitive grammar formalisms
Sequential mildly context-sensitive grammar formalisms
Parallel mildly context-sensitive grammar formalisms
• Motivation for parallel mildly context-sensitive grammar formalisms
• Notions: ET0L systems, k-uniformly-limited ET0L systems
• Left-restricted k-uniformly-limited ET0L systems and languages
• Results
Conclusions
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Non-context-free phenomena in natural languages
• Structural aspects, that cannot be described with context-free grammars mmms[Stuart Shieber, 1985] i.a.
– For example crossed dependencies in Swiss-German:
. . . mer em Hans es huus haend wele halfe aastriiche.
. . . we em Hans the house have wanted help paintDAT ACC“we have wanted to help Hans to paint the house”
• Crossed dependencies from a formal languages point of view:
L = { anbmcndm | n,m ≥ 1 }
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Mildly context-sensitivity
• [Aravind Joshi, 1985]
• Characterisation of a class of grammar formalisms for an adequate sunaaaadescription of aspects in natural languages
• Certain non-context-free languages (crossed dependencies)
• Constant growth property or semilinearity
• Polynomial parsing
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Sequential mildly context-sensitive grammar formalisms
• Investigations on some sequential mildly context-sensitive grammar formalisms[Joshi et al., 1991], [Vijay-Shanker et al., 1994], u.a.:
L(CS)6
L(LCFRS) = L(MCTAG)6
L(TAG)= L(HG)= L(LIG)= L(CCG)6
L(CF)
'
&
$
%
Context-free grammars (CF), Tree adjoining grammars (TAG), Linear indexed grammars (LIG),
Head grammars (HG), Combinatory categorial grammars (CCG), Context-sensitive grammmars (CS),
Linear context-free rewriting systems (LCFRS), Multiple component TAGs (MCTAG)
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Definition [Aravind Joshi, 1985], [Henning Bordihn, 2004]:
A grammar family GF is said to be mildly context-sensitive if the following sunaconditions are satisfied:
• for every context-free language L, there is a grammar G in GF with
L(G) = L; and there are grammars G1, G2, G3 in GF , such that
L(G1) = {anbncn | n ≥ 1},
L(G2) = {anbmcndm | n,m ≥ 1},
L(G3) = {ww | w ∈ (a, b)+}, and
• for every grammar G in GF the language L(G) is semilinear, and
• for GF the membership problem is decidable in deterministic polynomial time. l
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Parallel mildly context-sensitive grammar formalisms
• Speechprocessing is not an absolutely sequential process [Ray Jackendoff, 1997],[Jerrold Sadock, 1991].
• Are there any parallel grammar formalisms, that are mildly context-sensitive?
• Lindenmayer systems (or L systems) [Aristid Lindenmayer, 1968] were suintroduced to model the development of multicellular organisms.
• The main difference between L systems and grammars in the Chomsky sunahierarchy is the parallelism.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Definition
• An ET0L system (extended tabled Lindemayer system without interaction) istis a tuple G = (Σ,∆, H, ω), where
- Σ is the alphabet,
- ∆ ⊆ Σ is the terminal alphabet,
- H is a finite set of finite substitutions, (called tables),
- ω ∈ Σ∗ is the axiom.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Example ET0L system:
table 1 table 2
ω = S
S → ABCA → aAB → bBC → cCa → a
b → bc → c
S → SA → aB → bC → ca → a
b → bc → c
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Example ET0L system:
table 1 table 2
ω = S
S → ABCA → aAB → bBC → cCa → a
b → bc → c
S → SA → aB → bC → ca → a
b → bc → c
S
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Example ET0L system:
table 1 table 2
ω = S
S → ABCA → aAB → bBC → cCa → a
b → bc → c
S → SA → aB → bC → ca → a
b → bc → c
S
CBA
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Example ET0L system:
table 1 table 2
ω = S
S → ABCA → aAB → bBC → cCa → a
b → bc → c
S → SA → aB → bC → ca → a
b → bc → c
S
C
Cc
B
Bb
A
Aa
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Example ET0L system:
table 1 table 2
ω = S
S → ABCA → aAB → bBC → cCa → a
b → bc → c
S → SA → aB → bC → ca → a
b → bc → c
S
C
C
Cc
c
c
B
B
Bb
b
b
A
A
Aa
a
a
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Example ET0L system:
table 1 table 2
ω = S
S → ABCA → aAB → bBC → cCa → a
b → bc → c
S → SA → aB → bC → ca → a
b → bc → c
S
C
C
C
c
c
c
c
c
c
B
B
B
b
b
b
b
b
b
A
A
A
a
a
a
a
a
a
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Parallel grammar formalisms
• Some parallel grammar formalisms, that do not fulfill the conditions for mild mildmild context-sensitivity:
0L
ET0L
ET0L with finite index
Indian parallel grammars
Russian parallel grammars
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Restricting ET0L systems to uniform k limitation
[Watjen & Unruh 1990]: k-uniformly-limited ET0L systems (kulET0L systems), sk ∈ IN.
In each derivation step k symbols, if existing, are rewritten.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Restricting ET0L systems to uniform k limitation
[Watjen & Unruh 1990]: k-uniformly-limited ET0L systems (kulET0L systems), sk ∈ IN.
In each derivation step k symbols, if existing, are rewritten.
Example of a possible derivation, k = 3:
S
C
Cc
B
Bb
A
Aa
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Restricting ET0L systems to uniform k limitation
[Watjen & Unruh 1990]: k-uniformly-limited ET0L systems (kulET0L systems), sk ∈ IN.
In each derivation step k symbols, if existing, are rewritten.
Example of a possible derivation, k = 3:
S
C
Cc
B
Bb
A
Aa �������� ����
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Restricting ET0L systems to uniform k limitation
[Watjen & Unruh 1990]: k-uniformly-limited ET0L systems (kulET0L systems), sk ∈ IN.
In each derivation step k symbols, if existing, are rewritten.
Example of a possible derivation, k = 3:
S
C
C
Cc
c
B
Bb
b
A
A
Aa
a ���� ���� ����
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Restricting ET0L systems to uniform k limitation
[Watjen & Unruh 1990]: k-uniformly-limited ET0L systems (kulET0L systems), sk ∈ IN.
In each derivation step k symbols, if existing, are rewritten.
Example of a possible derivation, k = 3:
S
C
C
Cc
c
B
Bb
b
A
A
Aa
a ���� ���� ����n���� ����
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Restricting ET0L systems to uniform k limitation
[Watjen & Unruh 1990]: k-uniformly-limited ET0L systems (kulET0L systems), sk ∈ IN.
In each derivation step k symbols, if existing, are rewritten.
Example of a possible derivation, k = 3:
S
C
C
Cc
c
B
Bb
b
A
A
Aa
a ���� ���� ����n���� ����
A kulET0L system is propagating (kulEPT0L system), if there are no erasingproductions.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Results for kulEPT0L systems and languages
• We have:
- L(1ulET0L) = L(CF).
- The non-context-free languages L1, L2 und L3 can be generated with 2ulEPT0Lsuna2ulEPT0L systems.
- The family of kulEPT0L languages, k ∈ IN, contains only semilinear
languages.
- Normalform for kulEPT0L systems, k ∈ IN.
• We need:
– A recogniser ...
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulEPT0L systems
• Mathematical point of view:
– Better parsing strategies
• Linguistical point of view:
– Reduction of ambiguity– Avoidence of rewriting terminal symbols– Time sequence of speech
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Example of a possible derivation, k = 2:
S
CBA
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Example of a possible derivation, k = 2:
S
CBA��������
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Example of a possible derivation, k = 2:
S
CB
Bb
A
Aa
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Example of a possible derivation, k = 2:
S
CB
Bb
A
Aa ���� ����
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Example of a possible derivation, k = 2:S
CB
B
Bb
b
A
A
Aa
a
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Example of a possible derivation, k = 2:S
CB
B
Bb
b
A
A
Aa
a
���� ����
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Leftrestriction on kulET0L systems
Left-restricted kulET0L systems (LR-kulET0L systems), k ∈ IN:
In each derivation step the k leftmost nonterminal symbols, if existing, arereplaced.
Example of a possible derivation, k = 2:
S
CB
B
Bb
b
A
A
Aa
a
���� ����
An LR-kulET0L system is propagating (LR-kulEPT0L system), if the are noerasing productions.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Results for LR-kulEPT0L systems and languages
• L(LR-1ulEPT0L) = L(CF \ λ).
• The three non-context-free languages L1, L2 and L3 can be generated withLR-2ulEPT0L systems.
• The family of LR-kulEPT0L languages, k ∈ IN, contains only semilinearlanguages.
• We have a recogniser for LR-2ulEPT0L languages, which achieves polynomialtime.
• The family of LR-kulEPT0L languages, k ∈ IN, is a proper subset of the familyof context-sensitive languages.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Idea of the semilinearity proof for the LR-kulEPT0L languages
Notations
• For a word w ∈ V ∗ we define it’s Parikhvector ψ(w) as follows
ψ(w) = ( |w|a1, |w|a2
, . . . , |w|an ), where ai ∈ V, 1 ≤ i ≤ n.
• A set of vectors is semilinear, if it is a union of finite linear sets of the followingform
{ v0 +m
∑
i=1
xivi | xi ∈ IN0, vi ∈ INn0 , 0 ≤ i ≤ m }.
• A language is semilinear, if the set ψ(L) = {ψ(w) | w ∈ L } is a semilinear set.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Periodical subtrees
A1A2 . . . Ak
@@
@@
@@
��
��
��
v1A1v2A2 . . . vkAkvk+1
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Periodical subtrees
A1A2 . . . Ak
@@
@@
@@
��
��
��
v1A1v2A2 . . . vkAkvk+1
Let P be the set of all periodical subtrees:
P = {P1: A1A2 . . . Ak
@@
@@
@@
��
��
��
v1A1v2A2 . . . vkAkvk+1
, . . . , Pφ:N1N2 . . . Nk
@@
@@
@@
��
��
��
v1N1v2N2 . . . vkNkvk+1
}.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Let A be the set
A = { A1:ω
��
��
@@
@@
a1a2 . . . an
, . . . , Aα:, . . . ,ω
��
��
@@
@@
b1b2 . . . bm
}.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Let A be the set
A = { A1:ω
��
��
@@
@@
a1a2 . . . an
, . . . , Aα:, . . . ,ω
��
��
@@
@@
b1b2 . . . bm
}.
Let B be the set
B = {B1: ω
@@
@@
@@
��
��
��
@@
@
��
�
v1v2 . . . vn
, . . . , Bβ:ω
@@
@@
@@
��
��
��
x1x2 . . . xm
@@
@
��
� }.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Aw ={Words of the derivation trees in A}
Bv ={Words of the derivation trees in B}
Pu ={Words of the periodical subtrees
associated to the trees in B }
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Aw ={Words of the derivation trees in A}
Bv ={Words of the derivation trees in B}
Pu ={Words of the periodical subtrees
associated to the trees in Bζ( )}
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Aw ={Words of the derivation trees in A}ψ( )
Bv ={Words of the derivation trees in B}ψ( )
Pu ={Words of the periodical subtrees
associated to the trees in Bζ( )}ψ( )
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Aw ={Words of the derivation trees in A}ψ( ) =(a1, a2, . . . , aα).
Bv ={Words of the derivation trees in B}ψ( ) =(b1, b2, . . . , bβ).
Pu ={Words of the periodical subtrees
associated to the trees in Bζ( )}ψ( ) =(c11, c12, . . . , cβµβ).
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Let M be the set
a1 ∪ a2 ∪ . . . aα ∪
{ b1 +
µ1∑
j=1
xj · c1j| xj ≥ 0, 1 ≤ j ≤ µ1 } ∪
{ b2 +
µ2∑
j=1
xj · c2j| xj ≥ 0, 1 ≤ j ≤ µ2 } ∪
...
{ bβ +
µβ∑
j=1
xj · cβj| xj ≥ 0, 1 ≤ j ≤ µβ }.
The set M is semilinear and M = ψ(L), L some LR-kulEPT0L language.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Recogniser for LR-2ulEPT0L languages
Based on the Earley Recogniser for context-free languages
Input:
An LR-2ulEPT0L system G = (Σ,M, ω,∆, 2) with L(G) = L.
An input string w = x1x2 . . . xn.
Output:
The parse sets I0, I1, . . . , In, if w ∈ L.
Method:
During the recognition process for some w = x1x2 . . . xn the algorithm constructssuccessively the item sets I0, I1, . . . , In.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Items, item sets and the dot • as metasymbol
• Every item set Ij, 0 ≤ j ≤ n consists of items.
• Structure of an item:
[
A1 → α, i
A2 → β, (i′)
]
, 0 ≤ i < i′ ≤ n− 1.
• Structure of a composite-predict item:
[
A1 → α, i
A2 → β, (i′)
]
, 0 ≤ i < i′ ≤ n− 1.
• On each right hand side of an item the • occurs:
[
A→ α • α′, i
B → β
]
∈ Ij.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Operations
• Scan[
A→ γ • aγ′
B → β
]
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Operations
• Scan[
A→ γ • aγ′
B → β
]
⇒
[
A→ γa • γ′
B → β
]
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Predict[
A→ •X1X2
B → β
]
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Predict[
A→ •X1X2
B → β
]
⇒
[
X1 → •γ1
X2 → γ2
]
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Composite Predict[
A1 → •XA2 → a
]
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Composite Predict[
A1 → •XA2 → a
]
⇒
s′[
B1 →B2 →
]
A1A2Y
ss
[
A1 →A2 →
]
•Xa
��������
6����
6����
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Composite Predict[
A1 → •XA2 → a
]
⇒
s′[
B1 →B2 →
]
A1A2Y
ss
[
A1 →A2 →
]
•Xa
��������
6����
6����
[
X → •αY → β
]
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Complete[
A1 → α1•A2 → α2
]
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Complete[
A1 → α1•A2 → α2
]
⇒
[
B1 →B2 →
]
A1 • A2
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Backward Search[
X1 → α
X2 → β
]
[
A→B →
]
X1 •X2
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
• Backward Search[
X1 → α•X2 → β
]
[
A→B →
]
X1 •X2����
JJ
JJ
J]����
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Polynomial time complexity
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Polynomial time complexity
O(n6)
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Conclusions
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Conclusions
• We have:
– L(LR-2ulEPT0L) is mildly context-sensitive.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Conclusions
• We have:
– L(LR-2ulEPT0L) is mildly context-sensitive.
• To do:
– Extending the recogniser for LR-kulEPT0L systems, k ∈ IN.– Developing a recogniser for kulEPT0L languages, k ∈ IN.
Suna Bensch
Parallel Systems as Mildly Context-Sensitive Grammar Formalisms
Thanks a lot for your attention!
Suna Bensch