§
    íóÉjì¿  ã                   ó¢  — d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
mZ d dlmZ dag adZ eddh¦  «        Z ej        d¦  «        Z ed¦  «        Zd	„ Zd1d„Z G d„ de¦  «        Zd„ Z	 	 	 	 	 	 	 d2d„Z G d„ de¦  «        Z ej        d¦  «        Zd„ Z ej        d¦  «        Z d„ Z! ej        d¦  «        Z"d„ Z#d„ Z$d„ Z%d„ Z&d„ Z' G d„ d¦  «        Z( G d„ d ¦  «        Z)	 	 	 	 	 	 d3d"„Z*	 d4d#„Z+	 d4d$„Z,	 	 	 	 	 	 d5d%„Z-	 	 	 	 	 	 d5d&„Z.	 	 	 	 	 	 d6d'„Z/	 	 	 	 	 	 d6d(„Z0d)„ Z1d*„ Z2d+„ Z3 G d,„ d-¦  «        Z4d7d.„Z5d/„ Z6d0„ Z7dS )8é    N)ÚElementTree)Úvalidate_path)z-xmxz-mxz-xmsz-msz-xssz-ssz-xbatchz-xintz-xcompz-xmixedz-verbosez-serverz-clientz\A[A-Za-z0-9_.,-]+\Zz 	
;|&$`<>(){}[]*?!'"\c                 ó¶  — t          | ¦  «        }d}|t          |¦  «        k     �r³||         }t          |t          ¦  «        r|st	          d|›d�¦  «        ‚t          d„ |D ¦   «         ¦  «        rt	          d|›d�¦  «        ‚|                     ¦   «         }|                     d¦  «        rt	          d|›d�¦  «        ‚|dk    rl|d	z   t          |¦  «        k     r||d	z            nd
}t          |t          ¦  «        rt           	                    |¦  «        st	          d|›d�¦  «        ‚|dz  }�Œ |                     d¦  «        rNt           	                    | 
                    dd	¦  «        d	         ¦  «        st	          d|›d�¦  «        ‚|d	z  }�Œƒ|t          v r|d	z  }�Œ“|                     t          ¦  «        r|d	z  }�Œ´t	          d|›d�¦  «        ‚d
S )a©  
    Raise ValueError if *options* contains JVM flags that can change the
    executed program, run a command, load agents, or expand argument files.

    Uses a minimal allowlist of exactly the flags NLTK's Java wrappers and the
    Stanford CoreNLP documentation use (heap/stack sizing, -verbose,
    -server/-client, and ``--add-modules``). This is intentionally stricter than
    a denylist so that -jar, @argfile, ``-XX:OnError=<cmd>``, dangerous ``-D``
    system properties, and future dangerous flags are all rejected without
    needing to be enumerated (CVE-2026-12841, CWE-88). Applications needing an
    unlisted flag use ``java(..., trusted_raw_options=[...])``.
    r   z>java_options contains an invalid (non-string or empty) entry: z (CVE-2026-12841, CWE-88).c              3   óœ   K  — | ]G}|                      ¦   «         p.t          |¦  «        d k     pt          |¦  «        dk    p|t          v V — ŒHdS )é    é   N)ÚisspaceÚordÚ_UNSAFE_OPTION_CHARS)Ú.0Úcs     úq/home/lighthouse/badge-speaker-benchmark/.benchmark-venv-community/lib/python3.11/site-packages/nltk/internals.pyú	<genexpr>z)_validate_java_options.<locals>.<genexpr>p   sg   è è € ð 
ð 
àð �IŠI‰KŒKÐW�3˜q™6œ6 Dš=ÐW­C°©F¬F°dªNÐW¸aÕCWÐ>Wð
ð 
ð 
ð 
ð 
ð 
ó    ztjava_options contains whitespace, a control character, or a shell metacharacter, which a valid JVM flag never does: ú@zAjava_options contains a disallowed Java argument file reference: z--add-modulesé   Nz;--add-modules must be followed by a plain module list, got é   z--add-modules=ú=z+--add-modules has a non-module-list value: z6java_options contains a disallowed JVM/launcher flag: z­. Only JVM memory/stack tuning, -verbose, -server/-client and --add-modules are permitted; pass anything else through java(trusted_raw_options=...) (CVE-2026-12841, CWE-88).)ÚlistÚlenÚ
isinstanceÚstrÚ
ValueErrorÚanyÚlowerÚ
startswithÚ_MODULE_LIST_REÚmatchÚsplitÚ_SAFE_JVM_EXACTÚ_SAFE_JVM_PREFIXES)ÚoptionsÚoptsÚiÚflagÚnÚmodss         r   Ú_validate_java_optionsr(   T   s�  € õ �‰=Œ=€DØ	€AØ
�c�$‰iŒiŠ-‰-Ø�AŒwˆõ ˜$¥Ñ$Ô$ð 	¨Dð 	Ýð6Øð6ð 6ð 6ñô ð õ ð 
ð 
àð
ñ 
ô 
ñ 
ô 
ð 	õ ð6àð6ð 6ð 6ñô ð ð �JŠJ‰LŒLˆð �<Š<˜ÑÔð 	ÝðAØ"ðAð Að Añô ð ð �ÒÐØ"# a¡%­#¨d©)¬)Ò"3Ð"3�4˜˜A™”;�;¸ˆDÝ˜d¥CÑ(Ô(ð µ×0EÒ0EÀdÑ0KÔ0Kð Ý ð:Øð:ð :ð :ñô ð ð �‰FˆAÙØ�<Š<Ð(Ñ)Ô)ð 	Ý"×(Ò(¨¯ª°C¸Ñ);Ô);¸AÔ)>Ñ?Ô?ð Ý ð0À$ð 0ð 0ð 0ñô ð ð �‰FˆAÙà•ÐÐØ�‰FˆAÙà�<Š<Õ*Ñ+Ô+ð 	Ø�‰FˆAÙåðFÀTð Fð Fð Fñ
ô 
ð 	
ðy ˆ-r   Fc                 óâ   — t          d| ddg|dg¬¦  «        a|�Ut          |t          ¦  «        r|                     ¦   «         }t          |¦  «        }t          |¦  «         |t          dd…<   dS dS )aå  
    Configure nltk's java interface, by letting nltk know where it can
    find the Java binary, and what extra options (if any) should be
    passed to Java when it is run.

    :param bin: The full path to the Java binary.  If not specified,
        then nltk will search the system for a Java binary; and if
        one is not found, it will raise a ``LookupError`` exception.
    :type bin: str
    :param options: A list of options that should be passed to the
        Java binary when it is called.  A common value is
        ``'-Xmx512m'``, which tells Java binary to increase
        the maximum heap size to 512 megabytes.  If no options are
        specified, then do not modify the options list.
    :type options: list(str)
    ÚjavaÚJAVAHOMEÚ	JAVA_HOMEzjava.exe)Úenv_varsÚverboseÚbinary_namesN)Úfind_binaryÚ	_java_binr   r   r   r   r(   Ú_java_options)Úbinr"   r.   s      r   Úconfig_javar4   ¨   sŠ   € õ$ ØØØ˜kÐ*ØØ �\ðñ ô €Ið ÐÝ�g�sÑ#Ô#ð 	&Ø—m’m‘o”oˆGÝ�w‘-”-ˆÝ˜wÑ'Ô'Ð'Ø"��a�a�aÑÐÐð Ðr   c                   ó   — e Zd ZdS )ÚUntrustedJarErrorN)Ú__name__Ú
__module__Ú__qualname__© r   r   r6   r6   Ê   s   € € € € € Ø€Dr   r6   c                 ó‚  — t           j                             d¦  «        dk    s#t           j                             d¦  «        dk    rdd l} |j        dt
          ¦  «         d S t          | t          ¦  «        r| g}nt          | ¦  «        }g }ddl	m
} |D ]E}	 |                     t           j
                             |¦  «        ¦  «         Œ6# t          $ r Y ŒBw xY w	 dd l}t           j
                             t           j
                             |j        ¦  «        ¦  «        }t           j
                             t           j
                             |d¦  «        ¦  «        }t           j
                             |d¦  «        }	t           j
                             |	¦  «        st           j
                             |	¦  «        r|                     |¦  «         n# t          $ r Y nw xY wd	D ]f}
	 t           j
                             |
¦  «        }t           j
                             |¦  «        r|                     |¦  «         ŒW# t          $ r Y Œcw xY wt          t(                               |¦  «        ¦  «        }|D ]Ê}|sŒt           j
                             |¦  «        st/          d
|› �¦  «        ‚t           j
                             t           j
                             |¦  «        ¦  «        }d}|D ]<}	 t           j
                             ||g¦  «        |k    rd} nŒ-# t4          $ r Y Œ9w xY w|st/          d|› d|› �¦  «        ‚ŒËd S )NÚNLTK_ALLOW_UNSAFE_JARSÚ1ÚNLTK_ALLOW_UNSAFE_CLASSPATHr   zKArbitrary JAR execution is permitted via NLTK_ALLOW_UNSAFE_JARS/CLASSPATH=1)Úpathz..z.git)z/usr/share/wekaz/usr/local/wekaz	/opt/wekazC:\Program Files\WekazC:\Program Files (x86)\Wekaz'Relative paths are strictly forbidden: FTzClasspath entry zB is not in a trusted location (outside nltk_data).
Trusted roots: )ÚosÚenvironÚgetÚwarningsÚwarnÚUserWarningr   r   r   Ú	nltk.datar?   ÚappendÚrealpathÚ	ExceptionÚnltkÚdirnameÚ__file__ÚjoinÚisdirÚisfileÚdictÚfromkeysÚisabsr6   ÚnormcaseÚ
commonpathr   )Úclasspath_entriesrC   ÚentriesÚtrusted_rootsÚ	data_pathÚprJ   Únltk_package_dirÚ	repo_rootÚ
git_markerÚwpÚabs_wpÚentryÚclean_entryÚallowedÚroots                   r   Ú_verify_jar_sandboxrc   Î   s~  € å
Œ
�ŠÐ/Ñ0Ô0°CÒ7Ð7ÝŒ:�>Š>Ð7Ñ8Ô8¸CÒ?Ð?àˆˆˆàˆŒØYÝñ	
ô 	
ð 	
ð 	ˆåÐ#¥SÑ)Ô)ð *Ø$Ð%ˆˆåÐ(Ñ)Ô)ˆà€MØ+Ð+Ð+Ð+Ð+Ð+àð ð ˆð	Ø× Ò ¥¤×!1Ò!1°!Ñ!4Ô!4Ñ5Ô5Ð5Ð5øÝð 	ð 	ð 	ØˆHð	øøøð	Øˆˆˆåœ7Ÿ?š?­2¬7×+;Ò+;¸D¼MÑ+JÔ+JÑKÔKÐÝ”G×$Ò$¥R¤W§\¢\Ð2BÀDÑ%IÔ%IÑJÔJˆ	Ý”W—\’\ )¨VÑ4Ô4ˆ
ÝŒ7�=Š=˜Ñ$Ô$ð 	,­¬¯ª°zÑ(BÔ(Bð 	,Ø× Ò  Ñ+Ô+Ð+øøÝð ð ð Øˆðøøøðð ð ˆð	Ý”W×%Ò% bÑ)Ô)ˆFÝŒw�}Š}˜VÑ$Ô$ð -Ø×$Ò$ VÑ,Ô,Ð,øøÝð 	ð 	ð 	ØˆHð	øøøõ �Ÿš }Ñ5Ô5Ñ6Ô6€Màð ð ˆØð 	ØÝŒw�}Š}˜UÑ#Ô#ð 	WÝ#Ð$UÈeÐ$UÐ$UÑVÔVÐVå”g×&Ò&¥r¤w×'7Ò'7¸Ñ'>Ô'>Ñ?Ô?ˆØˆØ!ð 	ð 	ˆDðÝ”7×%Ò% t¨[Ð&9Ñ:Ô:¸dÒBÐBØ"�GØ�Eð Cøõ ð ð ð Ø�ðøøøàð 	Ý#ð2 5ð 2ð 2Ø"/ð2ð 2ñô ð ð	ðð sJ   Â2CÃ
CÃCÃC5G Ç
GÇGÇ'AH;È;
IÉIË-'LÌ
L$Ì#L$Tc           
      óÊ  — t          | t          ¦  «        rt          d¦  «        ‚t          | ¦  «        }d„ }	 |	|¦  «        } |	|¦  «        } |	|¦  «        }|€t          rt          t          ¦  «        ng }
nGt          |t          ¦  «        r|                     ¦   «         nt          |¦  «        }
t          |
¦  «         |r;t          |t          ¦  «        r|                     ¦   «         }|
t          |¦  «        z   }
d }|�–t          |t          ¦  «        r,d„ |                     t          j        ¦  «        D ¦   «         }|}nt          |¦  «        }d }|st          d¦  «        ‚t          |¦  «         |�|}nt          j                             |¦  «        }g }t          t          t          ¦  «        r|                     t          ¦  «         n$|                     t          rt          ndg¦  «         |                     |
¦  «         |�|                     d|g¦  «         |                     |¦  «         	 t          j        ||||d¬¦  «        }|rY|                     ¦   «         \  }}|j        d	k    r3t'          d
d                     |¦  «        › d|j        › d|› d|› �¦  «        ‚||fS |S # t&          $ r-}t'          dd                     |¦  «        › d|› �¦  «        ‚d }~ww xY w)Nz/cmd must be a sequence of strings, not a stringc                 ó^   — | €d S | dk    s| du rt           j        S | dk    rt           j        S | S )NÚpipeTÚdevnull)Ú
subprocessÚPIPEÚDEVNULL)Ústreams    r   Ú
_normalisezjava.<locals>._normalise(  s@   € Øˆ>Ø�4Ø�VÒÐ˜v¨˜~˜~Ý”?Ð"Ø�YÒÐÝÔ%Ð%Øˆr   c                 ó   — g | ]}|¯|‘ŒS r:   r:   )r   rY   s     r   ú
<listcomp>zjava.<locals>.<listcomp>J  s   € ÐGÐGÐG ÀQÐG˜1ÐGÐGÐGr   z"Classpath is empty after splittingr*   z-cpT)ÚstdinÚstdoutÚstderrÚuniversal_newlinesr   zJava command failed: ú z
Return code: z	
Output: z
Error: z Failed to execute Java command: )r   r   Ú	TypeErrorr   r2   r   r(   r@   Úpathsepr   rc   rM   r1   rG   Úextendrh   ÚPopenÚcommunicateÚ
returncodeÚOSError)ÚcmdÚ	classpathro   rp   rq   Úblockingr"   Útrusted_raw_optionsÚcmd_listrl   Úopt_listÚclasspath_argÚraw_entriesÚoriginal_classpath_stringÚ	final_cmdrY   Ústdout_dataÚstderr_dataÚes                      r   r*   r*     sN  € õ �#•sÑÔð KÝÐIÑJÔJÐJÝ�C‰yŒy€Hðð ð ð ˆJ�uÑÔ€EØˆZ˜ÑÔ€FØˆZ˜ÑÔ€Fà€Ý*7Ð?•4�Ñ&Ô&Ð&¸Rˆˆå&0°½#Ñ&>Ô&>ÐQ�7—=’=‘?”?�?ÅDÈÁMÄMˆõ
 	˜xÑ(Ô(Ð(ð
 ð 8ÝÐ)­3Ñ/Ô/ð 	>Ø"5×";Ò";Ñ"=Ô"=ÐØ�dÐ#6Ñ7Ô7Ñ7ˆà€MØÐÝ�i¥Ñ%Ô%ð 	-ØGÐG i§o¢oµb´jÑ&AÔ&AÐGÑGÔGˆKØ(1Ð%Ð%å˜y™/œ/ˆKØ(,Ð%Øð 	CÝÐAÑBÔBÐBÝ˜KÑ(Ô(Ð(Ø$Ð0Ø5ˆMˆMåœJŸOšO¨KÑ8Ô8ˆMà€IÝ•)�SÑ!Ô!ð ?Ø×Ò�Ñ#Ô#Ð#Ð#à×Ò¥iÐ=�˜°f°XÑ>Ô>Ð>à×Ò�XÑÔÐØÐ Ø×Ò˜% Ð/Ñ0Ô0Ð0Ø×Ò�XÑÔÐð
ÝÔØØØØØ#ð
ñ 
ô 
ˆð ð 	,Ø'(§}¢}¡¤Ñ$ˆK˜ØŒ|˜qÒ Ð Ýð`¨C¯HªH°YÑ,?Ô,?ð `ð `Ø$%¤Lð`ð `Ø<Gð`ð `ØR]ð`ð `ñô ð ð  Ð+Ð+ØˆøÝð 
ð 
ð 
ÝØP¨s¯xªx¸	Ñ/BÔ/BÐPÐPÈQÐPÐPñ
ô 
ð 	
øøøøð
øøøs   È5A3J+ Ê)J+ Ê+
K"Ê5(KËK"c                   ó   — e Zd ZdZd„ Zd„ ZdS )Ú	ReadErrorzÉ
    Exception raised by read_* functions when they fail.
    :param position: The index in the input string where an error occurred.
    :param expected: What was expected when an error occurred.
    c                 óZ   — t                                | ||¦  «         || _        || _        d S ©N)r   Ú__init__ÚexpectedÚposition)Úselfr�   rŽ   s      r   rŒ   zReadError.__init__…  s,   € Ý×Ò˜D (¨HÑ5Ô5Ð5Ø ˆŒØ ˆŒˆˆr   c                 ó&   — d| j         › d| j        › �S )Nz	Expected z at )r�   rŽ   ©r�   s    r   Ú__str__zReadError.__str__Š  s   € Ø=˜4œ=Ð=Ð=¨d¬mÐ=Ð=Ð=r   N)r7   r8   r9   Ú__doc__rŒ   r’   r:   r   r   r‰   r‰   ~  s<   € € € € € ðð ð!ð !ð !ð
