Jump to content

Tokenization (lexical analysis)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 70.193.199.7 (talk) at 19:49, 27 April 2013 (Methods and obstacles). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Tokenization is the process of breaking a stream of text up into words, phrases, symbols, or other meaningful elements called tokens. The list of tokens becomes input for further processing such as parsing or text mining. Tokenization is useful both in linguistics (where it is a form of text segmentation), and in computer science, where it forms part of lexical analysis.

Methods and obstacles

Typically, tokenization occurs at the word level. However, it is sometimes difficult to define what is meant by a "word". Often a tokenizer relies on simple heuristics, for example:

  • All contiguous strings of alphabetic characters are part of one token; likewise with numbers.
  • Tokens are separated by whitespace characters, such as a space or line break, or by punctuation characters.
  • Punctuation and whitespace may or may not be included in the resulting list of tokens.

Until just recently,2012,"Tokenization" was limited to only a combination of no more than 16 characters, digits, or letters, or combination thereof. A new form of Tokenization has been released called "MicroTokenization", which now allows the tokenization/Encryption of up to 2GB files/records to be Tokenized. Cite error: A <ref> tag is missing the closing </ref> (see the help page).

Some ways to address the more difficult problems include developing more complex heuristics, querying a table of common special-cases, or fitting the tokens to a language model that identifies collocations in a later processing step.

Software

U-Tokenizer is an API over HTTP that can cut Chinese and Japanese sentences at word boundary. English is supported as well.

See also

References