What is tokenization?

Tokenization is the process of separating text within documents into its smallest building blocks. The first step in tokenization is usually to separate words based on white space, which involves isolating individual words and possibly punctuation marks. However, another form of tokenization that is used in certain applications is character-based tokenization, which splits words into their individual characters. Words can be further separated if they contain contractions or numbers, which can be considered separate tokens. If words are proper nouns that refer to specific entities, they can be tokenized as such (e.g. apple the fruit has a different meaning than Apple the company). Tokenization is usually considered the first preprocessing step in Natural Language Processing.