+
    ÖÇÜh=  ã            
       ó®  € R t ^ RIt^ RIHt ^ RIt^ RIHt RtRtRt	Rt
]]RR	R
RRR]	R3
t]^ ,          ]
.]R,          O5t]P                  ! R4      t]P                  ! ]]P                  ]P                   ,          ]P"                  ,          4      t]P                  ! R4      t]P                  ! R4      tRR ltRR lt ! R R]4      tR tR tRR ltR# )a�  
Twitter-aware tokenizer, designed to be flexible and easy to adapt to new
domains and tasks. The basic logic is this:

1. The tuple REGEXPS defines a list of regular expression
   strings.

2. The REGEXPS strings are put, in order, into a compiled
   regular expression object called WORD_RE, under the TweetTokenizer
   class.

3. The tokenization is done by WORD_RE.findall(s), where s is the
   user-supplied string, inside the tokenize() method of the class
   TweetTokenizer.

4. When instantiating Tokenizer objects, there are several options:
    * preserve_case. By default, it is set to True. If it is set to
      False, then the tokenizer will downcase everything except for
      emoticons.
    * reduce_len. By default, it is set to False. It specifies whether
      to replace repeated character sequences of length 3 or greater
      with sequences of length 3.
    * strip_handles. By default, it is set to False. It specifies
      whether to remove Twitter handles of text used in the
      `tokenize` method.
    * match_phone_numbers. By default, it is set to True. It indicates
      whether the `tokenize` method should look for phone numbers.