>ð >ð >ð >ð >r   r‰   z[uU]?[rR]?(\"\"\"|\'\'\'|\"|\')c                 óV  — t                                | |¦  «        }|st          d|¦  «        ‚|                     d¦  «        }t	          j        d|z  ¦  «        }|                     ¦   «         }	 |                     | |¦  «        }|st          d|¦  «        ‚|                     d¦  «        dk    r|                     ¦   «         dz   }nnŒ[	 t          | ||                     ¦   «         …         ¦  «        |                     ¦   «         fS # t          $ r}t          d|¦  «        |‚d	}~ww xY w)
a­  
    If a Python string literal begins at the specified position in the
    given string, then return a tuple ``(val, end_position)``
    containing the value of the string literal and the position where
    it ends.  Otherwise, raise a ``ReadError``.

    :param s: A string that will be checked to see if within which a
        Python string literal exists.
    :type s: str

    :param start_position: The specified beginning position of the string ``s``
        to begin regex matching.
    :type start_position: int

    :return: A tuple containing the matched string literal evaluated as a
        string and the end position of the string literal.
    :rtype: tuple(str, int)

    :raise ReadError: If the ``_STRING_START_RE`` regex doesn't return a
        match in ``s`` at ``start_position``, i.e., open quote. If the
        ``_STRING_END_RE`` regex doesn't return a match in ``s`` at the
        end of the first match, i.e., close quote.
    :raise ValueError: If an invalid string (i.e., contains an invalid
        escape sequence) is passed into the ``eval``.

    :Example:

    >>> from nltk.internals import read_str
    >>> read_str('"Hello", World!', 0)
    ('Hello', 7)

    z
open quoter   z\\|%sTzclose quoter   ú\zvalid escape sequenceN)
Ú_STRING_START_REr   r‰   ÚgroupÚreÚcompileÚendÚsearchÚevalr   )ÚsÚstart_positionÚmÚ	quotemarkÚ_STRING_END_RErŽ   r   r‡   s           r   Úread_strr¢   ‘  s/  € õD 	×Ò˜q .Ñ1Ô1€AØð 6Ý˜ nÑ5Ô5Ð5Ø—’˜‘
”
€Iõ ”Z ¨9Ñ 4Ñ5Ô5€NØ�uŠu‰wŒw€HðØ×%Ò% a¨Ñ2Ô2ˆØð 	5Ý˜M¨8Ñ4Ô4Ð4Ø�;Š;�q‰>Œ>˜TÒ!Ð!Ø—y’y‘{”{ Q‘ˆHˆHàððHÝ�A�n u§y¢y¡{¤{Ð2Ô3Ñ4Ô4°e·i²i±k´kÐAÐAøÝð Hð Hð HÝÐ/°Ñ@Ô@ÀaÐGøøøøðHøøøs   Ã<D Ä
D(ÄD#Ä#D(z-?\d+c                 óÆ   — t                                | |¦  «        }|st          d|¦  «        ‚t          |                     ¦   «         ¦  «        |                     ¦   «         fS )al  
    If an integer begins at the specified position in the given
    string, then return a tuple ``(val, end_position)`` containing the
    value of the integer and the position where it ends.  Otherwise,
    raise a ``ReadError``.

    :param s: A string that will be checked to see if within which a
        Python integer exists.
    :type s: str

    :param start_position: The specified beginning position of the string ``s``
        to begin regex matching.
    :type start_position: int

    :return: A tuple containing the matched integer casted to an int,
        and the end position of the int in ``s``.
    :rtype: tuple(int, int)

    :raise ReadError: If the ``_READ_INT_RE`` regex doesn't return a
        match in ``s`` at ``start_position``.

    :Example:

    >>> from nltk.internals import read_int
    >>> read_int('42 is the answer', 0)
    (42, 2)

    Úinteger)Ú_READ_INT_REr   r‰   Úintr—   rš   ©r�   rž   rŸ   s      r   Úread_intr¨   Ï  sR   € õ: 	×Ò˜1˜nÑ-Ô-€AØð 3Ý˜	 >Ñ2Ô2Ð2Ýˆq�wŠw‰yŒy‰>Œ>˜1Ÿ5š5™7œ7Ð"Ð"r   z-?(\d*)([.]?\d*)?c                 ó®  — t                                | |¦  «        }|r*|                     d¦  «        s%|                     d¦  «        st          d|¦  «        ‚|                     d¦  «        r5t	          |                     ¦   «         ¦  «        |                     ¦   «         fS t          |                     ¦   «         ¦  «        |                     ¦   «         fS )aŠ  
    If an integer or float begins at the specified position in the
    given string, then return a tuple ``(val, end_position)``
    containing the value of the number and the position where it ends.
    Otherwise, raise a ``ReadError``.

    :param s: A string that will be checked to see if within which a
        Python number exists.
    :type s: str

    :param start_position: The specified beginning position of the string ``s``
        to begin regex matching.
    :type start_position: int

    :return: A tuple containing the matched number casted to a ``float``,
        and the end position of the number in ``s``.
    :rtype: tuple(float, int)

    :raise ReadError: If the ``_READ_NUMBER_VALUE`` regex doesn't return a
        match in ``s`` at ``start_position``.

    :Example:

    >>> from nltk.internals import read_number
    >>> read_number('Pi is 3.14159', 6)
    (3.14159, 13)

    r   r   Únumber)Ú_READ_NUMBER_VALUEr   r—   r‰   Úfloatrš   r¦   r§   s      r   Úread_numberr­   õ  s©   € õ: 	× Ò   NÑ3Ô3€AØð 2�Q—W’W˜Q‘Z”Zð 2 1§7¢7¨1¡:¤:ð 2Ý˜ .Ñ1Ô1Ð1Ø‡w‚wˆq�z„zð 'Ý�Q—W’W‘Y”YÑÔ §¢¡¤Ð(Ð(å�1—7’7‘9”9‰~Œ~˜qŸušu™wœwÐ&Ð&r   c                 óì   ‡— t          | t          j        ¦  «        rK| j        j        �?| j        Šˆfd„t          | j        j        ¦  «        D ¦   «         }t          |¦  «        dk    S t          d¦  «        ‚)aÇ  
    :return: True if ``method`` overrides some method with the same
        name in a base class.  This is typically used when defining
        abstract base classes or interfaces, to allow subclasses to define
        either of two related methods:

        >>> class EaterI:
        ...     '''Subclass must define eat() or batch_eat().'''
        ...     def eat(self, food):
        ...         if overridden(self.batch_eat):
        ...             return self.batch_eat([food])[0]
        ...         else:
        ...             raise NotImplementedError()
        ...     def batch_eat(self, foods):
        ...         return [self.eat(food) for food in foods]

    :type method: instance method
    Nc                 ó<   •— g | ]}‰|j         v ¯|j         ‰         ‘ŒS r:   )Ú__dict__)r   ÚclsÚnames     €r   rn   zoverridden.<locals>.<listcomp>5  s7   ø€ ð 
