class_docstr: Tokenizer for tweets.
  
      >>> from nltk.tokenize import TweetTokenizer
      >>> tknzr = TweetTokenizer()
      >>> s0 = "This is a cooool #dummysmiley: :-) :-P <3 and some arrows < > -> <--"
      >>> tknzr.tokenize(s0) # doctest: +NORMALIZE_WHITESPACE
      ['This', 'is', 'a', 'cooool', '#dummysmiley', ':', ':-)', ':-P', '<3', 'and', 'some', 'arrows', '<', '>', '->',
       '<--']
  
  Examples using `strip_handles` and `reduce_len parameters`:
  
      >>> tknzr = TweetTokenizer(strip_handles=True, reduce_len=True)
      >>> s1 = '@remy: This is waaaaayyyy too much for you!!!!!!'
      >>> tknzr.tokenize(s1)
      [':', 'This', 'is', 'waaayyy', 'too', 'much', 'for', 'you', '!', '!', '!']
class_docstr_tok: ["Tokenizer","for","tweets",".",">",">",">","from","nltk.tokenize","import","TweetTokenizer",">",">",">","tknzr","=","TweetTokenizer","(",")",">",">",">","s0","=","``","This","is","a","cooool","#","dummysmiley",":",":","-",")",":","-P","<","3","and","some","arrows","<",">","-",">","<","--","''",">",">",">","tknzr.tokenize","(","s0",")","#","doctest",":","+NORMALIZE_WHITESPACE","[","'This","'",",","'is","'",",","'","a","'",",","'cooool","'",",","'","#","dummysmiley","'",",","'",":","'",",","'",":","-",")","'",",","'",":","-P","'",",","'","<","3","'",",","'and","'",",","'some","'",",","'arrows","'",",","'","<","'",",","'",">","'",",","'-",">","'",",","'","<","--","'","]","Examples","using","`","strip_handles","`","and","`","reduce_len","parameters","`",":",">",">",">","tknzr","=","TweetTokenizer","(","strip_handles=True",",","reduce_len=True",")",">",">",">","s1","=","'","@","remy",":","This","is","waaaaayyyy","too","much","for","you","!","!","!","!","!","!","'",">",">",">","tknzr.tokenize","(","s1",")","[","'",":","'",",","'This","'",",","'is","'",",","'waaayyy","'",",","'too","'",",","'much","'",",","'for","'",",","'you","'",",","'","!","'",",","'","!","'",",","'","!","'","]"]
docstr: Tokenize the input text.
  
  :param text: str
  :rtype: list(str)
  :return: a tokenized list of strings; joining this list returns        the original string if `preserve_case=False`.
docstr_tok: ["Tokenize","the","input","text",".",":","param","text",":","str",":","rtype",":","list","(","str",")",":","return",":","a","tokenized","list","of","strings",";","joining","this","list","returns","the","original","string","if","`","preserve_case=False","`","."]
code: def tokenize(self, text: str) -> List[str]:
      """Tokenize the input text.
  
          :param text: str
          :rtype: list(str)
          :return: a tokenized list of strings; joining this list returns\
          the original string if `preserve_case=False`.
          """
      # Fix HTML character entities:
      text = _replace_html_entities(text)
      # Remove username handles
      if self.strip_handles:
          text = remove_handles(text)
      # Normalize word lengthening
      if self.reduce_len:
          text = reduce_lengthening(text)
      # Shorten problematic sequences of characters
      safe_text = HANG_RE.sub(r"\1\1\1", text)
      # Recognise phone numbers during tokenization
      if self.match_phone_numbers:
          words = self.PHONE_WORD_RE.findall(safe_text)
      else:
          words = self.WORD_RE.findall(safe_text)
      # Possibly alter the case, but avoid changing emoticons like :D into :d:
      if not self.preserve_case:
          words = list(
              map(
                  (lambda x: x if EMOTICON_RE.search(x) else x.lower()),
                  words,
              )
          )
      return words
  
file_path: nltk/nltk/tokenize/casual.py
imports: import html
  from typing import List
  import regex
  from nltk.tokenize.api import TokenizerI
label_desc: Use image node_id 2 for calling the TweetTokenizer obj's underlying member method code with example usage: obj.tokenize(text) and returns: words