• Aucun résultat trouvé

[PDF] Algorithmes d’analyse syntaxique en PDF | Cours informatique

N/A
N/A
Protected

Academic year: 2021

Partager "[PDF] Algorithmes d’analyse syntaxique en PDF | Cours informatique"

Copied!
65
0
0

Texte intégral

(1)

Algorithme Cock -Younger-Kasami Algorithme de Earley

Modèles de Langage et Analyse Syntaxique

Cours 3 - Algorithmes d’analyse syntaxique - grammaires hors-contexte

Antoine Rozenknop

(2)

Algorithme Cock -Younger-Kasami Algorithme de Earley

Plan

Algorithme Cock -Younger-Kasami

Principes de l’algorithme CYK Complexité pire cas

Algorithme de Earley

Fondements Interprétation

Un exemple très simple

(3)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK Complexité pire cas

Analyse syntaxique

Intérêt des CFG : existence d’algorithmes efficaces de production de dérivations/arbres d’analyse.

efficace— complexité pire cas O(n3

) Les deux algorithmes les plus usuels :

◮ algorithme CYK (Cocke-Younger-Kasami) (milieu des années

(4)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Plan

Algorithme Cock -Younger-Kasami

Principes de l’algorithme CYK

Complexité pire cas

Algorithme de Earley

Fondements Interprétation

Un exemple très simple

(5)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Algorithme CYK

L’algorithme CYK est un algorithmetabulaireascendantprésentant deux avantages :

◮ sa complexité pire cas est optimale (O(n3)) ; ◮ très simple à comprendre et implémenter

Il présente cependant deux inconvénients :

◮ Nécessite la mise de la CFG sous forme normale de Chomsky

(6)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Algorithme CYK : principes

CYK est un analyseur tabulaire («chart-parser») : calcul efficace (en espace et en temps) detoutes les interprétations possibles de

toutes les sous-séquencesde la séquence à analyser). L’efficacité du calcul est fondée sur la propriété suivante :

Si la grammaire est sous forme normale, le calcul des interprétations d’une séquence W de longueur l nécecessite seulement l’exploration de toutes les décompositions de W en deux sous-séquences exactement.

Le nombre de paires de sous-séquences à explorer est donc l − 1.

Idée : mettre les analyses des sous-séquences dans une table. A. Rozenknop Modèles de Langage et Analyse Syntaxique

(7)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Algorithme CYK : principes (2)

L’analyse syntaxique d’une séquence de n mots W = w1. . . wn est

représentée dans une table triangulaire de cellules Ci,l

(1 ≤ i ≤ n, 1 ≤ l ≤ n − i + 1).

La cellule Ci,l contienttous les non-terminaux pouvant dériver la

sous-séquence wi...wi +l −1 (la séquence de l mots commençant au

ie

mot de W ).

(8)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

On reconsidère la grammaire mise sous CNF :

Règles de la grammaire originale Grammaire sous forme normale

R1 : S → SN SV R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R2 : SN → Det N R3 : SN → Det N SNP R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R4 : SNP → Prep SN R5 : SV → V R6 : SV → V SN R6 : SV → V SN R7 : SV → V SN SNP R7.1 : SV → X2 SNP R7.2 : X2 → V SN

(9)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 2

(10)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2: SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 2 SN

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(11)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2: X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 2 SN,X1

(12)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2: SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 2 SN,X1 SN

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(13)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2: X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 2 SN,X1 SN,X1

(14)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2: SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 2 SN,X1 SN,X1 SN

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(15)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2: X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 2 SN,X1 SN,X1 SN,X1

(16)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2: S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 S 2 SN,X1 SN,X1 SN,X1

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(17)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6: SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 S SV 2 SN,X1 SN,X1 SN,X1

(18)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2: X2 → V SN 8 7 6 5 4 3 S SV,X2 2 SN,X1 SN,X1 SN,X1

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(19)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4: SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 4 3 S SV,X2 SNP 2 SN,X1 SN,X1 SN,X1