ð 
ð 
àØ�s”|Ð#Ð#ð ŒL˜Ôà#Ð#Ð#r   r   zExpected an instance method.)	r   ÚtypesÚ
MethodTypeÚ__self__Ú	__class__r7   Ú_mror   rt   )ÚmethodÚfuncsr²   s     @r   Ú
overriddenrº      s�   ø€ õ& �&�%Ô*Ñ+Ô+ð 	8°´Ô0IÐ0UØŒˆð
ð 
ð 
ð 
å˜FœOÔ5Ñ6Ô6ð
ñ 
ô 
ˆõ
 �5‰zŒz˜AŠ~ÐåÐ6Ñ7Ô7Ð7r   c                 óœ   — t          | t          ¦  «        r| j        S | g}| j        D ]$}|                     t          |¦  «        ¦  «         Œ%|S )aY  
    Return the method resolution order for ``cls`` -- i.e., a list
    containing ``cls`` and all its base classes, in the order in which
    they would be checked by ``getattr``.  For new-style classes, this
    is just cls.__mro__.  For classic classes, this can be obtained by
    a depth-first left-to-right traversal of ``__bases__``.
    )r   ÚtypeÚ__mro__Ú	__bases__rv   r·   )r±   ÚmroÚbases      r   r·   r·   ?  sV   € õ �#•tÑÔð ØŒ{ÐàˆeˆØ”Mð 	#ð 	#ˆDØ�JŠJ•t˜D‘z”zÑ"Ô"Ð"Ð"Øˆ
