<jupyter_start><jupyter_text>The CoNLL-2003 datasetTo load the CoNLL-2003 dataset, we use the `load_dataset()` method from the 🤗 Datasets library:<jupyter_code>from datasets import load_dataset
import datasets
raw_datasets = load_dataset("conll2003")
datasets.__version__<jupyter_output>Reusing dataset conll2003 (/home/matthias/.cache/huggingface/datasets/conll2003/conll2003/1.0.0/63f4ebd1bcb7148b1644497336fd74643d4ce70123334431a3c053b7ee4e96ee)<jupyter_text>Check the relevant (*version* of `datasets`) documentation:- [`DatasetDict`](https://huggingface.co/docs/datasets/v2.0.0/en/package_reference/main_classesdatasetdict[[datasets.datasetdict]])- [`DatasetDict`](https://huggingface.co/docs/datasets/v2.0.0/en/package_reference/main_classesdatasets.datasetdict)- [`Dataset`](https://huggingface.co/docs/datasets/v2.0.0/en/package_reference/main_classesdatasets.Dataset)> **This [video](https://www.youtube.com/watch?v=iY2AZYdZAr0) is very relevant!**> **Employ** `id2label` as shown in 7.2-Token_classification.ipynb!<jupyter_code>def instance_details(datasets, shard, instance):
    shards = list(datasets.keys())
    print("dataset shards: {}\n".format(shards))
    for shard_i in shards:
        print("{} features:  \t{}".format(shard_i, list(datasets[shard_i].features.keys())))
        print("{} num_rows:  \t{}\n".format(shard_i, datasets[shard_i].num_rows))
    inst = datasets[shard][instance]
    feats = list(datasets[shard_i].features.keys())
    for feat in feats:
        print("{}  \t{}".format(feat, inst[feat]))
    pass

instance_details(raw_datasets, "validation", 0)<jupyter_output>dataset shards: ['train', 'validation', 'test']

train features:  	['id', 'tokens', 'pos_tags', 'chunk_tags', 'ner_tags']
train num_rows:  	14042

validation features:  	['id', 'tokens', 'pos_tags', 'chunk_tags', 'ner_tags']
validation num_rows:  	3251

test features:  	['id', 'tokens', 'pos_tags', 'chunk_tags', 'ner_tags']
test num_rows:  	3454

id  	0
tokens  	['CRICKET', '-', 'LEICESTERSHIRE', 'TAKE', 'OVER', 'AT', 'TOP', 'AFTER', 'INNINGS', 'VICTORY', '.']
pos_tags  	[22, 8, 22, 22, 15, 22, 22, 22, 22, 21, 7]
chunk_tags  	[11, 0, 11, 12, 13, 11, 12, 12, 12, 12, 0]
ner_tags  	[0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0]
{'fraction_non_alphanumeric': 0.1701077199281867, 'fraction_numerical': 0.06732495511669659, 'mean_word_length': 5.713855421686747, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '286227', 'license': 'MIT', 'n_tokens_mistral': 957, 'n_tokens_neox': 855, 'n_words': 165, 'path': 'data/7.2-Explore-NER-Dataset-Dev.ipynb', 'repo_name': 'MRD-Git/Huggingface-course', 'size': '2228'}