(20)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1: S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 S 4 3 S SV,X2 SNP 2 SN,X1 SN,X1 SN,X1

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(21)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1: SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 5 S SN 4 3 S SV,X2 SNP 2 SN,X1 SN,X1 SN,X1

(22)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6: SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 7 6 SV 5 S SN 4 3 S SV,X2 SNP 2 SN,X1 SN,X1 SN,X1

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(23)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1: SV → X2SNP R7.2 : X2 → V SN 8 7 6 SV 5 S SN 4 3 S SV,X2 SNP 2 SN,X1 SN,X1 SN,X1

(24)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1 : S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2: X2 → V SN 8 7 6 SV,X2 5 S SN 4 3 S SV,X2 SNP 2 SN,X1 SN,X1 SN,X1

1 Det N V Det N Prep Det N

l/i 1 2 3 4 5 6 7 8

le chat mange la souris dans le jardin

(25)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

R1.1: S → SN SV R1.2 : S → SN V R2 : SN → Det N R3.1 : SN → X1 SNP R3.2 : X1 → Det N R4 : SNP → Prep SN R6 : SV → V SN R7.1 : SV → X2SNP R7.2 : X2 → V SN 8 S 7 6 SV,X2 5 S SN 4 3 S SV,X2 SNP 2 SN,X1 SN,X1 SN,X1

(26)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Algorithme formel

pour tout2≤ i ≤ n (ligne) faire

pour tout1≤ j ≤ n − i + 1 (colonne) faire pour tout1≤ k ≤ i − 1 (décomposition) faire

pour tout X ∈ C[i − k][j] faire pour tout Y ∈ C[k][j + i − k] faire

pour tout Z → X Y ∈ R faire Ajouter Z à C[i][j] k k Z X Y

(27)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Plan

Algorithme Cock -Younger-Kasami

Principes de l’algorithme CYK

Complexité pire cas

Algorithme de Earley

Fondements Interprétation

(28)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Complexité (1)

◮ Le calcul des interprétations d’une cellule C

i,j nécessite (i − 1)

explorations de paires de cellules (1 ≤ k ≤ i − 1), le nombre total d’explorations est donc :

n X i =2 n−i+1 X j =1 (i − 1) = n X i =1 (n − i + 1).(i − 1) ∼O(n3).

(29)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Complexité (1)

◮ Le calcul des interprétations d’une cellule C

i,j nécessite (i − 1)

explorations de paires de cellules (1 ≤ k ≤ i − 1), le nombre total d’explorations est donc :

n X i =2 n−i+1 X j =1 (i − 1) = n X i =1 (n − i + 1).(i − 1) ∼O(n3).