r   c                 ó@  — d}| j         r_| j                              ¦   «         dz   | _         t          j        d| j                              ¦   «         ¦  «        }|rt          |¦  «        }nd| _         | xj         t          j        d|› d|› �||dz   ¬¦  «        z  c_         dS )	z4Add an epytext @field to a given object's docstring.Ú ú

z(?<=\n)[ ]+(?!\s)r   ú: ú    ©Úinitial_indentÚsubsequent_indentN)r“   Úrstripr˜   ÚfindallÚ
expandtabsÚminÚtextwrapÚfill)ÚobjÚfieldÚmessageÚindentÚindentss        r   Ú_add_epytext_fieldrÔ   V  s®   € à€Fð „{ð Ø”k×(Ò(Ñ*Ô*¨VÑ3ˆŒÝ”*Ð1°3´;×3IÒ3IÑ3KÔ3KÑLÔLˆØð 	"Ý˜‘\”\ˆFøð ˆŒà€K„K•8”=ØˆEÐÐ�WÐÐØØ  6™/ðñ ô ñ €K„K€K€Kr   c                 ó   ‡ — ˆ fd„}|S )a$  
    A decorator used to mark functions as deprecated.  This will cause
    a warning to be printed the when the function is used.  Usage:

        >>> from nltk.internals import deprecated
        >>> @deprecated('Use foo() instead')
        ... def bar(x):
        ...     print(x/10)

    c                 ó  •‡ ‡— d‰ j         › d‰› �Šdt          j        ‰dd¬¦  «        z   Šˆ ˆfd„}|j                             ‰ j        ¦  «         ‰ j         |_         ‰ j        |_        d|_        t          |d‰¦  «         |S )	Nz	Function z() has been deprecated.  ú
ú  rÆ   c                  óL   •— t          j        ‰t          d¬¦  «          ‰| i |¤ŽS )Nr   ©ÚcategoryÚ
stacklevel)rC   rD   ÚDeprecationWarning)ÚargsÚkwargsÚfuncÚmsgs     €€r   ÚnewFuncz.deprecated.<locals>.decorator.<locals>.newFunc{  s0   ø€ ÝŒM˜#Õ(:ÀqÐIÑIÔIÐIØ�4˜Ð( Ð(Ð(Ð(r   TÚ
deprecated)r7   rÍ   rÎ   r°   Úupdater“   Ú__deprecated__rÔ   )rà   râ   rá   rÑ   s   ` @€r   Ú	decoratorzdeprecated.<locals>.decoratorw  s¢   øøø€ ØK˜$œ-ÐKÐKÀ'ÐKÐKˆØ•X”] 3°tÈtÐTÑTÔTÑTˆð	)ð 	)ð 	)ð 	)ð 	)ð 	)ð
 	Ô×Ò ¤Ñ.Ô.Ð.Øœ=ˆÔØœ,ˆŒØ!%ˆÔå˜7 L°'Ñ:Ô:Ð:Øˆr   r:   )rÑ   ræ   s   ` r   rã   rã   k  s$   ø€ ðð ð ð ð ð" Ðr   c                   ó   — e Zd ZdZd„ ZdS )Ú
DeprecatedaÕ  
    A base class used to mark deprecated classes.  A typical usage is to
    alert users that the name of a class has changed:

        >>> from nltk.internals import Deprecated
        >>> class NewClassName:
        ...     pass # All logic goes here.
        ...
        >>> class OldClassName(Deprecated, NewClassName):
        ...     "Use NewClassName instead."

    The docstring of the deprecated class will be used in the
    deprecation warning message.
    c                 óÜ  — d }t          | ¦  «        D ]}t          |j        v r|} nŒ|s
J d¦   «         ‚|j        pd                     ¦   «         }t          j        dd|¦  «        }t          j        dd|¦  «        }d|j        z  }| |k    r|d| j        z  z  }|› d|› �}dt          j	        |d	d	¬
¦  «        z   }t          j        |t          d¬¦  «         t                               | ¦  «        S )Nz-Unable to determine which base is deprecated.rÂ   z\A\s*@deprecated:z(?m)^\s*zClass %sz (base class for %s)z has been deprecated.  r×   rÅ   rÆ   r   rÚ   )r·   rè   r¾   r“   Ústripr˜   Úsubr7   rÍ   rÎ   rC   rD   rÝ   ÚobjectÚ__new__)r±   rÞ   rß   Údep_clsrÀ   Údocr²   rá   s           r   rí   zDeprecated.__new__›  s  € àˆÝ˜‘I”Ið 	ð 	ˆDÝ˜Tœ^Ð+Ð+Ø�Ø�ð ,ð ÐGÐGÐGÑGÔGÐGð ŒoÐ+ §¢¡¤ˆåŒfÐ)¨3°Ñ4Ô4ˆåŒf�[ " cÑ*Ô*ˆà˜GÔ,Ñ,ˆØ�'Š>ˆ>ØÐ*¨S¬\Ñ9Ñ9ˆDàÐ3Ð3¨cÐ3Ð3ˆà•X”] 3°vÐQWÐXÑXÔXÑXˆÝŒ�cÕ$6À1ÐEÑEÔEÐEå�~Š~˜cÑ"Ô"Ð"r   N)r7   r8   r9   r“   rí   r:   r   r   rè   rè   ‹  s-   € € € € € ðð ð#ð #ð #ð #ð #r   rè   c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚCounterzE
    A counter that auto-increments each time its value is read.
    r   c                 ó   — || _         d S r‹   ©Ú_value)r�   Úinitial_values     r   rŒ   zCounter.__init__Á  s   € Ø#ˆŒˆˆr   c                 ó0   — | xj         dz  c_         | j         S ©Nr   ró   r‘   s    r   rB   zCounter.getÄ  s   € ØˆŒ�qÑˆŒØŒ{Ðr   N)r   )r7   r8   r9   r“   rŒ   rB   r:   r   r   rñ   rñ   ¼  sA   € € € € € ðð ð$ð $ð $ð $ðð ð ð ð r   rñ   r:   c           
   #   óÌ	  K  — | g|pg z   }t          | t          ¦  «        sJ ‚t          |t          ¦  «        rJ ‚t          |t          ¦  «        rJ ‚t          |t          ¦  «        r|                     ¦   «         }d}|D ]ú}t          j                             | |¦  «        }	t          j                             |	¦  «        r|rt          d| › d|	› d�¦  «         d}|	V — t          j                             |¦  «        r|rt          d| › d|› d�¦  «         d}|V — t          j                             | d|¦  «        }	t          j                             |	¦  «        r|rt          d| › d|	› d�¦  «         d}|	V — Œû|D �]½}
|
t          j        v �r«|rYt          j        |
                              t          j	        ¦  «        D ])}t          j         
                    |¦  «        }|rd}|V — Œ*t          j        |
                              t          j	        ¦  «        D �]}t          j         
                    |¦  «        }t          j                             |¦  «        r|rt          d| › d|› d�¦  «         d}|V — |D ]½}t          j                             ||¦  «        }	t          j                             |	¦  «        r|rt          d| › d|	› d�¦  «         d}|	V — t          j                             |d|¦  «        }	t          j                             |	¦  «        r|rt          d| › d|	› d�¦  «         d}|	V — Œ¾�Œ!�Œ¿|D ]L}|D ]G}t          j                             ||¦  «        }	t          j                             |	¦  «        rd}|	V — ŒHŒMt          j        dk    rß|D ]Ü}	 t          j        d	|gt          j        t          j        ¬
