{ "cells": [ { "cell_type": "markdown", "id": "d0d2e007", "metadata": {}, "source": [ "# Find Label Errors in Token Classification (Text) Datasets\n", "\n", "This 5-minute quickstart tutorial shows how you can use cleanlab to find potential label errors in text datasets for token classification. In token-classification, our data consists of a bunch of sentences (aka documents) in which every token (aka word) is labeled with one of K classes, and we train models to predict the class of each token in a new sentence. Example applications in NLP include part-of-speech-tagging or entity recognition, which is the focus on this tutorial. Here we use the [CoNLL-2003 named entity recognition](https://deepai.org/dataset/conll-2003-english) dataset which contains around 20,000 sentences with 300,000 individual tokens. Each token is labeled with one of the following classes:\n", "\n", "- LOC (location entity)\n", "- PER (person entity)\n", "- ORG (organization entity)\n", "- MISC (miscellaneous other type of entity)\n", "- O (other type of word that does not correspond to an entity)\n", "\n", "**Overview of what we'll do in this tutorial:** \n", "\n", "- Find tokens with label issues using `cleanlab.token_classification.filter.find_label_issues`. \n", "- Rank sentences based on their overall label quality using `cleanlab.token_classification.rank.get_label_quality_scores`." ] }, { "cell_type": "markdown", "id": "07936a54", "metadata": {}, "source": [ "