# Adding token to t5-base vocab does not respect space

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadding-token-to-t5-base-vocab-does-not-respect-space%2F13662%3E%5C
**Category:** 🤗Tokenizers\
**Created:** [January 13, 2022, 6:48pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadding-token-to-t5-base-vocab-does-not-respect-space%2F13662 "2022-01-13T18:48:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahular](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/rahular/32/1031_2.png) [@rahular](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Frahular)%5C
**Post date:** [January 13, 2022, 6:48pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadding-token-to-t5-base-vocab-does-not-respect-space%2F13662%2F1 "2022-01-13T18:48:27Z")

</div>

I am adding `{` and `}` to the `t5-base` tokenizer with

```auto
tokenizer.add_tokens(['{', '}'])

```

This successfully adds the tokens, but with a slight problem. When I try to tokenize the following sentence, the space before the `{` and `}` is gone

```auto
>>> tokenizer.tokenize('hello { this is a sentence } bye')
['▁hello', '{', '▁this', '▁is', '▁', 'a', '▁sentence', '}', '▁by', 'e']

```

This will result in an imperfect reconstruction of the sentence when decoding

```auto
>>> tokenizer.batch_decode(tokenizer(["hello { this is a sentence } bye"])['input_ids'], skip_special_tokens=True, clean_up_tokenization_spaces=False)
['hello{ this is a sentence} bye']

```

I also tried adding the tokens with different configs using `AddedToken` without success. Any ideas on how I can make `{` and `}` their own words?
