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 phrase travellers zorbled a room, with zorbled marked as having no counts for any tag. Three clues point to VERB: what usually follows NOUN; an open class, not DET or PRON; ends in -ed, often a verb.
Figure 15. Three clues to the tag of a word the corpus never contained. Zorbled is an invented word.

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.

The sentence Time flies like an arrow with two rows of tags. Left-to-right tagger: VERB, NOUN, VERB, DET, NOUN, with the first three marked wrong and arrows leading from each wrong tag to the next. Right tags: NOUN, VERB, ADP, DET, NOUN.
Figure 16. An illustrative left-to-right tagger that starts with one wrong tag.

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).

The sentence the sheep that the farmer bought last week are hungry. A bracket over the word before sheep reads: what a bigram tagger uses, one word back. An arc from sheep to are, seven words later, reads: what makes sheep plural (NNS).
Figure 17. The context a bigram tagger uses, and the word that decides the tag.
Written in English. The French version was automatically generated and I have not revised it. Rédigé en anglais. La version française a été générée automatiquement et je ne l'ai pas révisée. Updated 6 October 2026

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.
Le segment Marie zorblait la chambre, où zorblait est marqué comme n'ayant aucun compte pour aucune étiquette. Trois indices pointent vers VERB : ce qui suit d'habitude PROPN ; une classe ouverte, pas DET ni PRON ; finit en -ait, souvent un verbe.
Figure 15. Trois indices pour l'étiquette d'un mot que le corpus ne contenait pas. Zorblait est un mot inventé.

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.

La phrase Elle le livre demain avec deux rangées d'étiquettes. Étiqueteur de gauche à droite : PRON, DET, NOUN, ADV, avec DET et NOUN marqués faux et une flèche de l'un à l'autre. Bonnes étiquettes : PRON, PRON, VERB, ADV.
Figure 16. Un étiqueteur illustratif, de gauche à droite, qui commence par une étiquette fausse.

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).

La phrase les fleurs que Marie a cueillies. Un crochet au-dessus du mot qui précède cueillies indique : ce qu'utilise un étiqueteur bigramme, un mot en arrière. Un arc de cueillies vers fleurs, quatre mots plus tôt, indique : ce qui rend cueillies féminin pluriel.
Figure 17. Le contexte qu'utilise un étiqueteur bigramme, et le mot qui décide de l'étiquette.
Written in English. The French version was automatically generated and I have not revised it. Rédigé en anglais. La version française a été générée automatiquement et je ne l'ai pas révisée. Mise à jour 6 octobre 2026

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

Spotted an error? Une erreur ?

Language, content, a broken link: e-mail me what you saw and I will fix it. Langue, contenu, lien brisé : écrivez-moi ce que vous avez vu et je corrige.

ayla.rigouts.terryn@umontreal.ca

Please mention the page: Mentionnez la page :