¦  «        }|                     ¦   «         \  }}t!          |¦  «                             ¦   «         }|                     |¦  «        r=t          j                             |¦  «        r|rt          d| › d|› d�¦  «         d}|V — n# t(          t*          t,          f$ r ‚ w xY wŒØ# w xY w|skd| z  }|r|d|d         z  z  }|dz  }|r'|dz  }|d                     d„ |D ¦   «         ¦  «        z  }|r|d| › d|› d�z  }d}t/          d|› d|› d|› �¦  «        ‚dS )aŸ  
    Search for a file to be used by nltk.

    :param filename: The name or path of the file.
    :param env_vars: A list of environment variable names to check.
    :param file_names: A list of alternative file names to check.
    :param searchpath: List of directories to search.
    :param url: URL presented to user for download help.
    :param verbose: Whether or not to print path when a file is found.
    Fú[Found rÄ   ú]TÚfiler3   ÚposixÚwhich)rp   rq   zSNLTK was unable to find the %s file!
Use software specific configuration parametersz# or set the %s environment variabler   ú.ú

  Searched in:rÂ   c              3   ó    K  — | ]	}d |z  V — Œ
dS ©z	
    - %sNr:   ©r   Úds     r   r   z!find_file_iter.<locals>.<genexpr>N  ó'   è è € Ð@Ð@°˜<¨!Ñ+Ð@Ð@Ð@Ð@Ð@Ð@r   z

  For more information on z, see:
    <ú>úK===========================================================================rÃ   r×   N)r   r   r   r@   r?   rM   rO   ÚprintrA   ru   Ú
expanduserr²   rh   rw   ri   rx   Ú_decode_stdoutdatarê   ÚendswithÚexistsÚKeyboardInterruptÚ
SystemExitrz   ÚLookupError)Úfilenamer-   Ú
searchpathÚ
file_namesÚurlr.   Úfinding_dirÚyieldedÚalternativeÚpath_to_fileÚenv_varÚenv_dirÚ	directoryrY   rp   rq   r?   rá   Údivs                      r   Úfind_file_iterr  Î  sã  è è € ð& �˜zÐ/¨RÑ0€JÝ�h¥Ñ$Ô$Ð$Ð$Ð$Ý˜*¥cÑ*Ô*Ð*Ð*Ð*Ý˜*¥cÑ*Ô*Ð*Ð*Ð*Ý�(�CÑ Ô ð $Ø—>’>Ñ#Ô#ˆØ€Gð "ð ð ˆÝ”w—|’| H¨kÑ:Ô:ˆÝŒ7�>Š>˜,Ñ'Ô'ð 	Øð =ÝÐ; Ð;Ð;¨LÐ;Ð;Ð;Ñ<Ô<Ð<ØˆGØÐÐÐåŒ7�>Š>˜+Ñ&Ô&ð 	Øð <ÝÐ: Ð:Ð:¨KÐ:Ð:Ð:Ñ;Ô;Ð;ØˆGØÐÐÐå”w—|’| H¨f°kÑBÔBˆÝŒ7�>Š>˜,Ñ'Ô'ð 	Øð =ÝÐ; Ð;Ð;¨LÐ;Ð;Ð;Ñ<Ô<Ð<ØˆGØÐÐÐøð ð #+ñ #+ˆØ•b”jÐ Ñ Øð &Ý!œz¨'Ô2×8Ò8½¼ÑDÔDð &ð &�GÝ œg×0Ò0°Ñ9Ô9�GØð &Ø"&˜Ø%˜˜˜øåœ: gÔ.×4Ò4µR´ZÑ@Ô@ð +ñ +�Ýœ'×,Ò,¨WÑ5Ô5�å”7—>’> 'Ñ*Ô*ð "Øð @ÝÐ>¨Ð>Ð>°GÐ>Ð>Ð>Ñ?Ô?Ð?Ø"�GØ!�M�M�Mà#-ð +ð +�KÝ#%¤7§<¢<°¸Ñ#EÔ#E�LÝ”w—~’~ lÑ3Ô3ð +Ø"ð IÝ!Ð"G¨HÐ"GÐ"G¸Ð"GÐ"GÐ"GÑHÔHÐHØ"&˜Ø*Ð*Ð*Ð*õ
 $&¤7§<¢<°¸ÀÑ#LÔ#L�Lå”w—~’~ lÑ3Ô3ð +Ø"ð IÝ!Ð"G¨HÐ"GÐ"G¸Ð"GÐ"GÐ"GÑHÔHÐHØ"&˜Ø*Ð*Ð*Ð*øñ#+ùð(  ð #ð #ˆ	Ø%ð 	#ð 	#ˆKÝœ7Ÿ<š<¨	°;Ñ?Ô?ˆLÝŒw�~Š~˜lÑ+Ô+ð #Ø�Ø"Ð"Ð"Ð"øð		#õ 
„w�'ÒÐØ%ð 	ð 	ˆKðÝÔ$Ø˜kÐ*Ý%œ?Ý%œ?ðñ ô �ð
 "#§¢¡¤‘�˜Ý)¨&Ñ1Ô1×7Ò7Ñ9Ô9�Ø—=’= Ñ-Ô-ð µ"´'·.².ÀÑ2FÔ2Fð Øð =ÝÐ;¨Ð;Ð;°DÐ;Ð;Ð;Ñ<Ô<Ð<Ø"�GØ�J�J�JøøÝ%¥zµ7Ð;ð ð ð Øðøøøð ø����àð 6ð'à)1ñ2ð 	ð
 ð 	GØÐ8¸8ÀA¼;ÑFÑFˆCØˆs‰
ˆØð 	AØÐ'Ñ'ˆCØ�2—7’7Ð@Ð@°ZÐ@Ñ@Ô@Ñ@Ô@Ñ@ˆCØð 	RØÐQ°HÐQÐQÈ3ÐQÐQÐQÑQˆCØˆÝÐ4 Ð4Ð4¨Ð4Ð4¨sÐ4Ð4Ñ5Ô5Ð5ð6ð 6s   ÎB7QÑQ2ÑQ.Ñ.Q2Ñ2Q4c           
      óD   — t          t          | |||||¦  «        ¦  «        S r‹   ©Únextr  ©r  r-   r  r  r  r.   s         r   Ú	find_filer   U  s+   € õ Ý�x ¨:°zÀ3ÈÑPÔPñô ð r   c                 óH   — t          t          | |||||d¬¦  «        ¦  «        S )NT)r  r  r  s         r   Úfind_dirr"  ]  s8   € õ ÝØ�h 
¨J¸¸WÐRVð	
ñ 	
ô 	
ñô ð r   c              #   ó  K  — | o"t           j                             | ¦  «        dk    }d}t          |p| |||||¦  «        D ]*}	|r t           j                             |	¦  «        sŒ$d}|	V — Œ+|r|st          d| ›d�¦  «        ‚dS dS )aâ  
    Search for a file to be used by nltk.

    :param name: The name or path of the file.
    :param path_to_bin: The user-supplied binary location (deprecated)
    :param env_vars: A list of environment variable names to check.
    :param file_names: A list of alternative file names to check.
    :param searchpath: List of directories to search.
    :param url: URL presented to user for download help.
    :param verbose: Whether or not to print path when a file is found.
    rÂ   FTzNLTK found z© only in the current working directory, which is not a trusted location for executables. Install it on PATH or in a configured location, or pass an explicit path_to_bin.N)r@   r?   rK   r  rR   r  )
r²   Úpath_to_binr-   r  r/   r  r.   Úsearching_bare_nameÚ
safe_matchr?   s
             r   Úfind_binary_iterr'  g  sÜ   è è € ðB *˜/ÐI­b¬g¯oªo¸dÑ.CÔ.CÀrÒ.IÐØ€JÝØÐ�t˜X z°<ÀÀgñô ð ð ˆð ð 	¥r¤w§}¢}°TÑ':Ô':ð 	ØØˆ
Øˆ
ˆ
ˆ
ˆ
Øð 
 :ð 
õ ðF˜$ð Fð Fð Fñ
ô 
ð 	
ð	
ð 
ð 
ð 
r   c                 óF   — t          t          | ||||||¦  «        ¦  «        S r‹   )r  r'  )r²   r$  r-   r  r/   r  r.   s          r   r0   r0   œ  s2   € õ ÝØ�+˜x¨°\À3Èñ	
ô 	
ñô ð r   c              #   óh
  ‡K  — t          | t          ¦  «        sJ ‚t          |t          ¦  «        rJ ‚t          |t          ¦  «        r|                     ¦   «         }d}dgt          |¦  «        z   }|�;t          j                             |¦  «        rd}|V — nt          d| › d|› �¦  «        ‚|D �]}|t          j        v �rò|dk    �rút          j        d         }	|	                     t          j        j	        ¦  «        D �]À}