◮ Une cellule contient au plus |N T | interprétations (nombre de

(30)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Complexité (1)

◮ Le calcul des interprétations d’une cellule C

i,j nécessite (i − 1)

explorations de paires de cellules (1 ≤ k ≤ i − 1), le nombre total d’explorations est donc :

n X i =2 n−i+1 X j =1 (i − 1) = n X i =1 (n − i + 1).(i − 1) ∼O(n3).

◮ Une cellule contient au plus |N T | interprétations (nombre de

non-terminaux de la grammaire)

◮ le coût de l’exploration croisée d’une paire de cellules est d’au

plus |N T |2

accès à la grammaire.

(31)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Principes de l’algorithme CYK

Complexité pire cas

Complexité (2)

D’où la complexité :

O(n3

|N T |2

).

Inconvénient de la forme normale, qui augmente la taille de N T . Remarque : une fois la table remplie, on peut extraire un arbre d’analyse en O(n).

(32)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme de Earley

Algorithmetop-down (prédictif).

3 avantages :

◮ meilleure complexité pire cas connue (de même que CYK) ; ◮ s’adapte à des langages moins complexes (par ex. les langages

réguliers) ;

◮ ne requière pas une forme particulière de grammaire (pas de

CNF).

deux inconvénients : ◮ pas très intuitif ;

◮ pas moyen de corriger / reconstruire des phrases incorrectes

syntaxiquement, ni d’en donner des analyses partielles. A. Rozenknop Modèles de Langage et Analyse Syntaxique

(33)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Plan

Algorithme Cock -Younger-Kasami

Principes de l’algorithme CYK Complexité pire cas

Algorithme de Earley

Fondements

(34)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme de Earley (2)

Idée : binarisation dynamique (en cours d’analyse) de la grammaire

Règle pointée :Objet de la forme

X → X1. . . Xk• Xk+1. . . Xm

où X → X1...Xm est une règle de la grammaire.

Earley item :une règle pointée et un entier i (avec 0 ≤ i ≤ n, n : taille de la phrase).

☞représente la portion d’une règle compatible avec le segment de phrase commençant à la position i + 1.

Exemple :(SV → V • SN, 2) et (SV → V • SN SNP, 2) sont des

items pour la chaîne initiale :

le chat mangea la souris.

1 2 3 4 5

(35)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme de Earley (3)

Principe de l’algorithme : Construction en parallèle de toutes les règles pointées compatibles avec des sous-chaînes de plus en plus grandes de la phrase à analyser.

☞construction d’ensembles d’itemsEj tels que :

(X → α • β, i) ∈ Ej ⇐⇒ ∃γ, δ :    S ⇒∗ γ X δ γ ⇒∗ w1. . . wi α⇒∗ wi +1. . . wj

(36)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme d’Earley (4)

✜ Initialisation :Construction de E0 1. Pour toute règle S → X1... Xn :

ajouter (S → • X1... Xn,0) à E0.

2. Pour tous les items (X → •Yβ,0) dans E0, et pour toute

règle Y → γ :

ajouter (Y → • γ, 0) à E0.

3. Répéter (2) jusqu’à stabilisation de E0.

(37)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme d’Earley (5)

✜ Itérations :Construction des Ej (1 ≤ j ≤ n) : 1. Pour tout (X → α • wjβ, i) ∈ Ej −1 :

(38)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme d’Earley (5)

✜ Itérations :Construction des Ej (1 ≤ j ≤ n) : 1. Pour tout (X → α • wjβ, i) ∈ Ej −1 :

ajouter (X → α wj • β, i) à Ej.

2. Pour tout (X → γ •,i) de Ej

et tout (Y → α •Xβ, k) de Ei :

ajouter (Y → α X • β, k) à Ej.

(39)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme d’Earley (5)

✜ Itérations :Construction des Ej (1 ≤ j ≤ n) : 1. Pour tout (X → α • wjβ, i) ∈ Ej −1 :

ajouter (X → α wj • β, i) à Ej.

2. Pour tout (X → γ •,i) de Ej

et tout (Y → α •Xβ, k) de Ei :

ajouter (Y → α X • β, k) à Ej.

3. Pour tous les (X → α •Yβ, i) ∈ Ej

(40)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Algorithme d’Earley (5)

✜ Itérations :Construction des Ej (1 ≤ j ≤ n) : 1. Pour tout (X → α • wjβ, i) ∈ Ej −1 :

ajouter (X → α wj • β, i) à Ej.

2. Pour tout (X → γ •,i) de Ej

et tout (Y → α •Xβ, k) de Ei :

ajouter (Y → α X • β, k) à Ej.

3. Pour tous les (X → α •Yβ, i) ∈ Ej

et toute règle Y → γ :

ajouter(Y → • γ, j) à Ej.

4. Répéter (2) et (3) jusqu’à stabilisation de Ej.

(41)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Plan

Algorithme Cock -Younger-Kasami

Principes de l’algorithme CYK Complexité pire cas

Algorithme de Earley

Fondements

(42)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Fondements

Interprétation

Un exemple très simple

Algorithme d’Earley (Interprétation)

✜ Itérations :Construction des interprétations de w1. . . wn (Ej) 1. Ancrage vers les mots :

Introduire le mot wj si on a une interprétation de w1. . . wj −1

qui peut « consommer » wj (c.-à-d. « un • avant le symbole

wj »)

2. Progression dans l’interprétation :

Si le non-terminal X a été produit depuis wi +1 et si on a une

interprétation terminant en wi qui peut « consommer » X ,

alors le faire !

3. Prédiction(des choses utiles) :

Si on cherche à consommer Y pour la suite de l’analyse, alors introduire toutes les règles susceptibles de produire (plus tard) Y.

(43)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple

Plan

Algorithme Cock -Younger-Kasami

Principes de l’algorithme CYK Complexité pire cas

Algorithme de Earley

Fondements Interprétation

(44)

Algorithme Cock -Younger-Kasami

Algorithme de Earley

Fondements Interprétation

Un exemple très simple

Algorithme d’Earley (Exemple complet)

analyse de la phrase « Je pense » avec la grammaire suivante :

S→ SN SV Pron → Je SN → Pron V → pense SN → Det N SV → V SV → V S SV → V SN

(45)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0)