N)ÚList)Ú
TokenizerIac  
    (?:
      [<>]?
      [:;=8]                     # eyes
      [\-o\*\']?                 # optional nose
      [\)\]\(\[dDpP/\:\}\{@\|\\] # mouth
      |
      [\)\]\(\[dDpP/\:\}\{@\|\\] # mouth
      [\-o\*\']?                 # optional nose
      [:;=8]                     # eyes
      [<>]?
      |
      </?3                       # heart
    )u  			# Capture 1: entire matched URL
  (?:
  https?:				# URL protocol and colon
    (?:
      /{1,3}				# 1-3 slashes
      |					#   or
      [a-z0-9%]				# Single letter or digit or '%'
                                       # (Trying not to match e.g. "URI::Escape")
    )
    |					#   or
                                       # looks like domain name followed by a slash:
    [a-z0-9.\-]+[.]
    (?:[a-z]{2,13})
    /
  )
  (?:					# One or more:
    [^\s()<>{}\[\]]+			# Run of non-space, non-()<>{}[]
    |					#   or
    \([^\s()]*?\([^\s()]+\)[^\s()]*?\) # balanced parens, one level deep: (...(...)...)
    |
    \([^\s]+?\)				# balanced parens, non-recursive: (...)
  )+
  (?:					# End with:
    \([^\s()]*?\([^\s()]+\)[^\s()]*?\) # balanced parens, one level deep: (...(...)...)
    |
    \([^\s]+?\)				# balanced parens, non-recursive: (...)
    |					#   or
    [^\s`!()\[\]{};:'".,<>?Â«Â»â€œâ€�â€˜â€™]	# not a space or one of these punct chars
  )
  |					# OR, the following to match naked domains:
  (?:
  	(?<!@)			        # not preceded by a @, avoid matching foo@_gmail.com_
    [a-z0-9]+
    (?:[.\-][a-z0-9]+)*
    [.]
    (?:[a-z]{2,13})
    \b
    /?
    (?!@)			        # not succeeded by a @,
                            # avoid matching "foo.na" in "foo.na@example.com"
  )
uÏ  
  (?:
    [\U0001F1E6-\U0001F1FF]{2}  # all enclosed letter pairs
    |
    # English flag
    \U0001F3F4\U000E0067\U000E0062\U000E0065\U000E006e\U000E0067\U000E007F
    |
    # Scottish flag
    \U0001F3F4\U000E0067\U000E0062\U000E0073\U000E0063\U000E0074\U000E007F
    |
    # For Wales? Why Richard, it profit a man nothing to give his soul for the whole world â€¦ but for Wales!
    \U0001F3F4\U000E0067\U000E0062\U000E0077\U000E006C\U000E0073\U000E007F
  )
a	  
    (?:
      (?:            # (international)
        \+?[01]
        [ *\-.\)]*
      )?
      (?:            # (area code)
        [\(]?
        \d{3}
        [ *\-.\)]*
      )?
      \d{3}          # exchange
      [ *\-.\)]*
      \d{4}          # base
    )z	<[^>\s]+>z[\-]+>|<[\-]+z(?:@[\w_]+)z(?:\#+[\w_]+[\w\'_\-]*[\w_]+)z#[\w.+-]+@[\w-]+\.(?:[\w-]\.?)+[\w-]uR   .(?:
        [ðŸ�»-ðŸ�¿]?(?:â€�.[ðŸ�»-ðŸ�¿]?)+
        |
        [ðŸ�»-ðŸ�¿]
    )a…  
    (?:[^\W\d_](?:[^\W\d_]|['\-_])+[^\W\d_]) # Words with apostrophes or dashes.
    |
    (?:[+\-]?\d+[,/.:-]\d+[+\-]?)  # Numbers, including fractions, decimals.
    |
    (?:[\w_]+)                     # Words without apostrophes or dashes.
    |
    (?:\.(?:\s*\.){1,})            # Ellipsis dots.
    |
    (?:\S)                         # Everything else that isn't whitespace.
    :é   NNz([^a-zA-Z0-9])\1{3,}z&(#?(x?))([^&;\s]+);zZ(?<![A-Za-z0-9_!@#\$%&*])@(([A-Za-z0-9_]){15}(?!@)|([A-Za-z0-9_]){1,14}(?![A-Za-z0-9_]*@))c                 ó`   € Vf   Rp\        V \        4      '       d   V P                  W4      # V # )Núutf-8)Ú
isinstanceÚbytesÚdecode)ÚtextÚencodingÚerrorss   &&&Ú6/usr/lib/python3/dist-packages/nltk/tokenize/casual.pyÚ_str_to_unicoder   ì   s.   € ØÒØˆÜ�$œ×ÒØ�{‰{˜8Ó,Ð,Ø€Kó    c                óR   aa€ VV3R lp\         P                  V\        W4      4      # )us  
Remove entities from text by converting them to their
corresponding unicode character.

:param text: a unicode string or a byte string encoded in the given
`encoding` (which defaults to 'utf-8').

:param list keep:  list of entity names which should not be replaced.    This supports both numeric entities (``&#nnnn;`` and ``&#hhhh;``)
and named entities (such as ``&nbsp;`` or ``&gt;``).

:param bool remove_illegal: If `True`, entities that can't be converted are    removed. Otherwise, entities that can't be converted are kept "as
is".

:returns: A unicode string with the entities removed.

See https://github.com/scrapy/w3lib/blob/master/w3lib/html.py

    >>> from nltk.tokenize.casual import _replace_html_entities
    >>> _replace_html_entities(b'Price: &pound;100')
    'Price: \xa3100'
    >>> print(_replace_html_entities(b'Price: &pound;100'))
    Price: Â£100
    >>>
c                 ó>  <€ V P                  ^4      pV P                  ^4      '       d`    V P                  ^4      '       d   \        V^4      pM\        V^
4      p^€Tu;8:  d   ^Ÿ8:  d   M M]\        V34      P                  R4      # MAVS9   d   V P                  ^ 4      # \
        P                  P                  P                  V4      pVe    \        V4      # S'       d   R# V P                  ^ 4      #   \         d    Rp L:i ; i  \        \        3 d     LAi ; i)é   Úcp1252NÚ )ÚgroupÚintr   r	   Ú
ValueErrorÚhtmlÚentitiesÚname2codepointÚgetÚchrÚOverflowError)ÚmatchÚentity_bodyÚnumberÚkeepÚremove_illegals   &  €€r   Ú_convert_entityÚ/_replace_html_entities.<locals>._convert_entity  sÿ   ø€ Ø—k‘k !“nˆØ�;‰;�q�>Š>ðØ—;‘;˜q—>’>Ü  ¨bÓ1‘Fä  ¨bÓ1�Fð
 ˜6Ö) T×)Ü  & Ó+×2Ñ2°8Ó<Ð<ð *ð
 ˜dÔ"Ø—{‘{ 1“~Ð%Ü—]‘]×1Ñ1×5Ñ5°kÓBˆFØÒðÜ˜6“{Ð"÷ $ˆrÐ7¨¯©°Q«Ð7øô ô Ø’ðûô ¤Ð.ô Ùðús/   «C5 Á*C5 Á-C5 Ã
D Ã5DÄDÄDÄD)ÚENT_REÚsubr   )r
   r!   r"   r   r#   s   &ff& r   Ú_replace_html_entitiesr'   ô   s    ù€ ö88ô8 �:‰:�o¤°tÓ'FÓGÐGr   c                   ó€   a € ] tR tRt o RtRtRtRR ltV 3R lR lt]	V 3R lR l4       t
]	V 3R	 lR
 l4       tRtV tR# )ÚTweetTokenizeri2  a¦  
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', '!', '!', '!']
Nc                ó6   € Wn         W n        W0n        W@n        R# )aõ  
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
N©Úpreserve_caseÚ
reduce_lenÚstrip_handlesÚmatch_phone_numbers)Úselfr,   r-   r.   r/   s   &&&&&r   Ú__init__ÚTweetTokenizer.__init__L  s   € ð. +ÔØ$ŒØ*ÔØ#6Ö r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# )é   r
   Úreturn)Ústrr   )ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚTweetTokenizer.__annotate__h  s   ø€ ÷ ñ ™Sð ¡T©#¥Yñ r   c                óž  € \        V4      pV P                  '       d   \        V4      pV P                  '       d   \	        V4      p\
        P                  RV4      pV P                  '       d   V P                  P                  V4      pMV P                  P                  V4      pV P                  '       g   \        \        R V4      4      pV# )z²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`.
