Limits of a bigram taggerLes limites d'un étiqueteur bigramme
TRA2600 S5 · in classS5 · en classe
Unknown words
The bigram tagger has three weaknesses, and the first shows as soon as it tags a text other than its corpus. A word that never occurred in the training corpus training corpusbase d'apprentissage datadonnées A collection of text or other language data used to estimate or update a model's parameters during training or pretraining.Collection de textes ou d'autres données langagières servant à estimer ou à mettre à jour les paramètres d'un modèle pendant l'entraînement ou le préentraînement. has no counts, so P(word | tag) is zero for every tag and the first half of the product says nothing. Every real text contains such words, since new nouns, names and verbs appear all the time, and languages with rich morphology have far more word forms, and so far more unknown words (Jurafsky & Martin, 2026). Three strategies help (Figure 15figure 15):
- rely on the second half of the product alone, the tag that usually follows the previous tag;
- assume the unknown word belongs to an open class, since the closed classes, determiners, pronouns and prepositions, are all already in the corpus;
- look at the shape of the word: a capital letter suggests a proper noun, a word ending in -ly is usually an adverb, one ending in -ed a verb.
The third strategy adds information of a new kind: not a count of the word, which does not exist, but a measurable property of its form.
Errors that spread
The second weakness is built into the method as the worked example applies it, from left to right. Each tag is chosen partly from the tag before it, so a wrong tag changes the odds for the next word, and one error can produce a run of them. Suppose a tagger takes time in time flies like an arrow for a verb, as in time the runners. A noun is then a likely tag for flies, and after a noun a verb is a likely tag for like: one wrong tag has become three (Figure 16figure 16). A tagger that chooses the tags for the whole sentence at once can still revise time in the light of the words after it; one that works strictly from left to right cannot.
A context of one word
The third weakness is the size of the window: one word back is very little context, and the information that settles a tag is often further away (Jurafsky & Martin, 2026). A tagset tagsetjeu d'étiquettes NLPTAL The set of labels available to a part-of-speech tagger or to an annotation task, from which exactly one is given to each word.Ensemble des étiquettes dont dispose un étiqueteur morphosyntaxique ou une tâche d'annotation, et dont exactement une est attribuée à chaque mot. such as the Penn Treebank’s records number in the tag, and the tag of sheep in the sheep that the farmer bought last week are hungry is plural (NNS) because of are, seven words later; no bigram can reach it (Figure 17figure 17).
Les mots inconnus
L’étiqueteur bigramme a trois faiblesses, et la première apparaît dès qu’il étiquette un autre texte que son corpus. Un mot absent de la base d’apprentissage training corpusbase d'apprentissage datadonnées A collection of text or other language data used to estimate or update a model's parameters during training or pretraining.Collection de textes ou d'autres données langagières servant à estimer ou à mettre à jour les paramètres d'un modèle pendant l'entraînement ou le préentraînement. n’a aucun compte, donc P(mot | étiquette) vaut zéro pour toutes les étiquettes, et la première moitié du produit ne dit rien. Tout texte réel contient de tels mots, puisque de nouveaux noms, noms propres et verbes apparaissent sans cesse, et les langues à morphologie riche ont beaucoup plus de formes de mots, donc beaucoup plus de mots inconnus (Jurafsky & Martin, 2026). Trois stratégies aident (Figure 15figure 15) :
- se fier à la seconde moitié du produit seule, l’étiquette qui suit d’habitude l’étiquette précédente ;
- supposer que le mot inconnu appartient à une classe ouverte, puisque les classes fermées, déterminants, pronoms et prépositions, sont toutes déjà dans le corpus ;
- regarder la forme du mot : une majuscule suggère un nom propre, un mot en -ment est d’habitude un adverbe, un mot en -ait un verbe.
La troisième stratégie apporte une information d’un nouveau genre : non pas un compte du mot, qui n’existe pas, mais une propriété mesurable de sa forme.
Les erreurs qui se propagent
La deuxième faiblesse tient à la méthode telle que l’exemple détaillé l’applique, de gauche à droite. Chaque étiquette est choisie en partie d’après l’étiquette précédente, donc une étiquette fausse change les chances du mot suivant, et une erreur peut en entraîner une série. Supposons qu’un étiqueteur prenne le dans elle le livre demain pour un déterminant, comme dans le livre est long. Après un déterminant, un nom est l’étiquette la plus probable pour livre : une étiquette fausse en a entraîné une deuxième (Figure 16figure 16). Un étiqueteur qui choisit les étiquettes de toute la phrase à la fois peut encore réviser le à la lumière des mots qui suivent ; un étiqueteur qui travaille strictement de gauche à droite ne le peut pas.
Un contexte d’un seul mot
La troisième faiblesse est la taille de la fenêtre : un mot en arrière, c’est très peu de contexte, et l’information qui fixe une étiquette se trouve souvent plus loin (Jurafsky & Martin, 2026). Avec un jeu d’étiquettes tagsetjeu d'étiquettes NLPTAL The set of labels available to a part-of-speech tagger or to an annotation task, from which exactly one is given to each word.Ensemble des étiquettes dont dispose un étiqueteur morphosyntaxique ou une tâche d'annotation, et dont exactement une est attribuée à chaque mot. qui consigne le genre et le nombre dans l’étiquette, comme MULTITAG, l’étiquette de cueillies dans les fleurs que Marie a cueillies est féminin pluriel à cause de fleurs, quatre mots plus tôt ; aucun bigramme ne peut l’atteindre (Figure 17figure 17).
Sources
- Jurafsky, D., & Martin, J. H. (2026). Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition with Language Models. Online draft, 3rd edition. https://web.stanford.edu/~jurafsky/slp3/
- Manning, C. D. (2011). Part-of-speech tagging from 97% to 100%: Is it time for some linguistics?. In A. Gelbukh (Ed.), Computational Linguistics and Intelligent Text Processing, CICLing 2011 (Lecture Notes in Computer Science, Vol. 6608, pp. 171–189). Springer. https://doi.org/10.1007/978-3-642-19400-9_14
Sources
- Jurafsky, D., & Martin, J. H. (2026). Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition with Language Models. Online draft, 3rd edition. https://web.stanford.edu/~jurafsky/slp3/
- Manning, C. D. (2011). Part-of-speech tagging from 97% to 100%: Is it time for some linguistics?. In A. Gelbukh (Ed.), Computational Linguistics and Intelligent Text Processing, CICLing 2011 (Lecture Notes in Computer Science, Vol. 6608, pp. 171–189). Springer. https://doi.org/10.1007/978-3-642-19400-9_14