(46)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →•SN SV, 0) (SN →• Pron, 0)

(47)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →•SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0)

(48)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →•Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0)

(49)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0)

(50)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →•Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0)

(51)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →•SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0)

(52)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1)

(53)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1)

(54)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1)

(55)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→•V S, 1) (SV→• V SN, 1) (V→• pense, 1)

(56)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1)

(57)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1)

(58)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→•V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1) (SV →V •, 1) (SV →V • S, 1)

(59)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1)

(60)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1) (SV →V •, 1) (SV →V • S, 1) (SV →V • SN, 1) (S→SN SV •, 0)

(61)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1)

(62)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1) (SV →V •, 1) (SV →V • S, 1) (SV →V • SN, 1) (S→SN SV •, 0) (S →• SN SV, 2) (SN →• Pron, 2)

(63)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1)

(64)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1) (SV →V •, 1) (SV →V • S, 1) (SV →V • SN, 1) (S→SN SV •, 0) (S →• SN SV, 2) (SN →• Pron, 2) (SN →• Det N, 2) (Pron →• Je , 2)

(65)

Algorithme Cock -Younger-Kasami Algorithme de Earley Fondements Interprétation Un exemple très simple E0 (S →• SN SV, 0) (SN →• Pron, 0) (SN→• Det N, 0) (Pron →• Je, 0) E1 (Pron →Je •, 0) (SN →Pron •, 0) (S→SN• SV, 0) (SV→• V, 1) (SV→• V S, 1) (SV→• V SN, 1) (V→• pense, 1) E2 (V →pense •, 1)

Références

Documents relatifs

livré plusieurs lots de céramique médiévale, nous proposons ici quelques remarques préliminaires ainsi qu’un essai de datation qui, en l’état actuel des connaissances sur

The objective of this last analysis was to characterise (+)-ODM pharmacokinetics and pharmacodynamics using pain tolerance threshold from an electrically stimulated pain model

On notera parmi les résultats probants, la disposition de la grande majorité des cabanes de marais dans la première moitié du XIXe siècle au sud du chenal principal de Brouage,

( 2012 ), where observations of incomplete rankings are modeled as cen- sored observations of permutations, leading to the follow- ing setup: first a permutation Σ is drawn from p,

En ce qui concerne la simulation num´erique, la mod´elisation semi-continue, d´evelopp´ee pour les sollicitations de type impact et pr´esent´ee dans les articles [8, 9], est

By choosing the reference point to be the estimated center of the Pareto front, potential solutions are sought in regions with equilibrated trade-offs.. Note that this approach is

- l’allocation gratuite des droits d’émission crée une rente qui est répartie entre les consommateurs de carburant ; de plus, ceux-ci sont fortement incités à réduire

Avec une étendue des salaires moyens importante entre les niveaux d’enseignement, la France se retrouve parmi les pays européens avec une inégalité de salaire au détriment