ú\1\1\1c                 ó\   € \         P                  V 4      '       d   V # V P                  4       # )N)ÚEMOTICON_REÚsearchÚlower)Úxs   &r   Ú<lambda>Ú)TweetTokenizer.tokenize.<locals>.<lambda>‚  s"   € ¤K×$6Ñ$6°q×$9Ò$9˜qÐH¸q¿w¹w»yÐHr   )r'   r.   Úremove_handlesr-   Úreduce_lengtheningÚHANG_REr&   r/   ÚPHONE_WORD_REÚfindallÚWORD_REr,   ÚlistÚmap)r0   r
   Ú	safe_textÚwordss   &&  r   ÚtokenizeÚTweetTokenizer.tokenizeh  s¥   € ô & dÓ+ˆà××ÐÜ! $Ó'ˆDà�?�?ˆ?Ü% dÓ+ˆDä—K‘K 	¨4Ó0ˆ	à×#×#Ð#Ø×&Ñ&×.Ñ.¨yÓ9‰Eà—L‘L×(Ñ(¨Ó3ˆEà×!×!Ð!ÜÜÑHÈ5ÓQóˆEð ˆr   c                ó   <€ V ^8„  d   QhRR/# ©r4   r5   zregex.Pattern© )r7   r8   s   "€r   r9   r:   ‡  s   ø€ ÷ #ñ #˜ñ #r   c                óJ  € \        V 4      P                  '       gu   \        P                  ! RRP	                  \
        4       R2\        P                  \        P                  ,          \        P                  ,          4      \        V 4      n        \        V 4      P                  # )zCore TweetTokenizer regexÚ(Ú|Ú))	ÚtypeÚ_WORD_REÚregexÚcompileÚjoinÚREGEXPSÚVERBOSEÚIÚUNICODE©r0   s   &r   rI   ÚTweetTokenizer.WORD_RE†  sj   € ô �D‹z×"×"Ð"Ü"'§-¢-Ø�C—H‘HœWÓ%Ð& aÐ(Ü—‘¤§¡Õ'¬%¯-©-Õ7ó#ŒD�‹JÔô �D‹z×"Ñ"Ð"r   c                ó   <€ V ^8„  d   QhRR/# rQ   rR   )r7   r8   s   "€r   r9   r:   ’  s   ø€ ÷ )ñ )˜ñ )r   c                óJ  € \        V 4      P                  '       gu   \        P                  ! RRP	                  \
        4       R2\        P                  \        P                  ,          \        P                  ,          4      \        V 4      n        \        V 4      P                  # )z#Secondary core TweetTokenizer regexrT   rU   rV   )	rW   Ú_PHONE_WORD_RErY   rZ   r[   ÚREGEXPS_PHONEr]   r^   r_   r`   s   &r   rG   ÚTweetTokenizer.PHONE_WORD_RE‘  sj   € ô �D‹z×(×(Ð(Ü(-¯ªØ�C—H‘Hœ]Ó+Ð,¨AÐ.Ü—‘¤§¡Õ'¬%¯-©-Õ7ó)ŒD�‹JÔ%ô �D‹z×(Ñ(Ð(r   )r/   r,   r-   r.   ©TFFT)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rX   rd   r1   rN   ÚpropertyrI   rG   Ú__static_attributes__Ú__classdictcell__)r8   s   @r   r)   r)   2  sM   ø‡ € ñð( €HØ€Nô7÷8ð ð< ÷#ó ð#ð ÷)ó ö)r   r)   c                óR   € \         P                  ! R4      pVP                  RV 4      # )zY