t          j         
                    |
¦  «        }
t          j                             |
¦  «        r\t          j                             |
¦  «        }|rt          j        | |¦  «        s|s$|| k    r|rt          d| › d|
› d	�¦  «         d}|
V — t          j                             |
¦  «        �r|s{t          j                             t          j                             |
| ¦  «        ¦  «        r<|rt          d| › d|
› d	�¦  «         d}t          j                             |
| ¦  «        V — �Œ:t	          j        |
¦  «        D ]q}t          j        | |¦  «        rZ|r4t          d| ›dt          j                             |
|¦  «        ›d	�¦  «         d}t          j                             |
|¦  «        V — Œr�ŒÂ�Œt          j         
                    t          j        |         ¦  «        Št          j                             ‰¦  «        r ˆfd
„t	          j        ‰¦  «        D ¦   «         n‰f}|D ]}}t          j                             |¦  «        r\t          j                             |¦  «        }|rt          j        | |¦  «        s|s$|| k    r|rt          d| › d|› d	�¦  «         d}|V — Œ~�Œ|D ]ë}|rŠt	          j        |¦  «        D ]t}t          j                             ||¦  «        }t          j                             |¦  «        r-t          j        | |¦  «        r|rt          d|› d|› d	�¦  «         d}|V — ŒuŒŽt          j                             || ¦  «        }t          j                             |¦  «        r|rt          d| › d|› d	�¦  «         d}|V — Œì|s�d| z  }|r|d|d         z  z  }t%          j        |dz   dd¬¦  «        }|r'|dz  }|d                     d„ |D ¦   «         ¦  «        z  }|r|d                     | |¦  «        z  }d}t          d|› d|› d|› �¦  «        ‚dS )aÅ  
    Search for a jar that is used by nltk.

    :param name_pattern: The name of the jar file
    :param path_to_jar: The user-supplied jar location, or None.
    :param env_vars: A list of environment variable names to check
                     in addition to the CLASSPATH variable which is
                     checked by default.
    :param searchpath: List of directories to search.
    :param is_regex: Whether name is a regular expression.
    FÚ	CLASSPATHNTzCould not find z jar file at rù   rÄ   rú   c              3   óX   •K  — | ]$}t           j                             ‰|¦  «        V — Œ%d S r‹   )r@   r?   rM   )r   Úpath_to_jarÚjar_envs     €r   r   z find_jar_iter.<locals>.<genexpr>  sG   øè è € ð ð à'õ œŸš W¨kÑ:Ô:ðð ð ð ð ð r   zNLTK was unable to find %s!z  Set the %s environment variabler   rþ   rØ   rÆ   rÿ   rÂ   c              3   ó    K  — | ]	}d |z  V — Œ
dS r  r:   r  s     r   r   z find_jar_iter.<locals>.<genexpr>0  r  r   z.

  For more information, on {}, see:
    <{}>r  rÃ   r×   )r   r   r   r   r@   r?   rO   r  rA   ru   r  Úbasenamer˜   r   r  rN   rM   ÚlistdirrÍ   rÎ   Úformat)Úname_patternr,  r-   r  r  r.   Úis_regexr  r  r|   Úcpr  Ú	file_nameÚjar_iterr  rá   r  r-  s                    @r   Úfind_jar_iterr7  ¬  s&  øè è € õ* �l¥CÑ(Ô(Ð(Ð(Ð(Ý˜*¥cÑ*Ô*Ð*Ð*Ð*Ý�(�CÑ Ô ð $Ø—>’>Ñ#Ô#ˆØ€Gð ˆ}�t H™~œ~Ñ-€Hð ÐÝŒ7�>Š>˜+Ñ&Ô&ð 	ØˆGØÐÐÐÐåØJ ,ÐJÐJ¸[ÐJÐJñô ð ð
 ð =.ñ =.ˆØ•b”jÐ Ñ Ø˜+Ò%Ñ%ÝœJ {Ô3�	Ø#Ÿ/š/­"¬'¬/Ñ:Ô:ð "Fñ "F�BÝœ×+Ò+¨BÑ/Ô/�BÝ”w—~’~ bÑ)Ô)ð 
%Ý#%¤7×#3Ò#3°BÑ#7Ô#7˜à$ð%å "¤¨°xÑ @Ô @ð%ð %-ð%ð 2:¸\Ò1IÐ1Ià&ð GÝ %Ð&E°Ð&EÐ&EÀÐ&EÐ&EÐ&EÑ FÔ FÐ FØ&*˜GØ"$˜H˜H˜Hå”w—}’} RÑ(Ô(ñ FØ'ð FÝ!œwŸ~š~­b¬g¯lªl¸2¸|Ñ.LÔ.LÑMÔMð EØ#*ð !KÝ$)Ð*I°LÐ*IÐ*IÀBÐ*IÐ*IÐ*IÑ$JÔ$JÐ$JØ*. Ý&(¤g§l¢l°2°|Ñ&DÔ&DÐ DÐ DÐ Dùõ .0¬Z¸©^¬^ð Fð F 	Ý#%¤8¨L¸)Ñ#DÔ#Dð 
!FØ'.ð %*Ý(-¨ð 1=°°Ý02´·²¸RÀÑ0KÔ0KÐ0KÐ0Kð-.ñ)*ô )*ð )*ð /3 GÝ*,¬'¯,ª,°r¸9Ñ*EÔ*EÐ$EÐ$EÐ$EøùñE"FõJ œ'×,Ò,­R¬Z¸Ô-@ÑAÔA�õ ”w—}’} WÑ-Ô-ð	$ð ð ð ð å+-¬:°gÑ+>Ô+>ðñ ô ð ð
 "˜ð ð $,ð .ð .�KÝ”w—~’~ kÑ2Ô2ð 
.Ý#%¤7×#3Ò#3°KÑ#@Ô#@˜à$ð.å "¤¨°xÑ @Ô @ð.ð %-ð.ð 2:¸\Ò1IÐ1Ià&ð PÝ %Ð&N°Ð&NÐ&NÀÐ&NÐ&NÐ&NÑ OÔ OÐ OØ&*˜GØ"-Ð-Ð-Ð-øùð  ð "ð "ˆ	Øð 	"ÝœJ yÑ1Ô1ð "ð "�Ý œgŸlšl¨9°hÑ?Ô?�Ý”7—>’> +Ñ.Ô.ð HÝ”x ¨hÑ7Ô7ð HØ"ð HÝ!Ð"F¨HÐ"FÐ"F¸Ð"FÐ"FÐ"FÑGÔGÐGØ�Ø!Ð!Ð!Ð!Ð!ð"õ œ'Ÿ,š, y°,Ñ?Ô?ˆKÝŒw�~Š~˜kÑ*Ô*ð "Øð DÝÐB LÐBÐB°KÐBÐBÐBÑCÔCÐCØ�Ø!Ð!Ð!Ð!øàð 6à+¨lÑ:ˆØð 	DØÐ5¸À¼ÑCÑCˆCÝŒm˜C #™I°dÈdÐSÑSÔSˆØð 	AØÐ'Ñ'ˆCØ�2—7’7Ð@Ð@°ZÐ@Ñ@Ô@Ñ@Ô@Ñ@ˆCØð 	ØÐF×MÒMØØñô ñ ˆCð ˆÝÐ4 Ð4Ð4¨Ð4Ð4¨sÐ4Ð4Ñ5Ô5Ð5ð6ð 6r   c                 óF   — t          t          | ||||||¦  «        ¦  «        S r‹   )r  r7  )r2  r,  r-   r  r  r.   r3  s          r   Úfind_jarr9  :  s2   € õ ÝØ˜+ x°¸SÀ'È8ñ	
ô 	
ñô ð r   c                 ó>   — d„ t          j        | ¦  «        D ¦   «         S )Nc                 ó†   — g | ]>\  }}}t          j        |d ¦  «        D ]"}t          j                             ||¦  «        ‘Œ#Œ?S )z*.jar)ÚfnmatchÚfilterr@   r?   rM   )r   rb   ÚdirnamesÚ	filenamesr  s        r   rn   z)find_jars_within_path.<locals>.<listcomp>K  sa   € ð ð ð á%ˆD�(˜IÝœ y°'Ñ:Ô:ðð ð õ 	Œ�Š�T˜8Ñ$Ô$ðð ð ð r   )r@   Úwalk)Úpath_to_jarss    r   Úfind_jars_within_pathrB  J  s-   € ðð å)+¬°Ñ)>Ô)>ðñ ô ð r   c                 óÞ   — t          | t          ¦  «        s| S t          t          j        dt          j        ¦   «         ¦  «        }|€|                      ¦   «         S |                      |¦  «        S )z/Convert data read from stdout/stderr to unicodeÚencoding)r   ÚbytesÚgetattrÚsysÚ
__stdout__ÚlocaleÚgetpreferredencodingÚdecode)Ú
stdoutdatarD  s     r   r	  r	  R  sb   € å�j¥%Ñ(Ô(ð ØÐå•s”~ zµ6Ô3NÑ3PÔ3PÑQÔQ€HØÐØ× Ò Ñ"Ô"Ð"Ø×Ò˜XÑ&Ô&Ð&r   c                 ó”   — t           j        }d„ t           j        D ¦   «         t           _        t          | ¦  «        }|t           _        |S )aÅ  
    When python is run from within the nltk/ directory tree, the
    current directory is included at the beginning of the search path.
    Unfortunately, that means that modules within nltk can sometimes
    shadow standard library modules.  As an example, the stdlib
    'inspect' module will attempt to import the stdlib 'tokenize'
    module, but will instead end up importing NLTK's 'tokenize' module
    instead (causing the import to fail).
    c                 ó   — g | ]}|d v¯|‘Œ	S ))rÂ   rþ   r:   r  s     r   rn   z&import_from_stdlib.<locals>.<listcomp>m  s"   € Ð:Ð:Ð:�a q°	Ð'9Ð'9�Ð'9Ð'9Ð'9r   )rG  r?   Ú
