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: Create a `TweetTokenizer` instance with settings for use in the `tokenize` method.
  
  :param preserve_case: Flag indicating whether to preserve the casing (capitalisation)
      of text used in the `tokenize` method. Defaults to True.
  :type preserve_case: bool
  :param reduce_len: Flag indicating whether to replace repeated character sequences
      of length 3 or greater with sequences of length 3. Defaults to False.
  :type reduce_len: bool
  :param strip_handles: Flag indicating whether to remove Twitter handles of text used
      in the `tokenize` method. Defaults to False.
  :type strip_handles: bool
  :param match_phone_numbers: Flag indicating whether the `tokenize` method should look
      for phone numbers. Defaults to True.
  :type match_phone_numbers: bool
docstr_tok: ["Create","a","`","TweetTokenizer","`","instance","with","settings","for","use","in","the","`","tokenize","`","method",".",":","param","preserve_case",":","Flag","indicating","whether","to","preserve","the","casing","(","capitalisation",")","of","text","used","in","the","`","tokenize","`","method",".","Defaults","to","True",".",":","type","preserve_case",":","bool",":","param","reduce_len",":","Flag","indicating","whether","to","replace","repeated","character","sequences","of","length","3","or","greater","with","sequences","of","length","3",".","Defaults","to","False",".",":","type","reduce_len",":","bool",":","param","strip_handles",":","Flag","indicating","whether","to","remove","Twitter","handles","of","text","used","in","the","`","tokenize","`","method",".","Defaults","to","False",".",":","type","strip_handles",":","bool",":","param","match_phone_numbers",":","Flag","indicating","whether","the","`","tokenize","`","method","should","look","for","phone","numbers",".","Defaults","to","True",".",":","type","match_phone_numbers",":","bool"]
code: def __init__(
      self,
      preserve_case=True,
      reduce_len=False,
      strip_handles=False,
      match_phone_numbers=True,
  ):
      """
      Create a `TweetTokenizer` instance with settings for use in the `tokenize` method.
  
      :param preserve_case: Flag indicating whether to preserve the casing (capitalisation)
          of text used in the `tokenize` method. Defaults to True.
      :type preserve_case: bool
      :param reduce_len: Flag indicating whether to replace repeated character sequences
          of length 3 or greater with sequences of length 3. Defaults to False.
      :type reduce_len: bool
      :param strip_handles: Flag indicating whether to remove Twitter handles of text used
          in the `tokenize` method. Defaults to False.
      :type strip_handles: bool
      :param match_phone_numbers: Flag indicating whether the `tokenize` method should look
          for phone numbers. Defaults to True.
      :type match_phone_numbers: bool
      """
      self.preserve_case = preserve_case
      self.reduce_len = reduce_len
      self.strip_handles = strip_handles
      self.match_phone_numbers = match_phone_numbers
  
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 1 to create a new TweetTokenizer object from inherited base classes: TokenizerI with example: obj = TweetTokenizer(preserve_case, reduce_len, strip_handles, match_phone_numbers)