Replace repeated character sequences of length 3 or greater with sequences
of length 3.
z	(.)\1{2,}r<   )rY   rZ   r&   )r
   Úpatterns   & r   rE   rE   ¢  s#   € ô
 �mŠm˜LÓ)€GØ�;‰;�y $Ó'Ð'r   c                ó.   € \         P                  RV 4      # )z,
Remove Twitter username handles from text.
Ú )Ú
HANDLES_REr&   )r
   s   &r   rD   rD   «  s   € ô
 �>‰>˜#˜tÓ$Ð$r   c                ó>   € \        VVVVR7      P                  V 4      # )z2
Convenience function for wrapping the tokenizer.
r+   )r)   rN   )r
   r,   r-   r.   r/   s   &&&&&r   Úcasual_tokenizerv   ¸  s(   € ô Ø#ØØ#Ø/ô	÷
 �hˆtƒnðr   )NÚstrict)rR   Tr   rg   )rl   r   Útypingr   rY   Únltk.tokenize.apir   Ú	EMOTICONSÚURLSÚFLAGSÚPHONE_REGEXr\   re   rZ   rF   r]   r^   r_   r>   r%   rt   r   r'   r)   rE   rD   rv   rR   r   r   Ú<module>r~      s  ðñó@ Ý ã å (ð$	€	ð$)€ðf	€ð 	€ð$ 	ààààà(à.ð	ð 
ð
ð/"€ðJ ˜•˜[Ð7¨7°2­;Ñ7€ð �-Š-Ð/Ó
0€ð �mŠm˜I u§}¡}°u·w±wÕ'>ÀÇÁÕ'NÓO€ð 
�ŠÐ.Ó	/€ð �]Š]ðHó€
ôô8Hô|h)�Zô h)ò`(ò%ör   