# Create a custom tokenizer from a dictionary

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreate-a-custom-tokenizer-from-a-dictionary%2F62129%3E%5C
**Category:** 🤗Transformers\
**Created:** [November 13, 2023, 10:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreate-a-custom-tokenizer-from-a-dictionary%2F62129 "2023-11-13T22:31:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rranjan1](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@rranjan1](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Frranjan1)%5C
**Post date:** [November 13, 2023, 10:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreate-a-custom-tokenizer-from-a-dictionary%2F62129%2F1 "2023-11-13T22:31:41Z")

</div>

Lets say I have a dictionary containing some IDs and tokens corresponding to those ids. Example: {‘ID1’: 1, ‘ID2’: 2, ‘ID3’: 3}. What is the best way to create a tokenizer from this python dictionary ?
