1,079
edits
(→The Parse tree: Some rephrasing) |
(→The Parse tree: more tweaks and corrections) |
||
Line 160: | Line 160: | ||
* <i>ω<sub>j</sub> ∈ W</i>, with <i>W</i> being the set of all words; | * <i>ω<sub>j</sub> ∈ W</i>, with <i>W</i> being the set of all words; | ||
* <i>γ<sub>j</sub> ∈ Γ</i>, with <i>Γ</i> being the set of all word groups; | * <i>γ<sub>j</sub> ∈ Γ</i>, with <i>Γ</i> being the set of all word groups; | ||
* <i>μ<sub>j</sub> ∈ 2<sup> | * <i>μ<sub>j</sub> ∈ 2<sup>C</sup> </i>, with <i>C</i> being the set of all class masks <nowiki>{0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x100}</nowiki>, and <i>2<sup>C</sup></i> being the set of all subsets of <i>C</i>; | ||
* <i>ω<sub>j</sub> = (γ<sub>j</sub>, μ<sub>j</sub>)</i>, with γ<sub>j</sub> being the word group <i>ω<sub>j</sub></i> belongs to, and <i>μ<sub>j</sub></i> being its class mask | * <i>ω<sub>j</sub> = (γ<sub>j</sub>, μ<sub>j</sub>)</i>, with <i>γ<sub>j</sub></i> being the word group <i>ω<sub>j</sub></i> belongs to, and <i>μ<sub>j</sub></i> being its class mask. | ||
<!-- Math formulas | <!-- Math formulas | ||
* <math>\omega_j \in W</math> | * <math>\omega_j \in W</math> | ||
Line 167: | Line 167: | ||
*<math>\mu_j \in 2^C</math> | *<math>\mu_j \in 2^C</math> | ||
*<math>\omega_j = (\gamma_j, \mu_j</math> --> | *<math>\omega_j = (\gamma_j, \mu_j</math> --> | ||
Note that elements of <i>2<sup>C</sup></i> (i.e. sets of class masks) can be identified with the ORed value of these class masks. So the set <nowiki>{0x2,0x4,0x80}</nowiki> can be identified with the value 0x86. | |||
For the following sections, we define | For the following sections, we define | ||
* group: <i>W → Γ : (γ,μ) ↦ γ</i> | * group: <i>W → Γ : (γ,μ) ↦ γ</i> | ||
* classes: <i>W → C : (γ,μ) ↦ μ</i> | * classes: <i>W → 2<sup>C</sup> : (γ,μ) ↦ μ</i> | ||
* <i>C<sub>x</sub> = {ω ∈ W | x ∈ classes(ω)}</i> | * <i>C<sub>x</sub> = {ω ∈ W | x ∈ classes(ω)}</i> | ||
Line 329: | Line 330: | ||
====Example: Parser example==== | ====Example: Parser example==== | ||
Parse is called with <i>"open door"</i>. | Parse is called with <i>"open door"</i>. | ||
* <i>"open" ∈ ⟨842,{C<sub> | * <i>"open" ∈ ⟨842,{C<sub>80</sub>}⟩</i> (an imperative word of the word group 0x842) | ||
* <i>"door" ∈ ⟨917,{C<sub> | * <i>"door" ∈ ⟨917,{C<sub>10</sub>}⟩ (a substantive of the word group 0x917)</i> | ||
* <i>I = ⟨842,{C<sub> | * <i>I = ⟨842,{C<sub>80</sub>}⟩,⟨917,{C<sub>10</sub>}⟩</i> | ||
<i>I</i> is clearly accepted by automatons based on the grammar described above, There are two possible derivations: | <i>I</i> is clearly accepted by automatons based on the grammar described above, There are two possible derivations: |
edits