__import__)ÚmoduleÚold_pathrŸ   s      r   Úimport_from_stdlibrR  b  s;   € õ Œx€HØ:Ð:�3œ8Ð:Ñ:Ô:…C„HÝ�6ÑÔ€AØ…C„HØ€Hr   c                   óŒ   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ ZdS )ÚElementWrapperaž  
    A wrapper around ElementTree Element objects whose main purpose is
    to provide nicer __repr__ and __str__ methods.  In addition, any
    of the wrapped Element's methods that return other Element objects
    are overridden to wrap those values before returning them.

    This makes Elements more convenient to work with in
    interactive sessions and doctests, at the expense of some
    efficiency.
    c                 ón   — t          |t          ¦  «        r|S t                               t          ¦  «        S )z¥
        Create and return a wrapper around a given Element object.
        If ``etree`` is an ``ElementWrapper``, then ``etree`` is
        returned as-is.
        )r   rT  rì   rí   )r±   Úetrees     r   rí   zElementWrapper.__new__…  s-   € õ �e�^Ñ,Ô,ð 	2ØˆLå—>’>¥.Ñ1Ô1Ð1r   c                 óf   — t          |t          ¦  «        rddlm}  ||¦  «        }|| j        d<   dS )az  
        Initialize a new Element wrapper for ``etree``.

        If ``etree`` is a string, then it will be converted to an
        Element object using ``nltk.xmlsec.fromstring()`` first, which
        refuses documents that declare XML entities:

            >>> ElementWrapper("<test></test>")
            <Element "<?xml version='1.0' encoding='utf8'?>\n<test />">

        r   )Ú
fromstringÚ_etreeN)r   r   Únltk.xmlsecrX  r°   )r�   rV  Úsafe_fromstrings      r   rŒ   zElementWrapper.__init__�  sL   € õ �e�SÑ!Ô!ð 	+ð BÐAÐAÐAÐAÐAà#�O EÑ*Ô*ˆEØ"'ˆŒ�hÑÐÐr   c                 ó   — | j         S )zD
        Return the Element object wrapped by this wrapper.
        ©rY  r‘   s    r   ÚunwrapzElementWrapper.unwrap¤  s   € ð Œ{Ðr   c                 ó  — t          j        | j        d¬¦  «                             d¦  «        }t	          |¦  «        dk    rD|                     d¦  «        }t	          |¦  «        |z
  dk    rd}|d d…         › d||d …         › �}d|z  S )	NÚutf8©rD  é<   ú<é   iìÿÿÿz...z<Element %r>)r   ÚtostringrY  rK  r   Úrfind)r�   r�   r‡   s      r   Ú__repr__zElementWrapper.__repr__®  s�   € ÝÔ  ¤°vÐ>Ñ>Ô>×EÒEÀfÑMÔMˆÝˆq‰6Œ6�BŠ;ˆ;Ø—’˜‘”ˆAÝ�A‘”˜‘
˜bÒ Ð Ø�Ø�S�b�S”6Ð%Ð%˜a   œeÐ%Ð%ˆAØ Ñ!Ð!r   c                 ó‚   — t          j        | j        d¬¦  «                             d¦  «                             ¦   «         S )zs
        :return: the result of applying ``ElementTree.tostring()`` to
        the wrapped Element object.
        r`  ra  )r   re  rY  rK  rÉ   r‘   s    r   r’   zElementWrapper.__str__·  s8   € õ Ô  ¤°vÐ>Ñ>Ô>×EÒEÀfÑMÔM×TÒTÑVÔVð	
r   c                 ó,   — t          | j        |¦  «        S r‹   )rF  rY  )r�   Úattribs     r   Ú__getattr__zElementWrapper.__getattr__Ä  s   € Ý�t”{ FÑ+Ô+Ð+r   c                 ó.   — t          | j        ||¦  «        S r‹   )ÚsetattrrY  )r�   ÚattrÚvalues      r   Ú__setattr__zElementWrapper.__setattr__Ç  s   € Ý�t”{ D¨%Ñ0Ô0Ð0r   c                 ó,   — t          | j        |¦  «        S r‹   )ÚdelattrrY  )r�   rn  s     r   Ú__delattr__zElementWrapper.__delattr__Ê  s   € Ý�t”{ DÑ)Ô)Ð)r   c                 ó   — || j         |<   d S r‹   r]  )r�   ÚindexÚelements      r   Ú__setitem__zElementWrapper.__setitem__Í  s   € Ø$ˆŒ�EÑÐÐr   c                 ó   — | j         |= d S r‹   r]  ©r�   ru  s     r   Ú__delitem__zElementWrapper.__delitem__Ð  s   € ØŒK˜ÐÐÐr   c                 ó   — || j         ||…<   d S r‹   r]  )r�   ÚstartÚstopÚelementss       r   Ú__setslice__zElementWrapper.__setslice__Ó  s   € Ø"*ˆŒ�E˜$�JÑÐÐr   c                 ó   — | j         ||…= d S r‹   r]  ©r�   r|  r}  s      r   Ú__delslice__zElementWrapper.__delslice__Ö  s   € ØŒK˜˜d˜
Ð#Ð#Ð#r   c                 ó*   — t          | j        ¦  «        S r‹   )r   rY  r‘   s    r   Ú__len__zElementWrapper.__len__Ù  s   € Ý�4”;ÑÔÐr   c                 ó6   — t          | j        |         ¦  «        S r‹   )rT  rY  ry  s     r   Ú__getitem__zElementWrapper.__getitem__à  s   € Ý˜dœk¨%Ô0Ñ1Ô1Ð1r   c                 ó4   — d„ | j         ||…         D ¦   «         S )Nc                 ó,   — g | ]}t          |¦  «        ‘ŒS r:   ©rT  ©r   Úelts     r   rn   z/ElementWrapper.__getslice__.<locals>.<listcomp>ä  s    € ÐGÐGÐG¨•˜sÑ#Ô#ÐGÐGÐGr   r]  r�  s      r   Ú__getslice__zElementWrapper.__getslice__ã  s!   € ØGÐG¨t¬{¸5À¸:Ô/FÐGÑGÔGÐGr   c                 ó$   — d„ | j         D ¦   «         S )Nc                 ó,   — g | ]}t          |¦  «        ‘ŒS r:   r‰  rŠ  s     r   rn   z.ElementWrapper.getchildren.<locals>.<listcomp>ç  s    € Ð;Ð;Ð;¨•˜sÑ#Ô#Ð;Ð;Ð;r   r]  r‘   s    r   ÚgetchildrenzElementWrapper.getchildrenæ  s   € Ø;Ð;¨t¬{Ð;Ñ;Ô;Ð;r   Nc                 óJ   — d„ | j                              |¦  «        D ¦   «         S )Nc              3   ó4   K  — | ]}t          |¦  «        V — Œd S r‹   r‰  rŠ  s     r   r   z-ElementWrapper.getiterator.<locals>.<genexpr>ê  s*   è è € ÐLÐL¨•˜sÑ#Ô#ÐLÐLÐLÐLÐLÐLr   )rY  Úgetiterator)r�   Útags     r   r’  zElementWrapper.getiteratoré  s&   € ØLÐL¨t¬{×/FÒ/FÀsÑ/KÔ/KÐLÑLÔLÐLr   c                 óR   — t          | j                             ||¦  «        ¦  «        S r‹   )rT  rY  Úmakeelement)r�   r“  rj  s      r   r•  zElementWrapper.makeelementì  s"   € Ý˜dœk×5Ò5°c¸6ÑBÔBÑCÔCÐCr   c                 ó\   — | j                              |¦  «        }|€|S t          |¦  «        S r‹   )rY  ÚfindrT  )r�   r?   r‹  s      r   r—  zElementWrapper.findï  s/   € ØŒk×Ò˜tÑ$Ô$ˆØˆ;ØˆJå! #Ñ&Ô&Ð&r   c                 óJ   — d„ | j                              |¦  «        D ¦   «         S )Nc                 ó,   — g | ]}t          |¦  «        ‘ŒS r:   r‰  rŠ  s     r   rn   z*ElementWrapper.findall.<locals>.<listcomp>÷  s    € ÐIÐIÐI¨•˜sÑ#Ô#ÐIÐIÐIr   )rY  rÊ   )r�   r?   s     r   rÊ   zElementWrapper.findallö  s&   € ØIÐI¨t¬{×/BÒ/BÀ4Ñ/HÔ/HÐIÑIÔIÐIr   r‹   )r7   r8   r9   r“   rí   rŒ   r^  rg  r’   rk  rp  rs  rw  rz  r  r‚  r„  r†  rŒ  r�  r’  r•  r—  rÊ   r:   r   r   rT  rT  x  s^  € € € € € ð	ð 	ð	2ð 	2ð 	2ð(ð (ð (ð(ð ð ð"ð "ð "ð
ð 
ð 
ð,ð ,ð ,ð1ð 1ð 1ð*ð *ð *ð%ð %ð %ðð ð ð+ð +ð +ð$ð $ð $ð ð  ð  ð2ð 2ð 2ðHð Hð Hð<ð <ð <ðMð Mð Mð MðDð Dð Dð'ð 'ð 'ðJð Jð Jð Jð Jr   rT  c                 ól  — |j         |j        }}|rY|j        }|€d}|dk     r"t          | t	          ||¦  «        ¦  «        \  }}n!t          | t	          ||¦  «        ¦  «        \  }}|||fS |j        dvrt          d| j        j        z  ¦  «        ‚|€d}|€t          | ¦  «        }|dk     r t          dt          | ¦  «        |z   ¦  «        }|dk     r t          dt          | ¦  «        |z   ¦  «        }|dk    r,	 | |dz
            n# t          $ r t          | ¦  «        }Y nw xY wt          ||¦  «        }||fS )a   
    Given a slice, return the corresponding (start, stop) bounds,
    taking into account None indices and negative indices.  The
    following guarantees are made for the returned start and stop values:

      - 0 <= start <= len(sequence)
      - 0 <= stop <= len(sequence)
      - start <= stop

    :raise ValueError: If ``slice_obj.step`` is not None.
    :param allow_step: If true, then the slice object may have a
        non-None step.  If it does, then return a tuple
        (start, stop, step).
    Nr   r   r÷   z)slices with steps are not supported by %s)r|  r}  ÚstepÚslice_boundsÚslicer   r¶   r7   r   ÚmaxÚ
IndexErrorrÌ   )ÚsequenceÚ	slice_objÚ
allow_stepr|  r}  r›  s         r   rœ  rœ  ÿ  s|  € ð ”? I¤Nˆ4€Eð ð 
ØŒ~ˆØˆ<ØˆDð �!Š8ˆ8Ý& xµ°t¸UÑ1CÔ1CÑDÔD‰KˆE�4�4å& xµ°u¸dÑ1CÔ1CÑDÔD‰KˆE�4Ø�d˜DÐ Ð ð 
Œ˜yÐ	(Ð	(ÝØ7¸(Ô:LÔ:UÑUñ
ô 
ð 	
ð
 €}ØˆØ€|Ý�8‰}Œ}ˆð ˆq‚y€yÝ�A•s˜8‘}”} uÑ,Ñ-Ô-ˆØˆa‚x€xÝ�1•c˜(‘m”m dÑ*Ñ+Ô+ˆð
 ˆa‚x€xð	!Ø�T˜A‘XÔÐÐøÝð 	!ð 	!ð 	!Ý�x‘=”=ˆDˆDˆDð	!øøøõ ��tÑÔ€Eð �$ˆ;Ðs   Ã7D ÄDÄDc                 ó�  — t           j                             | ¦  «        sdS t          t           d¦  «        r�t          j        | ¦  «        }t	          j        |j        ¦  «        }|dz  rdS |j        t          j        ¦   «         k    r|dz  rdS |j	        t          j
        ¦   «         gt          j        ¦   «         z   v r|dz  rdS dS dS )NFÚgetuidr   Té€   é   )r@   r?   r  ÚhasattrÚstatÚS_IMODEÚst_modeÚst_uidr¤  Úst_gidÚgetgidÚ	getgroups)r?   ÚstatdataÚperms      r   Úis_writabler±  F  s¾   € åŒ7�>Š>˜$ÑÔð Øˆuõ �r�8ÑÔð Ý”7˜4‘=”=ˆÝŒ|˜HÔ,Ñ-Ô-ˆà�%‰<ð 
	Ø�4àŒ_¥¤	¡¤Ò+Ð+°¸±Ð+Ø�4àŒo¥"¤)¡+¤+ µ´±´Ñ!?Ð?Ð?ÀdÈUÁlÐ?Ø�4ð �5ð ˆ4r   c           
      ó|   — t          dt          |¦  «        j        ›d| ›dt          |¦  «        j        ›d�¦  «        ‚)Nzunorderable types: z() rs   z())rt   r¼   r7   )ÚorderingÚaÚbs      r   Úraise_unorderable_typesr¶  f  sD   € Ý
ˆ)å�‰7Œ7ÔÐÐ˜X˜X˜X¥t¨A¡w¤wÔ'7Ð'7Ð'7ð	9ñô ð r   )NNF)NNNNTNN)r:   r:   NNFF)r:   r:   NNF)Nr:   r:   NNF)Nr:   r:   NFF)F)8r<  rI  r@   r˜   r¨  rh   rG  rÍ   r³   rC   Ú	xml.etreer   Únltk.pathsecr   r1   r2   r!   Ú	frozensetr    r™   r   r   r(   r4   rI   r6   rc   r*   r   r‰   r–   r¢   r¥   r¨   r«   r­   rº   r·   rÔ   rã   rè   rñ   r  r   r"  r'  r0   r7  r9  rB  r	  rR  rT  rœ  r±  r¶  r:   r   r   ú<module>rº     sC  ðð €€€Ø €€€Ø 	€	€	€	Ø 	€	€	€	Ø €€€Ø Ð Ð Ð Ø 
€
€
€
Ø €€€Ø €€€Ø €€€Ø !Ð !Ð !Ð !Ð !Ð !à &Ð &Ð &Ð &Ð &Ð &ð €	Ø€ð.Ð ð �)˜Y¨	Ð2Ñ3Ô3€ð �"”*Ð4Ñ5Ô5€ð !�yÐ!?Ñ@Ô@Ð ðP
ð P
ð P
ðh#ð #ð #ð #ðD	ð 	ð 	ð 	ð 	˜	ñ 	ô 	ð 	ðIð Ið Ið\ Ø
ØØØØØð\
ð \
ð \
ð \
ðH>ð >ð >ð >ð >�
ñ >ô >ð >ð  �2”:Ð@ÑAÔAÐ ð8Hð 8Hð 8Hðv ˆrŒz˜(Ñ#Ô#€ð #ð  #ð  #ðF  �R”ZÐ 4Ñ5Ô5Ð ð#'ð #'ð #'ðV8ð 8ð 8ð>ð ð ð.ð ð ð*ð ð ð@)#ð )#ð )#ð )#ð )#ñ )#ô )#ð )#ðb
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð( ØØØØØðD6ð D6ð D6ð D6ðP NSðð ð ð ð NSðð ð ð ð ØØØØØð2
ð 2
ð 2
ð 2
ðn ØØØØØðð ð ð ð$ ØØØØØðK6ð K6ð K6ð K6ð` ØØØØØðð ð ð ð ð ð ð'ð 'ð 'ð ð ð ð,Jð Jð Jð Jð Jñ Jô Jð JðN?ð ?ð ?ð ?ðNð ð ð@ð ð ð ð r   