ó
    Í’Œj‰« ã            	       ó  • S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKJ	r	J
r
  S SKJr  S SKJr  S SKJrJr  S SKJr  S SKJr  S SKJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&  S SK'r'S SK(r(S S	K)J*r*  S S
K+J,r,J-r-J.r.J/r/  S SK0J1r1  SSK2J3r3J4r4J5r5  SSK6J7r7  SSK8J9r9J:r:  SSK;J<r<  SSK=J>r>J?r?J@r@  SSKAJBrBJCrC  SSKDJErE  SSKFJGrGJHrHJIrI  SSKJJKrKJLrLJMrMJNrNJOrO  SSKPJQrQ  SSKRJSrS  SSKTJUrU  SSKVJWrW  SSKXJYrYJZrZ  SSK[J\r\J]r]  SSK5J^r^J_r_J`r`JaraJbrbJcrcJdrdJereJfrf  SSKgJhrh  SSKiJjrjJkrk  \\U/\U4   rl\" \m5      RÜ                  S-  ro\5Rà                  " \o5      rq\" \m5      RÜ                  S -  rr\#" S!5      rs " S" S#5      rtS$\S%/\S4   4S& jruS' rv " S( S%5      rwS)\xS$\x4S* jry\ " S+ S,5      5       rz " S- S.\{5      r|S/\\Y   S$\\Y   4S0 jr}S1\\$\~\U\4   \s/\U4   S2\\S3\\U   4      S4\"\x\x\x4   S$S4S5 jr€ " S6 S75      r� " S8 S95      r‚\‚" 5       rƒg):é    N)Ú	ExitStackÚcontextmanager)Údeepcopy)Ú	dataclass)ÚchainÚcycle)ÚPath)Údefault_timer)ÚAnyÚCallableÚDictÚIterableÚIteratorÚListÚNoReturnÚOptionalÚPatternÚSequenceÚSetÚTupleÚTypeVarÚUnionÚcastÚoverload)ÚPool)ÚConfigÚCupyOpsÚ	OptimizerÚget_current_ops)Úconvert_recursiveé   )ÚaboutÚtyÚutil)ÚLiteral)ÚErrorsÚWarnings)ÚGIT_VERSION)ÚTOKENIZER_INFIXESÚTOKENIZER_PREFIXESÚTOKENIZER_SUFFIXES)ÚBASE_EXCEPTIONSÚ	URL_MATCH)Úload_lookups)Úanalyze_pipesÚprint_pipe_analysisÚvalidate_attrs)ÚConfigSchemaÚConfigSchemaInitÚConfigSchemaNlpÚConfigSchemaPretrainÚvalidate_init_settings)ÚScorer©Ú	Tokenizer)ÚDoc)Ú
Underscore)ÚExampleÚvalidate_examples)Úinit_tok2vecÚ
init_vocab)	Ú_DEFAULT_EMPTY_PIPESÚCONFIG_SECTION_ORDERÚSimpleFrozenDictÚSimpleFrozenListÚ_pipeÚcombine_score_weightsÚraise_errorÚregistryÚwarn_if_jupyter_cupy)ÚBaseVectors)ÚVocabÚcreate_vocabzdefault_config.cfgzdefault_config_pretraining.cfgÚ_AnyContextc                   óH  • \ rS rSr% Sr\" \S9r\\S'   \	r
\\\\   4   \S'   \r\\\\\4         \S'   \r\\\\\4         \S'   \r\\\\\4         \S'   S	r\\   \S
'   \r\\   \S'   0 r\\\4   \S'   0 r\\\\/\ 4   4   \S'   \!" 5       r"\#\   \S'   SSSS.r$Sr%g	)ÚBaseDefaultséX   zšLanguage data defaults, available via Language.Defaults. Can be
overwritten by language subclasses by defining their own subclasses of
Language.Defaults.
©Úsection_orderÚconfigÚtokenizer_exceptionsÚprefixesÚsuffixesÚinfixesNÚtoken_matchÚ	url_matchÚsyntax_iteratorsÚlex_attr_gettersÚ
stop_wordsÚltrT)Ú	directionÚhas_caseÚhas_letters© )&Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   rA   rR   Ú__annotations__r,   rS   r   Ústrr   Údictr*   rT   r   r   r   r   r+   rU   r)   rV   rW   r   r-   rX   rY   rZ   Úintr   Úsetr[   r   Úwriting_systemÚ__static_attributes__r`   ó    ÚœC:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\spacy/language.pyrN   rN   X   sö   ‡ ññ
 Ð*>Ñ?€FˆFÓ?Ø2AÐ˜$˜s D¨¡J˜Ñ/ÓAØ8J€Hˆh�x  c¨7 lÑ 3Ñ4Ñ5ÓJØ8J€Hˆh�x  c¨7 lÑ 3Ñ4Ñ5ÓJØ7H€GˆX�h˜u S¨' \Ñ2Ñ3Ñ4ÓHØ&*€K�˜(Ñ#Ó*Ø$-€Iˆx˜Ñ!Ó-Ø,.Ð�d˜3 ˜=Ñ)Ó.Ø8:Ð�d˜3 ¨#¨°¨Ñ 4Ð4Ñ5Ó:Ù›5€J��C‘Ó Ø#(°dÈ4ÑPƒNrm   rN   ÚreturnÚLanguagec                  ó    • SSS[         4S jn U $ )z•Registered function to create a tokenizer. Returns a factory that takes
the nlp object and returns a Tokenizer instance using the language detaults.
Únlprp   ro   c           
      ó&  • U R                   R                  nU R                   R                  nU R                   R                  nU(       a   [        R
                  " U5      R                  OS nU(       a   [        R                  " U5      R                  OS nU(       a   [        R                  " U5      R                  OS n[        U R                  U R                   R                  UUUU R                   R                  U R                   R                  S9$ )N)ÚrulesÚprefix_searchÚsuffix_searchÚinfix_finditerrW   rX   )ÚDefaultsrT   rU   rV   r$   Úcompile_prefix_regexÚsearchÚcompile_suffix_regexÚcompile_infix_regexÚfinditerr9   ÚvocabrS   rW   rX   )rr   rT   rU   rV   ru   rv   rw   s          rn   Útokenizer_factoryÚ+create_tokenizer.<locals>.tokenizer_factoryp   sÄ   € Ø—<‘<×(Ñ(ˆØ—<‘<×(Ñ(ˆØ—,‘,×&Ñ&ˆÞFNœ×1Ò1°(Ó;×BÒBÐTXˆÞFNœ×1Ò1°(Ó;×BÒBÐTXˆÞGNœ×1Ò1°'Ó:×CÒCÐTXˆÜØ�I‰IØ—,‘,×3Ñ3Ø'Ø'Ø)ØŸ™×0Ñ0Ø—l‘l×,Ñ,ñ
ð 	
rm   r8   )r   s    rn   Úcreate_tokenizerr�   k   s   € ð

˜zð 
¬iô 
ð" Ðrm   c                 óX   • [         R                  R                  SU5        [        XS9nU$ )Nz+Loading lookups from spacy-lookups-data: %s)ÚlangÚtables)r$   ÚloggerÚdebugr.   )rƒ   r„   Úlookupss      rn   Úload_lookups_datarˆ   „   s&   € Ü‡K�K×ÑÐCÀVÔLÜ Ñ4€GØ€Nrm   c                   óº  ^ • \ rS rSr% Sr\rSr\\	   \
S'   \r\" \R                  S9r0 r\\	S4   \
S'    S¡S	0 SSS
S.S\\\4   S\S\\	\4   S\\S /\\	/\4   4      S\\S/\4      S\SS4S jjjrU 4S jr\S 5       r\S\\	\4   4S j5       r\R@                  S\\	\4   SS4S j5       r\S\!4S j5       r"\"R@                  S\!SS4S j5       r"\S\#\	   4S j5       r$\S\#\	   4S j5       r%\S\#\&\	\'4      4S j5       r(\S\#\	   4S j5       r)\S\#\&\	\'4      4S  j5       r*\S\#\	   4S! j5       r+\S\\	\	4   4S" j5       r,\S\\	\#\	   4   4S# j5       r-\.S$\	S\4S% j5       r/\.S$\	S\	4S& j5       r0\.S$\	SS4S' j5       r1\.S$\	SSSS4S( j5       r2S$\	SS4S) jr3S$\	S\!4S* jr4\.\" 5       \5" 5       \5" 5       S+\" 5       SS,.S$\	S-\\	\4   S.\6\	   S/\6\	   S0\S1\\	\\7   4   S2\\   S\4S3 jj5       r8\.\5" 5       \5" 5       S+SS4.S$\	S.\6\	   S/\6\	   S0\S2\\'   S\S5\4   4S6 jj5       r9/ S7QS+S8.S9\#\	   S:\S\\\	\4      4S; jjr:S$\	S\'4S< jr; S¢\" 5       SSS=.S>\	S$\\	   S?\\	\4   S@\\!   SA\S\'4SB jjjr<SC\	SDS S$\	S\&\'\	4   4SE jr= S¢SSSSS\" 5       SSSF.S>\	S$\\	   SG\\\	\4      SH\\\	\4      SI\\   SJ\\   SD\S    S?\\	\4   S@\\!   SA\S\'4SK jjjr>    S£SG\\\	\4      SH\\\	\4      SI\\   SJ\\   S\4
SL jjr?S$\	S\4SM jr@\" 5       SSN.S$\	S>\	S?\\	\4   SA\S\'4
SO jjrASP\	SQ\	SS4SR jrBS$\	S\&\	\'4   4SS jrCS$\	SS4ST jrDS$\	SS4SU jrE\5" 5       SSV.SW\\	\4   SX\6\	   SY\\\	\\	\4   4      S\4SZ jjrFS¤S\ jrGSSS].SX\\\	\6\	   4      S^\\\	\6\	   4      SS[4S_ jjrHSW\	S\4S` jrISa\\	\\J4   S\4Sb jrKSa\\	\\J4   Sc\LS\4Sd jrM S¢SeSSS\5" 5       \5" 5       Sf.Sg\6\N   Sh\\   Si\7Sj\\O   Sk\\\	\74      SY\\\	\\	\4   4      Sl\6\	   Sm\6\	   4Sn jjjrPSSS\5" 5       So.Sg\6\N   Sj\\O   Sk\\\	\74      SY\\\	\\	\4   4      Sl\6\	   S\\	\74   4Sp jjrQ S¢SSq.Sr\\/ \6\N   4      Sj\\O   S\O4Ss jjjrR S¢SSq.Sr\\/ \6\N   4      Sj\\O   S\O4St jjjrSSSq.Sj\\O   S\O4Su jjrTSv\\	\'\#\   \U/\V4   4Sw jrWSSSSS+Sx.Sg\6\N   S\\   Sy\\X   SY\\\	\\	\4   4      Sz\\\	\4      S{\S\\	\4   4S| jjrYS} rZ\[S~\\\   4S j5       r]\^S5S5S5S5S5S€.S�\6\\	\4      S‚\_S+   S\\   SX\6\	   SY\\\	\\	\4   4      Sƒ\S\`\   4S„ jj5       ra\^S5S5S5S5S5S€.S�\6\&\\	\4   \L4      S‚\_S   S\\   SX\6\	   SY\\\	\\	\4   4      Sƒ\S\`\&\\L4      4S… jj5       raS+S\5" 5       SS†S€.S�\\6\\	\4      \6\&\\	\4   \L4      4   S‚\S\\   SX\6\	   SY\\\	\\	\4   4      Sƒ\S\\`\   \`\&\\L4      4   4S‡ jjraSX\6\	   4Sˆ jrbS�\6\\	\4      S‰\6\S5\`\   4      Sƒ\S\S\`\   4
SŠ jrcS¥S‹ jrd\.0 4S\e\e\e\" 5       SSSŒ.S?\\\	\4   \!4   S\\\4   SX\\	\6\	   4   S^\\	\6\	   4   Sl\\	\6\	   4   S\\	\4   S�\SA\SS 4SŽ jjj5       rfS�\	S�\	S‘\6\	   SS4S’ jrg\[S¢S“\\h   S\`\h   4S” jj5       ri\5" 5       S•.S–\\	\j4   Sl\6\	   SS4S— jjrk\lSX\\	\6\	   4   S^\\	\6\	   4   S˜\6\	   S\&\	S54   4S™ j5       rm\5" 5       \" 5       Sš.S–\\	\j4   Sl\6\	   S›\\	\4   SS 4Sœ jjrn\5" 5       S•.Sl\6\	   S\J4S� jjro\5" 5       S•.Sž\JSl\6\	   SS 4SŸ jjrpS rqU =rr$ )¦rp   éŠ   ao  A text-processing pipeline. Usually you'll load this once per process,
and pass the instance around your application.

Defaults (class): Settings, data and factory methods for creating the `nlp`
    object and processing pipeline.
lang (str): Two-letter ISO 639-1 or three-letter ISO 639-3 language codes, such as 'en' and 'eng'.

DOCS: https://spacy.io/api/language
Nrƒ   ©ÚerrorÚFactoryMetaÚ_factory_metaTi@B iè  )Ú
max_lengthÚmetar�   Úcreate_vectorsÚ
batch_sizer~   r�   r�   r�   r‘   rJ   r’   ro   c                óÞ  • SSK Jn  U" 5         [        R                  R                  R                  5         [        R                  U R                  5      U l	        [        U5      U l        SU l        SU l        0 U l        0 U l        [!        U["        5      (       d9  USLa4  [%        [&        R(                  R+                  U[-        ["        5      S95      eUSL a‚  UR/                  S0 5      R/                  S5      n	[1        U R2                  U R4                  U	S9nU(       d-  SU R                  S	   S   0n
[        R6                  " U
5      S   nU" U5      Ul        OwU R2                  (       af  UR2                  (       aU  U R2                  UR2                  :w  a;  [%        [&        R:                  R+                  U R2                  UR2                  S
95      eXl        U R2                  c  U R<                  R2                  U l        / U l        [A        5       U l!        X l"        U(       d-  SU R                  S	   S   0n[        R6                  " U5      S   nU" U 5      U l#        X`l$        [J        U l&        g)a�  Initialise a Language object.

vocab (Vocab): A `Vocab` object. If `True`, a vocab is created.
meta (dict): Custom meta data for the Language class. Is written to by
    models to add model meta data.
max_length (int): Maximum number of characters in a single text. The
    current models may run out memory on extremely long texts, due to
    large internal allocations. You should segment these texts into
    meaningful units, e.g. paragraphs, subsections etc, before passing
    them to spaCy. Default maximum length is 1,000,000 charas (1mb). As
    a rule of thumb, if all pipeline components are enabled, spaCy's
    default models currently requires roughly 1GB of temporary memory per
    100,000 characters in one text.
create_tokenizer (Callable): Function that takes the nlp object and
    returns a tokenizer.
batch_size (int): Default batch size for pipe and evaluate.

DOCS: https://spacy.io/api/language#init
r!   )Úregister_factoriesNT)r~   Ú
vocab_typeÚvectorsÚname)Úvectors_namerr   )rr   r~   Ú	tokenizer)'Úpipeline.factoriesr”   r$   rG   Ú_entry_point_factoriesÚget_allÚDEFAULT_CONFIGÚmergeÚdefault_configÚ_configrh   Ú_metaÚ_pathÚ
_optimizerÚ
_pipe_metaÚ_pipe_configsÚ
isinstancerJ   Ú
ValueErrorr&   ÚE918ÚformatÚtypeÚgetrK   rƒ   rx   Úresolver–   ÚE150r~   Ú_componentsrj   Ú	_disabledr�   r™   r’   rF   Údefault_error_handler)Úselfr~   r�   r�   r�   r‘   r’   Úkwargsr”   r˜   Úvectors_cfgÚtokenizer_cfgs               rn   Ú__init__ÚLanguage.__init__œ   sÑ  € õ< 	;áÔô 	�‰×,Ñ,×4Ñ4Ô6ä%×+Ñ+¨D×,?Ñ,?Ó@ˆŒÜ˜$“ZˆŒ
ØˆŒ
Ø/3ˆŒà46ˆŒØ02ˆÔä˜%¤×'Ñ'¨E¸Ò,=ÜœVŸ[™[×/Ñ/°eÌÌUËÐ/ÐTÓUÐUØ�DŠ=ØŸ8™8 I¨rÓ2×6Ñ6°vÓ>ˆLÜ  §¡¨D¯M©MÈÑUˆEÞ!Ø(¨$¯,©,°uÑ*=¸iÑ*HÐI�Ü!)×!1Ò!1°+Ó!>¸yÑ!I�Ù*¨5Ó1ˆE�Mà—	—	˜eŸjŸj¨t¯y©y¸E¿J¹JÓ/FÜ ¤§¡×!3Ñ!3¸¿	¹	ÈÏÉÐ!3Ð!TÓUÐUØ!Œ
Ø�9‰9ÑØŸ
™
Ÿ™ˆDŒIØ;=ˆÔÜ#&£5ˆŒØ$ŒæØ(¨$¯,©,°uÑ*=¸kÑ*JÐKˆMÜ'×/Ò/°Ó>¸{ÑKÐÙ)¨$Ó/ˆŒØ$ŒÜ%0ˆÕ"rm   c                 óº   >• [         TU ]  " S0 UD6  [        R                  U R                  R
                  5      U l        U R                  U R                  S   S'   g )Nrr   rƒ   r`   )ÚsuperÚ__init_subclass__r�   rž   rx   rR   rŸ   rƒ   )Úclsr²   Ú	__class__s     €rn   r¹   ÚLanguage.__init_subclass__ä   sI   ø€ Ü‰Ò!Ñ+ FÒ+Ü+×1Ñ1°#·,±,×2EÑ2EÓFˆÔØ,/¯H©Hˆ×Ñ˜5Ñ! &Ò)rm   c                 ó   • U R                   $ ©N)r¢   ©r±   s    rn   ÚpathÚLanguage.pathé   s   € à�z‰zÐrm   c                 ó–  • [         R                  " [        R                  5      nU R                  R
                  (       a1  U R                  R                  SU R                  R
                  5        O&U R                  R                  SU R
                  5        U R                  R                  SS5        U R                  R                  SS5        U R                  R                  SU5        U R                  R                  SS5        U R                  R                  S	S5        U R                  R                  S
S5        U R                  R                  SS5        U R                  R                  SS5        U R                  R                  S[        5        U R                  R                  [        U R                  R                  5      U R                  R                  R                  U R                  R                  R                  U R                  R                  R                  S.U R                  S'   [        U R                   5      U R                  S'   [#        U R$                  5      U R                  S'   [#        U R&                  5      U R                  S'   [#        U R(                  5      U R                  S'   U R                  $ )z¿Custom meta data of the language class. If a model is loaded, this
includes details from the model's meta.json.

RETURNS (Dict[str, Any]): The meta.

DOCS: https://spacy.io/api/language#meta
rƒ   r—   ÚpipelineÚversionz0.0.0Úspacy_versionÚdescriptionÚ ÚauthorÚemailÚurlÚlicenseÚspacy_git_version)Úwidthr–   Úkeysr—   Úmoder–   ÚlabelsÚ
componentsÚdisabled)r$   Úget_minor_version_ranger"   Ú__version__r~   rƒ   r¡   Ú
setdefaultr(   Úvectors_lengthÚlenr–   Ún_keysr—   rÏ   rh   Úpipe_labelsÚlistÚ
pipe_namesÚcomponent_namesrÒ   )r±   rÅ   s     rn   r�   ÚLanguage.metaí   sä  € ô ×4Ò4´U×5FÑ5FÓGˆØ�:‰:�?�?Ø�J‰J×!Ñ! &¨$¯*©*¯/©/Õ:à�J‰J×!Ñ! &¨$¯)©)Ô4Ø�
‰
×Ñ˜f jÔ1Ø�
‰
×Ñ˜i¨Ô1Ø�
‰
×Ñ˜o¨}Ô=Ø�
‰
×Ñ˜m¨RÔ0Ø�
‰
×Ñ˜h¨Ô+Ø�
‰
×Ñ˜g rÔ*Ø�
‰
×Ñ˜e RÔ(Ø�
‰
×Ñ˜i¨Ô,Ø�
‰
×ÑÐ1´;Ô?à—Z‘Z×.Ñ.Ü˜4Ÿ:™:×-Ñ-Ó.Ø—J‘J×&Ñ&×-Ñ-Ø—J‘J×&Ñ&×+Ñ+Ø—J‘J×&Ñ&×+Ñ+ñ!
ˆ�
‰
�9Ñô  $ D×$4Ñ$4Ó5ˆ�
‰
�8Ñô "& d§o¡oÓ!6ˆ�
‰
�:ÑÜ#'¨×(<Ñ(<Ó#=ˆ�
‰
�<Ñ Ü!% d§m¡mÓ!4ˆ�
‰
�:ÑØ�z‰zÐrm   Úvaluec                 ó   • Xl         g r¾   )r¡   ©r±   rÞ   s     rn   r�   rÝ     s   € à�
rm   c                 ó„  • U R                   R                  S0 5        U R                   R                  S0 5        U R                  U R                   S   S'   0 n/ nU R                   He  nU R	                  U5      nU R                  U5      nSUR                  0UEX'   UR                  (       d  MJ  UR                  UR                  5        Mg     [        U R                  5      U R                   S   S'   [        U R                  5      U R                   S   S'   XR                   S'   U R                   S   R                  S0 5      n[        X&5      nXpR                   S   S'   [        R                  " U R                   5      (       d0  [        [         R"                  R%                  U R                   S	95      eU R                   $ )
z×Trainable config for the current language instance. Includes the
current pipeline components, as well as default training config.

RETURNS (thinc.api.Config): The config.

DOCS: https://spacy.io/api/language#config
rr   Útrainingrƒ   ÚfactoryrÃ   rÒ   rÑ   Úscore_weights©rR   )r    rÕ   rƒ   rÜ   Úget_pipe_metaÚget_pipe_configrã   Údefault_score_weightsÚappendrÚ   rÒ   r«   rE   ÚsrslyÚis_json_serializabler§   r&   ÚE961r©   )r±   rÃ   rä   Ú	pipe_nameÚ	pipe_metaÚpipe_configÚprev_weightsÚcombined_score_weightss           rn   rR   ÚLanguage.config  sx  € ð 	�‰×Ñ  rÔ*Ø�‰×Ñ 
¨BÔ/Ø&*§i¡iˆ�‰�UÑ˜FÑ#ð ˆØˆØ×-Ô-ˆIØ×*Ñ*¨9Ó5ˆIØ×.Ñ.¨yÓ9ˆKØ#,¨i×.?Ñ.?Ð"OÀ;Ð"OˆHÑØ×.×.Ñ.Ø×$Ñ$ Y×%DÑ%DÖEñ .ô +/¨t×/CÑ/CÓ*Dˆ�‰�UÑ˜JÑ'Ü*.¨t¯}©}Ó*=ˆ�‰�UÑ˜JÑ'Ø%-�‰�\Ñ"ð —|‘| JÑ/×3Ñ3°OÀRÓHˆÜ!6°}Ó!SÐØ4J�‰�ZÑ  Ñ1Ü×)Ò)¨$¯,©,×7Ñ7ÜœVŸ[™[×/Ñ/°t·|±|Ð/ÐDÓEÐEØ�|‰|Ðrm   c                 ó   • Xl         g r¾   )r    rà   s     rn   rR   rò   :  s   € à�rm   c                 óº   • U R                    VVs/ s H  u  pXR                  ;   d  M  UPM     nnn[        U[        R                  R                  SS9S9$ s  snnf )zYGet the names of all disabled components.

RETURNS (List[str]): The disabled components.
rÒ   ©Úattrr‹   ©r®   r¯   rC   r&   ÚE926r©   )r±   r—   Ú_Únamess       rn   rÒ   ÚLanguage.disabled>  sP   € ð &*×%5Ò%5ÔPÒ%5™'˜$¸ÇÁÑ9O—Ñ%5ˆÑPÜ ¬V¯[©[×-?Ñ-?ÀZÐ-?Ð-PÑQÐQùó Qs
   �A©Ac                 ó^   • [        U R                  R                  5       5      n[        U5      $ )zOGet names of all available factories.

RETURNS (List[str]): The factory names.
)rÚ   Ú	factoriesrÎ   rC   ©r±   rú   s     rn   Úfactory_namesÚLanguage.factory_namesI  s&   € ô �T—^‘^×(Ñ(Ó*Ó+ˆÜ Ó&Ð&rm   c                 ó`   • [        U R                  [        R                  R	                  SS9S9$ )z_Get all (name, component) tuples in the pipeline, including the
currently disabled components.
rÑ   rõ   r‹   )rC   r®   r&   rø   r©   r¿   s    rn   rÑ   ÚLanguage.componentsR  s.   € ô
  Ø×Ñ¤F§K¡K×$6Ñ$6¸LÐ$6Ð$Iñ
ð 	
rm   c                 ó˜   • U R                    VVs/ s H  u  pUPM	     nnn[        U[        R                  R	                  SS9S9$ s  snnf )zªGet the names of the available pipeline components. Includes all
active and inactive pipeline components.

RETURNS (List[str]): List of component name strings, in order.
rÜ   rõ   r‹   )r®   rC   r&   rø   r©   ©r±   rí   rù   rú   s       rn   rÜ   ÚLanguage.component_names[  sH   € ð 04×/?Ò/?Ô@Ò/?™|˜y“Ñ/?ˆÑ@Ü ¬V¯[©[×-?Ñ-?ÐEVÐ-?Ð-WÑXÐXùó Aó   �Ac                 ó¼   • U R                    VVs/ s H  u  pXR                  ;  d  M  X4PM     nnn[        U[        R                  R                  SS9S9$ s  snnf )zÒThe processing pipeline consisting of (name, component) tuples. The
components are called on the Doc in order as it passes through the
pipeline.

RETURNS (List[Tuple[str, Callable[[Doc], Doc]]]): The pipeline.
rÃ   rõ   r‹   r÷   )r±   ÚnÚpÚpipess       rn   rÃ   ÚLanguage.pipelinee  sT   € ð %)×$4Ò$4ÔPÒ$4™D˜A¸ÇÁÑ8O“�!“Ñ$4ˆÑPÜ ¬V¯[©[×-?Ñ-?ÀZÐ-?Ð-PÑQÐQùó Qs
   �A©Ac                 ó˜   • U R                    VVs/ s H  u  pUPM	     nnn[        U[        R                  R	                  SS9S9$ s  snnf )zsGet names of available active pipeline components.

RETURNS (List[str]): List of component name strings, in order.
rÛ   rõ   r‹   )rÃ   rC   r&   rø   r©   r  s       rn   rÛ   ÚLanguage.pipe_namesp  sB   € ð 04¯}ª}Ô=ª}™|˜y“©}ˆÑ=Ü ¬V¯[©[×-?Ñ-?À\Ð-?Ð-RÑSÐSùó >r  c                 ó€   • 0 nU R                    H"  u  p#U R                  U5      R                  X'   M$     [        U5      $ )z‡Get the component factories for the available pipeline components.

RETURNS (Dict[str, str]): Factory names, keyed by component names.
)r®   ræ   rã   rB   )r±   rý   rí   Úpipes       rn   Úpipe_factoriesÚLanguage.pipe_factoriesy  s?   € ð ˆ	Ø#×/Ô/‰OˆIØ#'×#5Ñ#5°iÓ#@×#HÑ#HˆIÓ ñ  0ä 	Ó*Ð*rm   c                 óÞ   • 0 nU R                    HQ  u  p#[        US5      (       a  UR                  SL a  M'  [        US5      (       d  M:  [        UR                  5      X'   MS     [        U5      $ )zÉGet the labels set by the pipeline components, if available (if
the component exposes a labels property and the labels are not
hidden).

RETURNS (Dict[str, List[str]]): Labels keyed by component name.
Úhide_labelsTrÐ   )r®   Úhasattrr  rÚ   rÐ   rB   )r±   rÐ   r—   r  s       rn   rÙ   ÚLanguage.pipe_labels„  sb   € ð ˆØ×*Ô*‰JˆDÜ�t˜]×+Ñ+°×0@Ñ0@ÀDÒ0HÙÜ�t˜X×&Ó&Ü# D§K¡KÓ0�“ñ	 +ô
   Ó'Ð'rm   r—   c                 ó~   • U R                  U5      nU[        R                  ;   =(       d    U[        R                  ;   $ )z=RETURNS (bool): Whether a factory of that name is registered.)Úget_factory_namerG   rý   ©rº   r—   Úinternal_names      rn   Úhas_factoryÚLanguage.has_factory”  s5   € ð ×,Ñ,¨TÓ2ˆØ”x×)Ñ)Ñ)×P¨]¼h×>PÑ>PÑ-PÐPrm   c                 óB   • U R                   c  U$ U R                    SU 3$ )z‡Get the internal factory name based on the language subclass.

name (str): The factory name.
RETURNS (str): The internal factory name.
Ú.)rƒ   )rº   r—   s     rn   r  ÚLanguage.get_factory_nameš  s(   € ð �8‰8ÑØˆKØ—(‘(�˜1˜T˜FÐ#Ð#rm   c                 óê   • U R                  U5      nX R                  ;   a  U R                  U   $ XR                  ;   a  U R                  U   $ [        [        R                  R                  SUS95      e)z˜Get the meta information for a given factory name.

name (str): The component factory name.
RETURNS (FactoryMeta): The meta for the given factory name.
rã   ©r�   r—   )r  rŽ   r§   r&   ÚE967r©   r  s      rn   Úget_factory_metaÚLanguage.get_factory_meta¥  sm   € ð ×,Ñ,¨TÓ2ˆØ×-Ñ-Ó-Ø×$Ñ$ ]Ñ3Ð3Ø×$Ñ$Ó$Ø×$Ñ$ TÑ*Ð*ÜœŸ™×+Ñ+°ÀÐ+ÐFÓGÐGrm   c                 ó>   • X R                   U R                  U5      '   g)z‚Set the meta information for a given factory name.

name (str): The component factory name.
value (FactoryMeta): The meta to set.
N)rŽ   r  )rº   r—   rÞ   s      rn   Úset_factory_metaÚLanguage.set_factory_meta³  s   € ð 9>×Ñ˜#×.Ñ.¨tÓ4Ò5rm   c                 óŒ   • XR                   ;  a'  [        [        R                  R	                  SUS95      eU R                   U   $ )z”Get the meta information for a given component name.

name (str): The component name.
RETURNS (FactoryMeta): The meta for the given component name.
Ú	componentr   )r¤   r§   r&   r!  r©   ©r±   r—   s     rn   ræ   ÚLanguage.get_pipe_meta¼  s<   € ð —‘Ó&ÜœVŸ[™[×/Ñ/°[ÀtÐ/ÐLÓMÐMØ�‰˜tÑ$Ð$rm   c                 óŽ   • XR                   ;  a&  [        [        R                  R	                  US95      eU R                   U   nU$ )z™Get the config used to create a pipeline component.

name (str): The component name.
RETURNS (Config): The config used to create the pipeline component.
©r—   )r¥   r§   r&   ÚE960r©   )r±   r—   rï   s      rn   rç   ÚLanguage.get_pipe_configÆ  sC   € ð ×)Ñ)Ó)ÜœVŸ[™[×/Ñ/°TÐ/Ð:Ó;Ð;Ø×(Ñ(¨Ñ.ˆØÐrm   F)rŸ   ÚassignsÚrequiresÚretokenizesrè   ÚfuncrŸ   r/  r0  r1  rè   r2  c                ó¼  ^ ^^^^^^• [        T[        5      (       d&  [        [        R                  R                  SS95      eST;   a&  [        [        R                  R                  TS95      e[        T[        5      (       d3  [        R                  R                  ST[        T5      S9n[        U5      eS[        S[        4UU UUUUU4S	 jjn	Ub  U	" U5      $ U	$ )
aÞ  Register a new pipeline component factory. Can be used as a decorator
on a function or classmethod, or called as a function with the factory
provided as the func keyword argument. To create a component and add
it to the pipeline, you can use nlp.add_pipe(name).

name (str): The name of the component factory.
default_config (Dict[str, Any]): Default configuration, describing the
    default values of the factory arguments.
assigns (Iterable[str]): Doc/Token attributes assigned by this component,
    e.g. "token.ent_id". Used for pipeline analysis.
requires (Iterable[str]): Doc/Token attributes required by this component,
    e.g. "token.ent_id". Used for pipeline analysis.
retokenizes (bool): Whether the component changes the tokenization.
    Used for pipeline analysis.
default_score_weights (Dict[str, Optional[float]]): The scores to report during
    training, and their default weight towards the final score used to
    select the best model. Weights should sum to 1.0 per component and
    will be combined and normalized for the whole pipeline. If None,
    the score won't be shown in the logs or be weighted.
func (Optional[Callable]): Factory function if not used as a decorator.

DOCS: https://spacy.io/api/language#factory
rã   ©Ú	decoratorr  r,  zdefault config©Ústyler—   Úcfg_typeÚfactory_funcro   c           
      óè  >• TR                  T
5      nU[        R                  ;   ac  [        R                  R                  U5      n[        R
                  " X5      (       d)  [        R                  R                  T
X S9n[        U5      e[        R                  " U 5      nSU;  d  SU;  a&  [        [        R                  R                  T
S95      e[        R                  R                  XS9  [        T
T[        T5      [        T5      [        T	R!                  5       5      T	TS9nTR#                  T
U5        [%        [        R                  R'                  5       [        R(                  S9Tl        U $ )N)r—   r2  Únew_funcrr   r—   r,  )r2  )rã   rŸ   r/  r0  Úscoresrè   r1  r‹   )r  rG   rý   r«   r$   Úis_same_funcr&   ÚE004r©   r§   Úget_arg_namesÚE964Úregisterr�   r1   rÚ   rÎ   r%  rB   rœ   ÚE957)r9  r  Úexisting_funcÚerrÚ	arg_namesÚfactory_metar/  rº   rŸ   rè   r—   r0  r1  s         €€€€€€€rn   Úadd_factoryÚ%Language.factory.<locals>.add_factoryþ  sA  ø€ Ø×0Ñ0°Ó6ˆMØ¤× 2Ñ 2Ó2ô
 !)× 2Ñ 2× 6Ñ 6°}Ó E�Ü×(Ò(¨×EÑEÜ Ÿ+™+×,Ñ,Ø!¨ð -ð �Cô % S›/Ð)ä×*Ò*¨<Ó8ˆIØ˜IÓ%¨°yÓ)@Ü ¤§¡×!3Ñ!3¸Ð!3Ð!>Ó?Ð?ô
 ×Ñ×'Ñ'¨Ð'ÑIÜ&ØØ-Ü& wÓ/Ü'¨Ó1ÜÐ1×6Ñ6Ó8Ó9Ø&;Ø'ñˆLð × Ñ   |Ô4ô
 -Ü×"Ñ"×*Ñ*Ó,´F·K±KñˆCŒMð  Ðrm   )r¦   rg   r§   r&   ÚE963r©   ÚE853rh   ÚE962rª   r   )
rº   r—   rŸ   r/  r0  r1  rè   r2  rD  rG  s
   ```````   rn   rã   ÚLanguage.factoryÑ  sÄ   þ€ ôF ˜$¤×$Ñ$ÜœVŸ[™[×/Ñ/¸)Ð/ÐDÓEÐEØ�$‹;ÜœVŸ[™[×/Ñ/°TÐ/Ð:Ó;Ð;Ü˜.¬$×/Ñ/Ü—+‘+×$Ñ$Ø&¨T¼DÀÓ<Pð %ð ˆCô ˜S“/Ð!ð'	 ¤hð '	 ´8÷ '	 õ '	 ðR ÑÙ˜tÓ$Ð$ØÐrm   ©r/  r0  r1  r2  .c                óh  ^ ^^^^^^• Tbg  [        T[        5      (       d&  [        [        R                  R                  SS95      eST;   a&  [        [        R                  R                  TS95      eTb  TO[        R                  " T5      mS[        S[        4UU UUUUU4S jjnTb  U" T5      $ U$ )ah  Register a new pipeline component. Can be used for stateless function
components that don't require a separate factory. Can be used as a
decorator on a function or classmethod, or called as a function with the
factory provided as the func keyword argument. To create a component and
add it to the pipeline, you can use nlp.add_pipe(name).

name (str): The name of the component factory.
assigns (Iterable[str]): Doc/Token attributes assigned by this component,
    e.g. "token.ent_id". Used for pipeline analysis.
requires (Iterable[str]): Doc/Token attributes required by this component,
    e.g. "token.ent_id". Used for pipeline analysis.
retokenizes (bool): Whether the component changes the tokenization.
    Used for pipeline analysis.
func (Optional[Callable[[Doc], Doc]): Factory function if not used as a decorator.

DOCS: https://spacy.io/api/language#component
r(  r4  r  r,  Úcomponent_funcro   c                 ó
  >^ • [        T
[        5      (       a&  [        [        R                  R                  T	S95      eS[        S[        4U 4S jjnTR                  T5      nU[        R                  ;   at  [        R                  R                  U5      nUR                  nU(       a  U Vs/ s H  oUR                  PM     snS   OS nUb  [        R                  " UT 5      (       a  UnTR!                  T	TTTUS9  T $ s  snf )Nr,  r—   ro   c                 ó   >• T$ r¾   r`   )rr   r—   rO  s     €rn   r9  Ú?Language.component.<locals>.add_component.<locals>.factory_funcQ  s	   ø€ Ø%Ð%rm   r   rM  )r¦   rª   r§   r&   ÚE965r©   rg   ÚPipeCallabler  rG   rý   r«   Ú__closure__Úcell_contentsr$   r=  rã   )rO  r9  r  rC  ÚclosureÚcÚwrappedr/  rº   Úcomponent_namer2  r—   r0  r1  s   `      €€€€€€€rn   Úadd_componentÚ)Language.component.<locals>.add_componentM  sí   ù€ Ü˜$¤×%Ñ%Ü ¤§¡×!3Ñ!3¸Ð!3Ð!HÓIÐIð&¬ð &´÷ &ð  ×0Ñ0°Ó6ˆMØ¤× 2Ñ 2Ó2ô !)× 2Ñ 2× 6Ñ 6°}Ó E�Ø'×3Ñ3�ÞCJ±GÓ<²G¨qŸ?œ?±GÑ<¸QÒ?ÐPT�ØÑ&¬4×+<Ò+<¸WÀn×+UÑ+UØ#0�Là�K‰KØØØ!Ø'Ø!ð ñ ð "Ð!ùò =s   Â-D )r¦   rg   r§   r&   rI  r©   rJ  r$   Úget_object_namerT  r   )rº   r—   r/  r0  r1  r2  r[  rZ  s   `````` @rn   r(  ÚLanguage.component+  s¡   þ€ ð6 ÑÜ˜d¤C×(Ñ(Ü ¤§¡×!3Ñ!3¸kÐ!3Ð!JÓKÐKØ�d‹{Ü ¤§¡×!3Ñ!3¸Ð!3Ð!>Ó?Ð?Ø!%Ñ!1™´t×7KÒ7KÈDÓ7Qˆð	"¬,ð 	"¼8÷ 	"õ 	"ð> ÑÙ  Ó&Ð&ØÐrm   )r/  r0  r<  r1  )rÎ   ÚprettyrÎ   r_  c                ó8   • [        XS9nU(       a	  [        X1S9  U$ )aR  Analyze the current pipeline components, print a summary of what
they assign or require and check that all requirements are met.

keys (List[str]): The meta values to display in the table. Corresponds
    to values in FactoryMeta, defined by @Language.factory decorator.
pretty (bool): Pretty-print the results.
RETURNS (dict): The data.
)rÎ   )r/   r0   )r±   rÎ   r_  Úanalysiss       rn   r/   ÚLanguage.analyze_pipesp  s   € ô ! Ñ1ˆÞÜ Ò4Øˆrm   c                 óž   • U R                    H  u  p#X!:X  d  M  Us  $    [        [        R                  R	                  XR
                  S95      e)z¿Get a pipeline component for a given component name.

name (str): Name of pipeline component to get.
RETURNS (callable): The pipeline component.

DOCS: https://spacy.io/api/language#get_pipe
©r—   Úopts)r®   ÚKeyErrorr&   ÚE001r©   rÜ   )r±   r—   rí   r(  s       rn   Úget_pipeÚLanguage.get_pipeƒ  sH   € ð %)×$4Ô$4Ñ ˆIØÕ Ø Ò ñ %5ô ”v—{‘{×)Ñ)¨t×:NÑ:NÐ)ÐOÓPÐPrm   )rR   Ú
raw_configÚvalidateÚfactory_namerR   rj  rk  c                óF  • Ub  UOUn[        U[        5      (       d3  [        R                  R	                  SU[        U5      S9n[        U5      e[        R                  " U5      (       d&  [        [        R                  R	                  US95      eU R                  U5      (       dc  [        R                  R	                  USR                  U R                  5      S[        R                  " U 5      U R                   S9n[        U5      eU R#                  U5      nUR$                  (       a$  ['        UR$                  5      R)                  U5      nU R+                  U5      nU[,        R.                  ;  a  UnXS.UES	U0EnX0n	[,        R0                  " X•S
9n
[,        R2                  " SX‘   0US
9S   n['        U5      nXS'   UR5                  S	S5        UR5                  SS5        UR5                  SS5        U(       a  UR)                  U5      nX°R6                  U'   X¡   $ )a¿  Create a pipeline component. Mostly used internally. To create and
add a component to the pipeline, you can use nlp.add_pipe.

factory_name (str): Name of component factory.
name (Optional[str]): Optional name to assign to component instance.
    Defaults to factory name if not set.
config (Dict[str, Any]): Config parameters to use for this component.
    Will be merged with default config, if available.
raw_config (Optional[Config]): Internals: the non-interpolated config.
validate (bool): Whether to validate the component config against the
    arguments and types expected by the factory.
RETURNS (Callable[[Doc], Doc]): The pipeline component.

DOCS: https://spacy.io/api/language#create_pipe
NrR   r6  rå   ú, Úcreate_pipe)r—   re  Úmethodrƒ   Ú	lang_code)rr   r—   z
@factories)rk  Úcfgrã   rr   r—   )r¦   rh   r&   rK  r©   rª   r§   rê   rë   rì   r  ÚE002Újoinrÿ   r$   r]  rƒ   r"  rŸ   r   rž   r  rG   rý   r¬   ÚfillÚpopr¥   )r±   rl  r—   rR   rj  rk  rD  rî   r  rr  ÚresolvedÚfilleds               rn   ro  ÚLanguage.create_pipe�  sè  € ð0 Ñ'‰t¨\ˆÜ˜&¤$×'Ñ'Ü—+‘+×$Ñ$¨8¸$ÌÈfËÐ$ÐVˆCÜ˜S“/Ð!Ü×)Ò)¨&×1Ñ1ÜœVŸ[™[×/Ñ/°vÐ/Ð>Ó?Ð?Ø×Ñ ×-Ñ-Ü—+‘+×$Ñ$Ø!Ø—Y‘Y˜t×1Ñ1Ó2Ø$Ü×)Ò)¨$Ó/ØŸ)™)ð %ð ˆCô ˜S“/Ð!Ø×)Ñ)¨,Ó7ˆ	ð ×#×#Ü˜I×4Ñ4Ó5×;Ñ;¸FÓCˆFØ×-Ñ-¨lÓ;ˆð ¤× 2Ñ 2Ó2Ø(ˆMð ÑS¨vÐS°|À]ÑSˆð Ð$ˆô ×#Ò# CÑ;ˆÜ—’  sÑ'8Ð9ÀHÑMÈeÑTˆÜ˜“ˆØ(ˆyÑØ�
‰
�< Ô&ð 	�
‰
�5˜$ÔØ�
‰
�6˜4Ô ö Ø—\‘\ *Ó-ˆFØ#)×Ñ˜4Ñ ØÑ%Ð%rm   Úsource_nameÚsourcec          	      óì  • [        U[        5      (       d0  [        [        R                  R                  U[        U5      S95      eU R                  R                  UR                  R                  :w  a1  [        R                  " [        R                  R                  US95        XR                  ;  a`  [        [        R                  R                  UUR                   S    SUR                   S    3SR#                  UR                  5      S95      eUR%                  U5      n['        US5      (       a  X4l        UR*                  R-                  5       n[.        R0                  " US   U   5      nX`R2                  U'   U R                  R4                  UR                  R4                  :w  aB  UR                  R4                   H(  nU R                  R4                  R7                  U5        M*     XFS	   4$ )
aM  Create a pipeline component by copying it from an existing model.

source_name (str): Name of the component in the source pipeline.
source (Language): The source nlp object to copy from.
name (str): Optional alternative name to use in current pipeline.
RETURNS (Tuple[Callable[[Doc], Doc], str]): The component and its factory name.
)r—   r{  r,  rƒ   rù   r—   rn  )r—   Úmodelre  rÑ   rã   )r¦   rp   r§   r&   ÚE945r©   rª   r~   r–   ÚwarningsÚwarnr'   ÚW113rÜ   rf  ÚE944r�   rt  rh  r  r—   rR   Úinterpolater$   Úcopy_configr¥   ÚstringsÚadd)r±   rz  r{  r—   r  Úsource_configrï   Úss           rn   Úcreate_pipe_from_sourceÚ Language.create_pipe_from_sourceÙ  s‹  € ô ˜&¤(×+Ñ+ÜœVŸ[™[×/Ñ/°[ÌÈfËÐ/ÐVÓWÐWØ�:‰:×Ñ §¡×!5Ñ!5Ó5Ü�MŠMœ(Ÿ-™-×.Ñ.°KÐ.Ð@ÔAØ×4Ñ4Ó4ÜÜ—‘×"Ñ"Ø$Ø#Ÿ[™[¨Ñ0Ð1°°6·;±;¸vÑ3FÐ2GÐHØŸ™ 6×#9Ñ#9Ó:ð #ð óð ð �‰˜{Ó+ˆô �4˜× Ñ ØŒIð Ÿ™×1Ñ1Ó3ˆÜ×&Ò& }°\Ñ'BÀ;Ñ'OÓPˆØ#.×Ñ˜4Ñ Ø�:‰:×Ñ §¡×!5Ñ!5Ó5Ø—\‘\×)Ô)�Ø—
‘
×"Ñ"×&Ñ& qÖ)ñ *à Ñ+Ð+Ð+rm   )ÚbeforeÚafterÚfirstÚlastr{  rR   rj  rk  r‹  rŒ  r�  rŽ  c                óº  • [        U[        5      (       d3  [        U5      n[        R                  R                  X²S9n[        U5      eUb  UOUnX R                  ;   a0  [        [        R                  R                  X R                  S95      eSU;   a@  [        R                  " [        R                  R                  UR                  S5      S95        Ub  U R                  XUS9u  pÑOU R                  UUUU	U
S9nU R!                  X4XV5      nU R#                  U5      U R$                  U'   U R&                  R)                  XâU45        U R+                  5         U$ )aC  Add a component to the processing pipeline. Valid components are
callables that take a `Doc` object, modify it and return it. Only one
of before/after/first/last can be set. Default behaviour is "last".

factory_name (str): Name of the component factory.
name (str): Name of pipeline component. Overwrites existing
    component.name attribute if available. If no name is set and
    the component exposes no name attribute, component.__name__ is
    used. An error is raised if a name already exists in the pipeline.
before (Union[str, int]): Name or index of the component to insert new
    component directly before.
after (Union[str, int]): Name or index of the component to insert new
    component directly after.
first (bool): If True, insert component first in the pipeline.
last (bool): If True, insert component last in the pipeline.
source (Language): Optional loaded nlp object to copy the pipeline
    component from.
config (Dict[str, Any]): Config parameters to use for this component.
    Will be merged with default config, if available.
raw_config (Optional[Config]): Internals: the non-interpolated config.
validate (bool): Whether to validate the component config against the
    arguments and types expected by the factory.
RETURNS (Callable[[Doc], Doc]): The pipeline component.

DOCS: https://spacy.io/api/language#add_pipe
©r(  r—   rd  r—   )Úname_in_configr,  )r—   rR   rj  rk  )r¦   rg   Úreprr&   ÚE966r©   r§   rÜ   ÚE007r  r€  r'   ÚW119rv  r‰  ro  Ú_get_pipe_indexr"  r¤   r®   ÚinsertÚ_link_components)r±   rl  r—   r‹  rŒ  r�  rŽ  r{  rR   rj  rk  Úbad_valrD  Úpipe_componentÚ
pipe_indexs                  rn   Úadd_pipeÚLanguage.add_pipe   sM  € ôP ˜,¬×,Ñ,Ü˜<Ó(ˆGÜ—+‘+×$Ñ$¨wÐ$ÐBˆCÜ˜S“/Ð!ØÑ'‰t¨\ˆØ×'Ñ'Ó'ÜœVŸ[™[×/Ñ/°T×@TÑ@TÐ/ÐUÓVÐVà�VÓÜ�MŠMœ(Ÿ-™-×.Ñ.¸f¿j¹jÈÓ>PÐ.ÐQÔRØÑð ,0×+GÑ+GØ¨4ð ,Hð ,Ñ(ˆN˜Lð "×-Ñ-ØØØØ%Ø!ð .ð ˆNð ×)Ñ)¨&¸ÓEˆ
Ø $× 5Ñ 5°lÓ Cˆ�‰˜ÑØ×Ñ×Ñ 
°>Ð,BÔCØ×ÑÔØÐrm   c                 óÚ  • XX4S.n[        S XX44 5       5      S:¼  a0  [        [        R                  R	                  XPR
                  S95      eU(       d  [        S X1U4 5       5      (       d  [        U R                  5      $ U(       a  g[        U[        5      (       aZ  XR
                  ;  a0  [        [        R                  R	                  XR
                  S95      eU R
                  R                  U5      $ [        U[        5      (       a]  X R
                  ;  a0  [        [        R                  R	                  X R
                  S95      eU R
                  R                  U5      S-   $ [        U5      [        :X  aT  U[        U R                  5      :¼  d  US:  a3  [        R                  R	                  S	XR
                  S
9n[        U5      eU$ [        U5      [        :X  aW  U[        U R                  5      :¼  d  US:  a3  [        R                  R	                  SX R
                  S
9n[        U5      eUS-   $ [        [        R                  R	                  XPR
                  S95      e)aœ  Determine where to insert a pipeline component based on the before/
after/first/last values.

before (str): Name or index of the component to insert directly before.
after (str): Name or index of component to insert directly after.
first (bool): If True, insert component first in the pipeline.
last (bool): If True, insert component last in the pipeline.
RETURNS (int): The index of the new pipeline component.
)r‹  rŒ  r�  rŽ  c              3   ó(   #   • U  H  oS Lv •  M
     g 7fr¾   r`   )Ú.0Úargs     rn   Ú	<genexpr>Ú+Language._get_pipe_index.<locals>.<genexpr>W  s   é € ÐGÒ*F 3˜$�Ò*Fùó   ‚é   )Úargsre  c              3   ó(   #   • U  H  oS Lv •  M
     g 7fr¾   r`   )r   rÞ   s     rn   r¢  r£  [  s   é € ÐQÒ:P°¨Õ,Ò:Pùr¤  r   rd  r!   r‹  )ÚdirÚidxre  rŒ  )Úsumr§   r&   ÚE006r©   rÜ   Úanyr×   r®   r¦   rg   rg  Úindexrª   ri   ÚE959)r±   r‹  rŒ  r�  rŽ  Úall_argsrD  s          rn   r–  ÚLanguage._get_pipe_indexF  s  € ð  %¸uÑSˆÜÑG¨6¸%Ñ*FÓGÓGÈ1ÓLÜÜ—‘×"Ñ"¨×7KÑ7KÐ"ÐLóð ö ”sÑQ¸5È%Ñ:PÓQ×QÑQÜ�t×'Ñ'Ó(Ð(ÞØÜ˜¤×$Ñ$Ø×1Ñ1Ó1Ü Ü—K‘K×&Ñ&¨F×9MÑ9MÐ&ÐNóð ð ×'Ñ'×-Ñ-¨fÓ5Ð5Ü˜œs×#Ñ#Ø×0Ñ0Ó0Ü Ü—K‘K×&Ñ&¨E×8LÑ8LÐ&ÐMóð ð ×'Ñ'×-Ñ-¨eÓ4°qÑ8Ð8ô �&‹\œSÓ Øœ˜T×-Ñ-Ó.Ó.°&¸1³*Ü—k‘k×(Ñ(Ø  f×3GÑ3Gð )ð �ô ! “oÐ%ØˆMÜ�%‹[œCÓØœ˜D×,Ñ,Ó-Ó-°¸³Ü—k‘k×(Ñ(Ø U×1EÑ1Eð )ð �ô ! “oÐ%Ø˜1‘9ÐÜœŸ™×+Ñ+°×@TÑ@TÐ+ÐUÓVÐVrm   c                 ó   • XR                   ;   $ )zøCheck if a component name is present in the pipeline. Equivalent to
`name in nlp.pipe_names`.

name (str): Name of the component.
RETURNS (bool): Whether a component of the name exists in the pipeline.

DOCS: https://spacy.io/api/language#has_pipe
)rÛ   r)  s     rn   Úhas_pipeÚLanguage.has_pipe}  s   € ð —‘Ñ&Ð&rm   )rR   rk  c                ó
  • XR                   ;  a0  [        [        R                  R	                  XR
                  S95      e[        US5      (       a2  [        R                  R	                  [        U5      US9n[        U5      eU R                   R                  U5      nU R                  U5        [        U R                  5      (       a  U[        U R                  5      :X  a  U R                  X!X4S9$ U R                  UUUUUS9$ )aú  Replace a component in the pipeline.

name (str): Name of the component to replace.
factory_name (str): Factory name of replacement component.
config (Optional[Dict[str, Any]]): Config parameters to use for this
    component. Will be merged with default config, if available.
validate (bool): Whether to validate the component config against the
    arguments and types expected by the factory.
RETURNS (Callable[[Doc], Doc]): The new pipeline component.

DOCS: https://spacy.io/api/language#replace_pipe
rd  Ú__call__r�  )r—   rR   rk  )r—   r‹  rR   rk  )rÜ   r§   r&   rg  r©   rÛ   r  ÚE968r’  r­  Úremove_piper×   r®   rœ  )r±   r—   rl  rR   rk  rD  r›  s          rn   Úreplace_pipeÚLanguage.replace_pipeˆ  sñ   € ð( ×+Ñ+Ó+ÜœVŸ[™[×/Ñ/°TÇÁÐ/ÐPÓQÐQÜ�< ×,Ñ,Ü—+‘+×$Ñ$¬t°LÓ/AÈÐ$ÐMˆCÜ˜S“/Ð!ð ×)Ñ)×/Ñ/°Ó5ˆ
Ø×Ñ˜ÔÜ�4×#Ñ#×$Ñ$¨
´c¸$×:JÑ:JÓ6KÓ(Kà—=‘=Ø°ð !ð ð ð —=‘=ØØØ!ØØ!ð !ð ð rm   Úold_nameÚnew_namec                 óÊ  • XR                   ;  a0  [        [        R                  R	                  XR                   S95      eX R                   ;   a0  [        [        R
                  R	                  X R                   S95      eU R                   R                  U5      nX R                  U   S   4U R                  U'   U R                  R                  U5      U R                  U'   U R                  R                  U5      U R                  U'   XR                  S   S   ;   a5  U R                  S   S   R                  U5      nX@R                  S   S   U'   U R                  5         g)z«Rename a pipeline component.

old_name (str): Name of the component to rename.
new_name (str): New name of the component.

DOCS: https://spacy.io/api/language#rename_pipe
rd  r!   Ú
initializerÑ   N)rÜ   r§   r&   rg  r©   r”  r­  r®   r¤   rv  r¥   r    r˜  )r±   rº  r»  ÚiÚinit_cfgs        rn   Úrename_pipeÚLanguage.rename_pipe³  s;  € ð ×/Ñ/Ó/ÜÜ—‘×"Ñ"¨×7KÑ7KÐ"ÐLóð ð ×+Ñ+Ó+ÜÜ—‘×"Ñ"¨×7KÑ7KÐ"ÐLóð ð × Ñ ×&Ñ& xÓ0ˆØ'×)9Ñ)9¸!Ñ)<¸QÑ)?Ð@ˆ×Ñ˜ÑØ$(§O¡O×$7Ñ$7¸Ó$Aˆ�‰˜Ñ!Ø'+×'9Ñ'9×'=Ñ'=¸hÓ'Gˆ×Ñ˜8Ñ$à—|‘| LÑ1°,Ñ?Ó?Ø—|‘| LÑ1°,Ñ?×CÑCÀHÓMˆHØAI�L‰L˜Ñ& |Ñ4°XÑ>Ø×ÑÕrm   c                 ó�  • XR                   ;  a0  [        [        R                  R	                  XR                   S95      eU R
                  R                  U R                   R                  U5      5      nU R                  R                  U5        U R                  R                  U5        U R                  R                  S0 5      R                  US5        XR                  S   S   ;   a!  U R                  S   S   R                  U5        XR                  ;   a  U R                  R                  U5        U R!                  5         U$ )zçRemove a component from the pipeline.

name (str): Name of the component to remove.
RETURNS (Tuple[str, Callable[[Doc], Doc]]): A `(name, component)` tuple of the removed component.

DOCS: https://spacy.io/api/language#remove_pipe
rd  Ú_sourced_vectors_hashesNr½  rÑ   )rÜ   r§   r&   rg  r©   r®   rv  r­  r¤   r¥   r�   r«   r    rÒ   r¯   Úremover˜  )r±   r—   Úremoveds      rn   r·  ÚLanguage.remove_pipeÍ  sÿ   € ð ×+Ñ+Ó+ÜœVŸ[™[×/Ñ/°T×@TÑ@TÐ/ÐUÓVÐVØ×"Ñ"×&Ñ& t×';Ñ';×'AÑ'AÀ$Ó'GÓHˆð 	�‰×Ñ˜DÔ!Ø×Ñ×Ñ˜tÔ$Ø�	‰	�‰Ð/°Ó4×8Ñ8¸¸tÔDà—<‘< Ñ-¨lÑ;Ó;Ø�L‰L˜Ñ& |Ñ4×8Ñ8¸Ô>à—=‘=Ó Ø�N‰N×!Ñ! $Ô'Ø×ÑÔØˆrm   c                 ó¸   • XR                   ;  a0  [        [        R                  R	                  XR                   S95      eU R
                  R                  U5        g)zãDisable a pipeline component. The component will still exist on
the nlp object, but it won't be run as part of the pipeline. Does
nothing if the component is already disabled.

name (str): The name of the component to disable.
rd  N)rÜ   r§   r&   rg  r©   r¯   r†  r)  s     rn   Údisable_pipeÚLanguage.disable_pipeæ  sE   € ð ×+Ñ+Ó+ÜœVŸ[™[×/Ñ/°T×@TÑ@TÐ/ÐUÓVÐVØ�‰×Ñ˜4Õ rm   c                 óØ   • XR                   ;  a0  [        [        R                  R	                  XR                   S95      eXR
                  ;   a  U R                  R                  U5        gg)z¹Enable a previously disabled pipeline component so it's run as part
of the pipeline. Does nothing if the component is already enabled.

name (str): The name of the component to enable.
rd  N)rÜ   r§   r&   rg  r©   rÒ   r¯   rÄ  r)  s     rn   Úenable_pipeÚLanguage.enable_pipeñ  sT   € ð ×+Ñ+Ó+ÜœVŸ[™[×/Ñ/°T×@TÑ@TÐ/ÐUÓVÐVØ—=‘=Ó Ø�N‰N×!Ñ! $Õ'ð !rm   )ÚdisableÚcomponent_cfgÚtextrÍ  rÎ  c          	      ó°  • U R                  U5      nUc  0 nU R                   HÙ  u  pVXR;   a  M  [        US5      (       d0  [        [        R
                  R                  [        U5      US95      eU R                  n[        US5      (       a  UR                  5       n U" U40 UR                  U0 5      D6n[        U[        5      (       a  M«  [        [        R                   R                  U[        U5      S95      e   U$ ! [         a,  n[        [        R                  R                  US95      UeSnAf[         a  nU" XVU/U5         SnAN™SnAff = f)aT  Apply the pipeline to some text. The text can span multiple sentences,
and can contain arbitrary whitespace. Alignment into the original string
is preserved.

text (Union[str, Doc]): If `str`, the text to be processed. If `Doc`,
    the doc will be passed directly to the pipeline, skipping
    `Language.make_doc`.
disable (List[str]): Names of the pipeline components to disable.
component_cfg (Dict[str, dict]): An optional dictionary with extra
    keyword arguments for specific components.
RETURNS (Doc): A container for accessing the annotations.

DOCS: https://spacy.io/api/language#call
Nrµ  r�  Úget_error_handlerr,  )r—   Úreturned_type)Ú_ensure_docrÃ   r  r§   r&   ÚE003r©   rª   r°   rÑ  r«   rf  ÚE109Ú	Exceptionr¦   r:   ÚE005)	r±   rÏ  rÍ  rÎ  Údocr—   ÚprocÚerror_handlerÚes	            rn   rµ  ÚLanguage.__call__ü  s5  € ð* ×Ñ˜tÓ$ˆØÑ ØˆMØŸ-œ-‰JˆDØ‹ÙÜ˜4 ×,Ñ,Ü ¤§¡×!3Ñ!3¼dÀ4»jÈtÐ!3Ð!TÓUÐUØ ×6Ñ6ˆMÜ�tÐ0×1Ñ1Ø $× 6Ñ 6Ó 8�ð4Ù˜3Ñ> -×"3Ñ"3°D¸"Ó"=Ñ>�ô ˜c¤3×'Ó'Ü ¤§¡×!3Ñ!3¸ÌTÐRUËYÐ!3Ð!WÓXÐXñ! (ð" ˆ
øô ó Gä ¤§¡×!3Ñ!3¸Ð!3Ð!>Ó?ÀQÐFûÜó 4Ù˜d¨3¨%°×3Ñ3ûð4ús$   ÂDÄ
EÄ'D3Ä3EÅ EÅEÚDisabledPipesc                 óÖ   • [         R                  " [        R                  [        5        [        U5      S:X  a#  [        US   [        [        45      (       a  US   nU R                  US9$ )a.  Disable one or more pipeline components. If used as a context
manager, the pipeline will be restored to the initial state at the end
of the block. Otherwise, a DisabledPipes object is returned, that has
a `.restore()` method you can use to undo your changes.

This method has been deprecated since 3.0
r!   r   )rÍ  )
r  r€  r'   ÚW096ÚDeprecationWarningr×   r¦   rÚ   ÚtupleÚselect_pipesrþ   s     rn   Údisable_pipesÚLanguage.disable_pipes'  sS   € ô 	�Š”h—m‘mÔ%7Ô8Üˆu‹:˜‹?œz¨%°©(´T¼5°M×BÑBØ˜!‘HˆEØ× Ñ ¨Ð Ð/Ð/rm   )rÍ  Úenablerå  c                óÜ  • Uc  Uc  [        [        R                  5      e[        U[        5      (       a  U/nUbv  [        U[        5      (       a  U/nU R
                   Vs/ s H  o3U;  d  M
  UPM     nnUb6  X:w  a1  [        [        R                  R                  X!U R
                  S95      eUnUc   eU Vs/ s H  oUU R                  ;  d  M  UPM     nn[        X5      $ s  snf s  snf )aÐ  Disable one or more pipeline components. If used as a context
manager, the pipeline will be restored to the initial state at the end
of the block. Otherwise, a DisabledPipes object is returned, that has
a `.restore()` method you can use to undo your changes.

disable (str or iterable): The name(s) of the pipes to disable
enable (str or iterable): The name(s) of the pipes to enable - all others will be disabled

DOCS: https://spacy.io/api/language#select_pipes
)rå  rÍ  rú   )
r§   r&   ÚE991r¦   rg   rÛ   ÚE992r©   r¯   rÝ  )r±   rÍ  rå  r  Ú
to_disableÚds         rn   râ  ÚLanguage.select_pipes4  sè   € ð  ‰>˜g™oÜœVŸ[™[Ó)Ð)Ü�gœs×#Ñ#Ø�iˆGØÑÜ˜&¤#×&Ñ&Ø ˜�Ø+/¯?ª?ÓQª? 4È&Ñ>PŸ$©?ˆJÐQàÑ" wÓ'<Ü Ü—K‘K×&Ñ&Ø%¸d¿o¹oð 'ð óð ð
 !ˆGØÑ"Ð"Ð"ñ &ÓAšg˜°$·.±.Ñ)@—1™gˆÐAÜ˜TÓ+Ð+ùò Rùò Bs   Á!	C$Á.C$Â:C)ÃC)c                 óÊ   • [        U5      U R                  :”  a:  [        [        R                  R                  [        U5      U R                  S95      eU R                  U5      $ )zcTurn a text into a Doc object.

text (str): The text to process.
RETURNS (Doc): The processed doc.
)Úlengthr�   )r×   r�   r§   r&   ÚE088r©   r™   )r±   rÏ  s     rn   Úmake_docÚLanguage.make_docZ  sQ   € ô ˆt‹9�t—‘Ó&ÜÜ—‘×"Ñ"¬#¨d«)ÀÇÁÐ"ÐPóð ð �~‰~˜dÓ#Ð#rm   Údoc_likec                 óL  • [        U[        5      (       a  U$ [        U[        5      (       a  U R                  U5      $ [        U[        5      (       a$  [        U R
                  5      R                  U5      $ [        [        R                  R                  [        U5      S95      e)z|Create a Doc if need be, or raise an error if the input is not
a Doc, string, or a byte array (generated by Doc.to_bytes()).)rª   )r¦   r:   rg   rï  Úbytesr~   Ú
from_bytesr§   r&   ÚE1041r©   rª   )r±   rñ  s     rn   rÓ  ÚLanguage._ensure_docf  sy   € ô �h¤×$Ñ$ØˆOÜ�h¤×$Ñ$Ø—=‘= Ó*Ð*Ü�h¤×&Ñ&Ü�t—z‘z“?×-Ñ-¨hÓ7Ð7ÜœŸ™×,Ñ,´$°x³.Ð,ÐAÓBÐBrm   Úcontextc                 ó4   • U R                  U5      nX#l        U$ )z>Call _ensure_doc to generate a Doc and set its context object.)rÓ  Ú_context)r±   rñ  r÷  rØ  s       rn   Ú_ensure_doc_with_contextÚ!Language._ensure_doc_with_contextq  s   € ð ×Ñ˜xÓ(ˆØŒØˆ
rm   g        )ÚdropÚsgdÚlossesrÎ  ÚexcludeÚ	annotatesÚexamplesrù   rü  rý  rþ  rÿ  r   c                óê  • Ub  [        [        R                  5      eUc  0 n[        U[        5      (       a  [        U5      S:X  a  U$ [        US5        [        U5      nUc.  U R                  c  U R                  5       U l        U R                  nUc  0 n0 n	[        U R                  5       H[  u  n
u  p¼UR                  U0 5        [        Xk   5      X›'   Xk   R                  SU5        X›   R                  SU R                  5        M]     U R                   HÏ  u  p¼X·;  a)  [        US5      (       a  UR                   " U4SUS.Xk   D6  US;  aV  X·;  aQ  [        U["        R$                  5      (       a2  UR&                  (       a!  UR(                  S	;  a  UR+                  U5        X¸;   d  M–  [-        [/        S
 U 5       UUU R0                  X›   S9U5       H  u  pÞXÞl        M     MÑ     [5        U5      $ )aÌ  Update the models in the pipeline.

examples (Iterable[Example]): A batch of examples
_: Should not be set - serves to catch backwards-incompatible scripts.
drop (float): The dropout rate.
sgd (Optimizer): An optimizer.
losses (Dict[str, float]): Dictionary to update with the loss, keyed by
    component.
component_cfg (Dict[str, Dict]): Config parameters for specific pipeline
    components, keyed by component name.
exclude (Iterable[str]): Names of components that shouldn't be updated.
annotates (Iterable[str]): Names of components that should set
    annotations on the predicted examples after updating.
RETURNS (Dict[str, float]): The updated losses dictionary

DOCS: https://spacy.io/api/language#update
Nr   zLanguage.updaterü  r’   Úupdate©rý  rþ  )NF)TFNc              3   ó8   #   • U  H  oR                   v •  M     g 7fr¾   ©Ú	predicted©r   Úegs     rn   r¢  Ú"Language.update.<locals>.<genexpr>¹  s   é € Ð9²¨"Ÿž²ùó   ‚)rÙ  r—   r°   r²   )r§   r&   ÚE989r¦   rÚ   r×   r=   Ú_copy_examplesr£   Úcreate_optimizerÚ	enumeraterÃ   rÕ   r   r’   r  r  r#   ÚTrainableComponentÚis_trainabler}  Úfinish_updateÚziprD   r°   r  Ú_replace_numpy_floats)r±   r  rù   rü  rý  rþ  rÎ  rÿ  r   Úpipe_kwargsr¾  r—   rÙ  rØ  r	  s                  rn   r  ÚLanguage.updatey  sÈ  € ð: ‰=ÜœVŸ[™[Ó)Ð)Ø‰>ØˆFÜ�h¤×%Ñ%¬#¨h«-¸1Ó*<ØˆMÜ˜(Ð$5Ô6Ü! (Ó+ˆØ‰;Ø�‰Ñ&Ø"&×"7Ñ"7Ó"9�”Ø—/‘/ˆCØÑ ØˆMØˆÜ(¨¯©Ö7‰OˆA‰|�Ø×$Ñ$ T¨2Ô.Ü (¨Ñ)<Ó =ˆKÑØÑ×*Ñ*¨6°4Ô8ØÑ×(Ñ(¨°t·±ÖGñ	  8ð
 Ÿ-œ-‰JˆDàÓ"¤w¨t°X×'>Ñ'>Ø—’˜HÐU¨$°vÑUÀÑATÒUØ˜-Ó'àÓ'Ü" 4¬×)>Ñ)>×?Ñ?Ø×)×)ØŸ
™
Ð*=Ó=à×&Ñ& sÔ+ØÕ Ü"ÜÙ9±Ó9Ø!Ø!Ø.2×.HÑ.HØ*Ñ0ñð ö	 ‘G�Cð $'–Ló	 ñ (ô0 % VÓ,Ð,rm   )rý  rþ  rÎ  rÿ  c          	      óŒ  ^• Uc  0 n[        U[        5      (       a  [        U5      S:X  a  U$ [        US5        Uc.  U R                  c  U R                  5       U l        U R                  n[        U R                  5      n[        R                  " U5        Uc  0 n0 mU4S jnUR                  Ul	        UR                  Ul
        UR                  Ul        U HD  u  p‰X…;   d  [        U	S5      (       d  M  0 mU	R                  " U4XsS.UR                  U0 5      D6  MF     TR                  5        H  u  n
u  p¼U" X«U5        M     U$ )aì  Make a "rehearsal" update to the models in the pipeline, to prevent
forgetting. Rehearsal updates run an initial copy of the model over some
data, and update the model so its current predictions are more like the
initial ones. This is useful for keeping a pretrained model on-track,
even if you're updating it with a smaller set of examples.

examples (Iterable[Example]): A batch of `Example` objects.
sgd (Optional[Optimizer]): An optimizer.
component_cfg (Dict[str, Dict]): Config parameters for specific pipeline
    components, keyed by component name.
exclude (Iterable[str]): Names of components that shouldn't be updated.
RETURNS (dict): Results from the update.

EXAMPLE:
    >>> raw_text_batches = minibatch(raw_texts)
    >>> for labelled_batch in minibatch(examples):
    >>>     nlp.update(labelled_batch)
    >>>     raw_batch = [Example.from_dict(nlp.make_doc(text), {}) for text in next(raw_text_batches)]
    >>>     nlp.rehearse(raw_batch)

DOCS: https://spacy.io/api/language#rehearse
r   zLanguage.rehearsec                 ó   >• X4TU '   X4$ r¾   r`   )ÚkeyÚWÚdWÚgradss      €rn   Ú	get_gradsÚ$Language.rehearse.<locals>.get_gradsò  s   ø€ Ø˜ˆE�#‰JØ�5ˆLrm   Úrehearser  )r¦   rÚ   r×   r=   r£   r  rÃ   ÚrandomÚshuffleÚ
learn_rateÚb1Úb2r  r  r«   Úitems)r±   r  rý  rþ  rÎ  rÿ  r
  r  r—   rÙ  r  r  r  r  s                @rn   r  ÚLanguage.rehearseÄ  s*  ø€ ð> ‰>ØˆFÜ�h¤×%Ñ%¬#¨h«-¸1Ó*<ØˆMÜ˜(Ð$7Ô8Ø‰;Ø�‰Ñ&Ø"&×"7Ñ"7Ó"9�”Ø—/‘/ˆCÜ�T—]‘]Ó#ˆÜ�Š�uÔØÑ ØˆMØˆõ	ð  #Ÿ~™~ˆ	ÔØ—v‘vˆ	ŒØ—v‘vˆ	ŒÛ‰JˆDØ‹¤g¨d°J×&?Ñ&?ÙØˆEØ�MŠMØðØ'ñØ:G×:KÑ:KÈDÐRTÓ:Uôñ	  ð "ŸK™KžM‰LˆC‘�!Ù�˜ŽOñ *àˆrm   ©rý  Úget_examplesc                ór   • [         R                  " [        R                  [        5        U R                  XS9$ )Nr'  )r  r€  r'   ÚW089rà  r½  )r±   r(  rý  s      rn   Úbegin_trainingÚLanguage.begin_training  s(   € ô 	�Š”h—m‘mÔ%7Ô8Ø�‰˜|ˆÐ5Ð5rm   c                ó²  ^• Uc;  [         R                  R                  S5        [        U R                  / SQS9mU4S jn[        US5      (       d2  [        R                  R                  S[        U5      S9n[        U5      eU R                  R                  5       n[        R                  " US   [        S	9nUS
   nUb  U" U 5         [!        XS   US   US   S9  U R                  R&                  R(                  S   S:¼  a/  [+        5       nU R                  R&                  R-                  U5        [        U R.                  S5      (       aB  [1        U R.                  R2                  US   SSS9nU R.                  R2                  " U4SU 0UD6  U R4                   Hf  u  pš[7        U
[8        R:                  5      (       d  M&  US   R=                  U	0 5      n[1        U
R2                  USU	S9nU
R2                  " U4SU 0UD6  Mh     UR=                  S5      nU(       a%  [        R                  " U[>        S	9n[A        XU5        U RC                  5         X l"        Ub  X l"        O"U RD                  c  U RG                  5       U l"        US   nUb  U" U 5        U RD                  $ ! ["         a*    [#        [        R$                  R                  US   S95      ef = f)aœ  Initialize the pipe for training, using data examples if available.

get_examples (Callable[[], Iterable[Example]]): Optional function that
    returns gold-standard Example objects.
sgd (Optional[Optimizer]): An optimizer to use for updates. If not
    provided, will be created using the .create_optimizer() method.
RETURNS (thinc.api.Optimizer): The optimizer.

DOCS: https://spacy.io/api/language#initialize
zUNo 'get_examples' callback provided to 'Language.initialize', creating dummy examples)ÚxÚyÚz)Úwordsc                  ó4   >• [         R                  " T 0 5      /$ r¾   )r<   Ú	from_dict)rØ  s   €rn   r(  Ú)Language.initialize.<locals>.get_examples#  s   ø€ Ü×)Ò)¨#¨rÓ2Ð3Ð3rm   rµ  zLanguage.initialize)rp  Úobjr½  )ÚschemaÚbefore_initÚ
vocab_datar‡   r–   )Údatar‡   r–   )r–   r!   r™   )Úsectionr—   rr   rÑ   ÚpretrainingÚ
after_init)$r$   r…   r†   r:   r~   r  r&   ÚE930r©   rª   Ú	TypeErrorrR   rƒ  rG   r¬   r3   r?   ÚIOErrorÚE884r–   Úshaper   Úto_opsr™   r6   r½  rÃ   r¦   r#   ÚInitializableComponentr«   r5   r>   r˜  r£   r  )r±   r(  rý  rD  rR   ÚIr7  ÚopsÚtok_settingsr—   rÙ  Ú
p_settingsÚpretrain_cfgÚPr<  rØ  s                  @rn   r½  ÚLanguage.initialize  s�  ø€ ð  ÑÜ�K‰K×ÑØgôô �d—j‘jªÑ8ˆCõ4ô �| Z×0Ñ0Ü—+‘+×$Ñ$Ø,´$°|Ó2Dð %ð ˆCô ˜C“.Ð à—‘×(Ñ(Ó*ˆä×Ò˜V LÑ1Ô:JÑKˆØ˜Ñ&ˆØÑ"Ù˜Ôð	DÜØ˜\™?°A°i±LÈ!ÈIÉ,òð
 �:‰:×Ñ×#Ñ# AÑ&¨!Ó+Ü!Ó#ˆCØ�J‰J×Ñ×%Ñ% cÔ*Ü�4—>‘> <×0Ñ0Ü1Ø—‘×)Ñ)Ø�+‘Ø#Ø ñ	ˆLð �N‰N×%Ò% lÑM¸ÐMÀÒMØŸ-œ-‰JˆDÜ˜$¤× 9Ñ 9×:Ó:Ø˜|™_×0Ñ0°°rÓ:�
Ü3Ø—O‘O Z¸ÈDñ�
ð —’ ÑE°$ÐE¸*ÔEñ (ð —z‘z -Ó0ˆÞÜ× Ò  Ô6JÑKˆAÜ˜ !Ô$Ø×ÑÔØŒØ‰?Ø!�OØ�_‰_Ñ$Ø"×3Ñ3Ó5ˆDŒOØ�|‘_ˆ
ØÑ!Ù�tÔØ�‰ÐøôC ó 	DÜœ&Ÿ+™+×,Ñ,°Q°y±\Ð,ÐBÓCÐCð	Dús   Ã
J" Ê"4Kc                ó¸  • [        5       nU R                  R                  R                  S   S:¼  a%  U R                  R                  R	                  U5        U R
                   H2  u  p4[        US5      (       d  M  [        UR                  5      Ul	        M4     Ub  Xl
        U R                  $ U R                  c  U R                  5       U l
        U R                  $ )aà  Continue training a pretrained model.

Create and return an optimizer, and initialize "rehearsal" for any pipeline
component that has a .rehearse() method. Rehearsal is used to prevent
models from "forgetting" their initialized "knowledge". To perform
rehearsal, collect samples of text you want the models to retain performance
on, and call nlp.rehearse() with a batch of Example objects.

RETURNS (Optimizer): The optimizer.

DOCS: https://spacy.io/api/language#resume_training
r!   Ú_rehearsal_model)r   r~   r–   rA  rB  rÃ   r  r   r}  rL  r£   r  )r±   rý  rE  r—   rÙ  s        rn   Úresume_trainingÚLanguage.resume_trainingY  s®   € ô ÓˆØ�:‰:×Ñ×#Ñ# AÑ&¨!Ó+Ø�J‰J×Ñ×%Ñ% cÔ*ØŸ-œ-‰JˆDÜ�tÐ/×0Ó0Ü(0°·±Ó(<�Ö%ñ (ð ‰?Ø!ŒOð �‰Ðð �_‰_Ñ$Ø"×3Ñ3Ó5ˆDŒOØ�‰Ðrm   rÚ  c                 ó‚   • Xl         U R                   H)  u  p#[        US5      (       d  M  UR                  U5        M+     g)aØ  Set an error handler object for all the components in the pipeline
that implement a set_error_handler function.

error_handler (Callable[[str, Callable[[Doc], Doc], List[Doc], Exception], NoReturn]):
    Function that deals with a failing batch of documents. This callable
    function should take in the component's name, the component itself,
    the offending batch of documents, and the exception that was thrown.
DOCS: https://spacy.io/api/language#set_error_handler
Úset_error_handlerN)r°   rÃ   r  rP  )r±   rÚ  r—   r  s       rn   rP  ÚLanguage.set_error_handlerr  s6   € ð &3Ô"ØŸ-œ-‰JˆDÜ�tÐ0×1Ó1Ø×&Ñ& }Ö5ò (rm   )r’   ÚscorerrÎ  Ú
scorer_cfgÚper_componentrR  rS  rT  c                ó"  • [        U5      n[        US5        [        U5      nUc  U R                  nUc  0 nUc  0 nUc(  [	        U5      nUR                  SU 5        [        S0 UD6n[        5       nU H(  n	U R                  U	R                  R                  5        M*     U R                  S U 5       UUS9n
[        X5       H  u  p›X¹l        M     [        5       nUR                  XS9n[        S U 5       5      nXìU-
  -  US'   [!        U5      $ )	ax  Evaluate a model's pipeline components.

examples (Iterable[Example]): `Example` objects.
batch_size (Optional[int]): Batch size to use.
scorer (Optional[Scorer]): Scorer to use. If not passed in, a new one
    will be created.
component_cfg (dict): An optional dictionary with extra keyword
    arguments for specific components.
scorer_cfg (dict): An optional dictionary with extra keyword arguments
    for the scorer.
per_component (bool): Whether to return the scores keyed by component
    name. Defaults to False.

RETURNS (Scorer): The scorer containing the evaluation results.

DOCS: https://spacy.io/api/language#evaluate
zLanguage.evaluaterr   c              3   ó8   #   • U  H  oR                   v •  M     g 7fr¾   r  r  s     rn   r¢  Ú$Language.evaluate.<locals>.<genexpr>³  s   é € Ð-¢H˜b�\Ž\¢Hùr  )r’   rÎ  )rT  c              3   óL   #   • U  H  n[        UR                  5      v •  M     g 7fr¾   )r×   r  r  s     rn   r¢  rW  »  s   é € Ð;²(¨B”c˜"Ÿ,™,×'Ð'²(ùs   ‚"$Úspeedr`   )rÚ   r=   r  r’   rh   rÕ   r7   Útimerrï  Ú	referencerÏ  r  r  r  Úscorerª  r  )r±   r  r’   rR  rÎ  rS  rT  r²   Ú
start_timer	  ÚdocsrØ  Úend_timeÚresultsÚn_wordss                  rn   ÚevaluateÚLanguage.evaluate„  s  € ô6 ˜“>ˆÜ˜(Ð$7Ô8Ü! (Ó+ˆØÑØŸ™ˆJØÑ ØˆMØÑØˆJØ‰>Ü˜*Ó%ˆFØ×Ñ˜e TÔ*ÜÑ%˜fÑ%ˆFä“Wˆ
ãˆBØ�M‰M˜"Ÿ,™,×+Ñ+Ö,ñ ð �y‰yÙ-¡HÓ-Ø!Ø'ð ð 
ˆô
 ˜8Ö*‰GˆBØŽLñ +ä“7ˆØ—,‘,˜x�,ÐEˆÜÑ;±(Ó;Ó;ˆØ"°Ñ&;Ñ<ˆ�ÑÜ$ WÓ-Ð-rm   c                 ó\   • SU R                   S   S   0n[        R                  " U5      S   $ )zCCreate an optimizer, usually using the [training.optimizer] config.Ú	optimizerrâ   )rR   rG   r¬   )r±   Ú	subconfigs     rn   r  ÚLanguage.create_optimizer¿  s0   € à  $§+¡+¨jÑ"9¸+Ñ"FÐGˆ	Ü×Ò 	Ó*¨;Ñ7Ð7rm   Úparamsc              #   óz  #   • U(       d  Sv •  gU R                    VVs/ s H<  u  p#[        US5      (       d  M  [        US5      (       d  M+  UR                  U5      PM>     nnnU H  n [        U5        M     Sv •  U H  n [        U5        M     gs  snnf ! [         a     M@  f = f! [         a     M8  f = f7f)a–  Replace weights of models in the pipeline with those provided in the
params dictionary. Can be used as a contextmanager, in which case,
models go back to their original weights after the block.

params (dict): A dictionary of parameters keyed by model ID.

EXAMPLE:
    >>> with nlp.use_params(optimizer.averages):
    >>>     nlp.to_disk("/tmp/checkpoint")

DOCS: https://spacy.io/api/language#use_params
NÚ
use_paramsr}  )rÃ   r  rj  ÚnextÚStopIteration)r±   rh  r—   r  Úcontextsr÷  s         rn   rj  ÚLanguage.use_paramsÄ  s·   é € ö Üð #'§-¢-ôâ"/‘J�DÜ˜4 ×.ó (ä3:¸4À×3Ió (�—‘ Ö'Ù"/ð ñ ó $�ðÜ˜–Mñ $ó
 Û#�ðÜ˜–Mò $ùóøô %ó Úðûô %ó Úðüsc   ‚B;žB¹BÁBÁ!B;Á*BÁ5B;ÂB*ÂB;Â
B'Â#B;Â&B'Â'B;Â*
B8Â4B;Â7B8Â8B;)Ú	as_tuplesr’   rÍ  rÎ  Ú	n_processÚtextsro  rp  c                ó   • g r¾   r`   ©r±   rq  ro  r’   rÍ  rÎ  rp  s          rn   r  ÚLanguage.pipeè  s   € ð rm   c                ó   • g r¾   r`   rs  s          rn   r  rt  ô  s   € ð -0rm   r!   c          	   #   ó’  ^ #   • U(       ar  [        [        [        [        [        [
        4   [        4      U5      nU 4S jU 5       nT R                  UUUUUS9nU H  n	U	R                  n
SU	l        Xš4v •  M     g[        [        [        [        [
        4      U5      nUS:X  a  [        R                  " 5       nUc  0 nUc  T R                  n/ nT R                   Hg  u  pÍXÄ;   a  M  UR                  U0 5      nUR                  SU5        [        R                   " ["        UUUT R$                  S9nUR'                  U5        Mi     US:w  aM  T R)                  U5      (       a$  [*        R,                  " [.        R0                  5        T R3                  XXc5      nOU 4S jU 5       nU H  nU" U5      nM     U H  n	U	v •  M	     g7f)	að  Process texts as a stream, and yield `Doc` objects in order.

texts (Iterable[Union[str, Doc]]): A sequence of texts or docs to
    process.
as_tuples (bool): If set to True, inputs should be a sequence of
    (text, context) tuples. Output will then be a sequence of
    (doc, context) tuples. Defaults to False.
batch_size (Optional[int]): The number of texts to buffer.
disable (List[str]): Names of the pipeline components to disable.
component_cfg (Dict[str, Dict]): An optional dictionary with extra keyword
    arguments for specific components.
n_process (int): Number of processors to process texts. If -1, set `multiprocessing.cpu_count()`.
YIELDS (Doc): Documents in the order of the original text.

DOCS: https://spacy.io/api/language#pipe
c              3   óJ   >#   • U  H  u  pTR                  X5      v •  M     g 7fr¾   )rú  )r   rÏ  r÷  r±   s      €rn   r¢  Ú Language.pipe.<locals>.<genexpr>  s%   øé € ð "ÚRWÁÀ�×-Ñ-¨d×<Ð<ÒRWùs   ƒ #)r’   rÍ  rp  rÎ  Néÿÿÿÿr’   )rÙ  r—   r²   r°   r!   c              3   óF   >#   • U  H  nTR                  U5      v •  M     g 7fr¾   )rÓ  )r   rÏ  r±   s     €rn   r¢  rx  O  s   øé € Ð=²u¨t�D×$Ñ$ T×*Ð*²uùs   ƒ!)r   r   r   r   rg   r:   rL   r  rù  ÚmpÚ	cpu_countr’   rÃ   r«   rÕ   Ú	functoolsÚpartialrD   r°   ré   Ú_has_gpu_modelr  r€  r'   ÚW114Ú_multiprocessing_pipe)r±   rq  ro  r’   rÍ  rÎ  rp  Údocs_with_contextsr^  rØ  r÷  r
  r—   rÙ  r²   Úfr  s   `                rn   r  rt     s­  øé € ö8 Üœ¤%¬¬c´3¨h©¼Ð(DÑ"EÑFÈÓNˆEô"ÙRWó"Ðð —9‘9Ø"Ø%ØØ#Ø+ð ð ˆDó �ØŸ,™,�Ø#�”Ø�nÔ$ñ ð ä”Xœe¤C¬ H™oÑ.°Ó6ˆð ˜‹?ÜŸš›ˆIØÑ ØˆMØÑØŸ™ˆJàˆØŸ-œ-‰JˆDØ‹ÙØ"×&Ñ& t¨RÓ0ˆFà×Ñ˜l¨JÔ7Ü×!Ò!ÜØØØØ&*×&@Ñ&@ñˆAð �L‰L˜ŽOñ (ð ˜‹>Ø×"Ñ" 7×+Ñ+Ü—’œhŸm™mÔ,à×-Ñ-¨e¸IÓR‰Dô >±uÓ=ˆDÛ�Ù˜D“z’ñ ãˆCØŒIò ùs   ƒGGc                 ó>  • U R                    H�  u  p#[        US5      =(       a    UR                  nX!;   d  U(       d  M2  [        US5      (       d  ME  [        UR                  S5      (       d  Mb  [	        UR                  R
                  [        5      (       d  M�    g   g)Nr  r}  rE  TF)rÃ   r  r  r}  r¦   rE  r   )r±   rÍ  r—   rÙ  r  s        rn   r  ÚLanguage._has_gpu_modelU  sp   € ØŸ-œ-‰JˆDÜ" 4¨Ó8×N¸T×=NÑ=NˆLØ‹¦lÙô ˜˜g×&Ó&Ü˜DŸJ™J¨×.Ó.Ü˜tŸz™zŸ~™~¬w×7Ó7áñ (ð rm   r
  c              #   ó¬  #   • S[         [        [        [        4      S[         [        [        [        [
        4   [        4      4S jnU" U5      n[        R                  " U5      u  p[        U5       Vs/ s H  n[        R                  " 5       PM     n	n[        [        U5       Vs/ s H  n[        R                  " S5      PM     sn6 u  p«[        R                  " X5      n[!        XÉUS9nUR#                  5         UR#                  5         [        X›5       VVs/ s H@  u  pï[        R$                  " [&        U R(                  UUU[*        R,                  " 5       4S9PMB     nnnU H  nUR/                  5         M     U H  nUR1                  5         M     [2        R4                  " S [7        U
5       5       5      n [9        [        UU5      S5       H¬  u  nu  nu  nnnUb0  [        U R:                  5      R=                  U5      nUUl        Uv •  OQUbN  [@        RB                  " U5      nU RE                  S S S [G        [H        RJ                  RM                  US	95      5        UU-  S
:X  d  Mœ  URO                  5         M®     U	 H(  nURQ                  [R        5        UR1                  5         M*     U
 H  nUR1                  5         M     U H  nURU                  5         M     [W        S U 5       5      (       d%  [X        RZ                  " [\        R^                  5        g g s  snf s  snf s  snnf ! U	 H(  nURQ                  [R        5        UR1                  5         M*     U
 H  nUR1                  5         M     U H  nURU                  5         M     [W        S U 5       5      (       d%  [X        RZ                  " [\        R^                  5        f f = f7f)Nrq  ro   c              3   óÌ   #   • U  HZ  n[        U[        5      (       a.  UR                  5       [        [        UR
                  5      4v •  MF  U[        [        S 5      4v •  M\     g 7fr¾   )r¦   r:   Úto_bytesr   rL   rù  )rq  rñ  s     rn   Úprepare_inputÚ5Language._multiprocessing_pipe.<locals>.prepare_inputk  sQ   é € ó "�Ü˜h¬×,Ñ,Ø#×,Ñ,Ó.´´[À(×BSÑBSÓ0TÐUÔUà#¤T¬+°tÓ%<Ð=Ô=ò	 "ùs   ‚A"A$F)Ú
chunk_size)Útargetr¦  c              3   ó@   #   • U  H  oR                  5       v •  M     g 7fr¾   )Úrecv)r   rŽ  s     rn   r¢  Ú1Language._multiprocessing_pipe.<locals>.<genexpr>¢  s   é € ð *
Ú$;˜D�I‰I�KˆKÒ$;ùs   ‚r!   r‹   r   c              3   ó>   #   • U  H  oR                   S :H  v •  M     g7f)r   N)Úexitcode)r   rÙ  s     rn   r¢  r�  É  s   é € Ð<²e¨d—}‘}¨Ö)²eùs   ‚)0r   r   rg   r:   r   ró  rL   Ú	itertoolsÚteeÚranger{  ÚQueuer  ÚPiper$   Ú	minibatchÚ_SenderÚsendÚProcessÚ_apply_pipesrú  r;   Ú	get_stateÚstartÚcloser   Úfrom_iterabler   r  r~   rô  rù  rê   Úmsgpack_loadsr°   r§   r&   ÚE871r©   ÚstepÚputÚ_WORK_DONE_SENTINELrt  Úallr  r€  r'   ÚW127)r±   rq  r
  rp  r’   r‰  Úserialized_texts_with_ctxÚ	raw_textsrù   Útexts_qÚbytedocs_recv_chÚbytedocs_send_chÚbatch_textsÚsenderÚrchÚschÚprocsrÙ  ÚtxÚbyte_tuplesr¾  Úbyte_docr÷  Ú
byte_errorrØ  rŒ   ÚqÚrs                               rn   r�  ÚLanguage._multiprocessing_piped  s<  é € ð
	>ÜœE¤#¤s (™OÑ,ð
	>ä”eœE¤#¤u *Ñ-¬{Ð:Ñ;Ñ<ô
	>ñ %2°%Ó$8Ð!ä$Ÿ=š=Ð)BÓCÑˆä7<¸YÔ7GÓ"HÒ7G°!¤2§8¢8¦:Ñ7GˆÐ"Hä-0Ü&+¨IÔ&6Ó7Ò&6 Œb�gŠg�eŽnÑ&6Ñ7ð.
Ñ*Ðô —n’n UÓ7ˆô ˜¸)ÑDˆà�‰ŒØ�‰Œô   Ô:ô
ò ;‘�ô �JŠJÜ#à×1Ñ1ØØØÜ×(Ò(Ó*ðô	ñ ;ð 	ñ 
ó ˆDØ�J‰JŽLñ ó #ˆBØ�H‰HŽJñ #ô
 ×)Ò)ñ *
Ü$)Ð*:Ô$;ó*
ó 
ˆð%	-Ü;DÜ�I˜{Ó+¨Qö<Ñ7�Ñ7�AÑ6˜ '¨:ð Ñ'Ü˜dŸj™j›/×4Ñ4°XÓ>�CØ#*�C”LØ“IØÑ+Ü!×/Ò/°
Ó;�EØ×.Ñ.Ø˜d D¬*´V·[±[×5GÑ5GÈeÐ5GÐ5TÓ*Uôð �z‘> QÕ&à—K‘K–Mñ<ó& �Ø—‘Ô)Ô*Ø—‘–	ñ ó &�Ø—‘–	ñ &ó �Ø—	‘	–ñ ô Ñ<±eÓ<×<Ñ<Ü—’œhŸm™mÕ,ð =ùò] #Iùò 8ùó
øó^ �Ø—‘Ô)Ô*Ø—‘–	ñ ó &�Ø—‘–	ñ &ó �Ø—	‘	–ñ ô Ñ<±eÓ<×<Ñ<Ü—’œhŸm™mÕ,ð =üsN   ‚A4OÁ6L#ÂOÂ) L(Ã	AOÄAL-Å$AOÇ B.L3 É2L3 ÊB-OÌ3BOÏOc                 óJ  • U R                    H  u  p[        US5      (       d  M  Xl        M      [        U R                   5       H\  u  nu  pE[	        U[
        R                  5      (       d  M)  0 Ul        U R                   US-   S  H  u  pgUR                  U5        M     M^     g)z]Register 'listeners' within pipeline components, to allow them to
effectively share weights.
r—   r!   N)	rÃ   r  r—   r  r¦   r#   ÚListenedToComponentÚlistener_mapÚfind_listeners)r±   r—   rÙ  r¾  Úname1Úproc1Úname2Úproc2s           rn   r˜  ÚLanguage._link_componentsÌ  s†   € ð Ÿ-œ-‰JˆDÜ�t˜V×$Ó$Ø –	ñ (ô "+¨4¯=©=Ö!9ÑˆA‰~�Ü˜%¤×!7Ñ!7×8Ó8Ø%'�Ô"Ø$(§M¡M°!°a±%°'Ó$:‘L�EØ×(Ñ(¨Ö/ó %;ò ":rm   )r~   rÍ  rå  rÿ  r�   Ú	auto_fillrk  rÁ  c          	      óÂ  ^• U(       a'  [        U R                  [        S9R                  U5      nSU;  a&  [	        [
        R                  R                  US95      eSUS   ;  a
  SS0US   S'   US   R                  S5      n	U	b[  X�R                  :w  aL  [	        [
        R                  R                  US   S   U R                  [        R                  " U 5      S	95      eU R                  US   S'   [        R                  " U5      nUR                  S
0 5      n
UR                  SS5      n0 US
'   U(       a  [        R                   " X["        S9nOUnX¬S
'   X¡S
'   Ub  X¼S'   X±S'   [        R$                  " US   U[&        S9nUS   nUS   nUS   nUS   nUS   nU nUbb  U" U 5      n[)        U[*        5      (       a  [-        UU 5      (       a  UU La/  [	        [
        R.                  R                  [+        U5      S95      e[1        5         U" UUUUS9nUbI  U" U5      n[)        UU 5      (       d0  [	        [
        R2                  R                  S[+        U5      S95      eUR4                  (       d  UR7                  5       OUnUR                  S
0 5      n0 n0 nSnUS   S    GHm  nUU;  aF  SR9                  UR;                  5       5      n[	        [
        R<                  R                  UUS95      e[        R                  " UU   5      n[        US
   U   5      nUT;  d  M‚  SU;  a/  SU;  a)  [
        R>                  R                  UUS9n[	        U5      eSU;   a&  UR                  S5      nURA                  UUUUUS9  Mã  SU;   d   eUc  URB                  RE                  SS/S9nUS   n U U;  a$  [        RF                  " U URB                  S/S9UU '   UR                  S U5      n!S!n"S"U;   aZ  UU    RI                  5         UU    RJ                   H4  u  n#n$U![M        U$S#/ 5      ;   d  M  UU    RO                  U#U!US"   5        S$n"M6     [P        RR                  " 5          [P        RT                  " S%S&S'9  URA                  U!UU    US(9  SSS5        U U;  a3  [W        UU    RB                  RX                  RE                  S/S95      UU '   S)URZ                  ;  a  0 URZ                  S)'   UU    URZ                  S)   U'   U"(       d  GMj  UU 	 GMp     Ub  URB                  R]                  U5        [)        U[^        5      (       a  U/n[)        U[^        5      (       a  U/n[)        T[^        5      (       a  T/m[a        U5      [a        [b        5      :w  av  US   R                  S*/ 5      n%[e        U%5      (       aQ  [g        U%5      Ri                  U5      (       d2  [P        Rj                  " [l        Rn                  R                  UU%S+95        U Rq                  [s        1 UkUS   R                  S,/ 5      k5      UUS   S   5      n&[g        U4S- jU& 5       5      Ul:        US   S.   Ul;        U(       a  UOUUl<        UbI  U" U5      n[)        UU 5      (       d0  [	        [
        R2                  R                  S/[+        U5      S95      eU$ ! , (       d  f       GND= f)0a�  Create the nlp object from a loaded config. Will set up the tokenizer
and language data, add pipeline components etc. If no config is provided,
the default config of the given language is used.

config (Dict[str, Any] / Config): The loaded config.
vocab (Vocab): A Vocab object. If True, a vocab is created.
disable (Union[str, Iterable[str]]): Name(s) of pipeline component(s) to disable.
    Disabled pipes will be loaded but they won't be run unless you
    explicitly enable them by calling nlp.enable_pipe.
enable (Union[str, Iterable[str]]): Name(s) of pipeline component(s) to enable. All other
    pipes will be disabled (and can be enabled using `nlp.enable_pipe`).
exclude (Union[str, Iterable[str]]): Name(s) of pipeline component(s) to exclude.
    Excluded components won't be loaded.
meta (Dict[str, Any]): Meta overrides for nlp.meta.
auto_fill (bool): Automatically fill in missing values in config based
    on defaults and function argument annotations.
validate (bool): Validate the component config and arguments against
    the types expected by the factory.
RETURNS (Language): The initialized Language class.

DOCS: https://spacy.io/api/language#from_config
rP   rr   rå   r–   z@vectorszspacy.Vectors.v1rƒ   N)Úbad_lang_coderq  rƒ   rÑ   r;  )rk  r6  r™   Úbefore_creationÚafter_creationÚafter_pipeline_creation)rÞ   )r~   r�   r‘   r�   Úcreation)r—   rÞ   rÃ   rn  rd  rã   r{  )r—   rR   )r—   rR   rk  rj  r‡   r…  ©rÿ  )r~   rÿ  r(  FÚreplace_listenersÚlistening_componentsTÚignorez\[W113\])Úmessage)r{  r—   rÃ  Úenabled)rå  rÍ  rÒ   c              3   ó6   >#   • U  H  oT;  d  M
  Uv •  M     g 7fr¾   r`   )r   r	  rÿ  s     €rn   r¢  Ú'Language.from_config.<locals>.<genexpr>À  s   øé € ÐJ¢~ !À'Ñ9IŸA™A¢~ùs   ƒ	�	r’   Úpipeline_creation)=r   rŸ   rA   rž   r§   r&   ÚE985r©   r«   rƒ   ÚE958r$   r]  r„  rv  rG   ru  r2   r¬   r4   r¦   rª   Ú
issubclassÚE943rH   ÚE942Úis_interpolatedrƒ  rt  rÎ   ÚE956ÚE984rœ  r~   rˆ  Ú
load_modelr˜  rÃ   ÚgetattrrÉ  r  Úcatch_warningsÚfilterwarningsÚhashr–   r�   rô  rg   Úidr@   r×   rj   Úissubsetr€  r'   ÚW123Ú_resolve_component_statusrÚ   r¯   r’   rR   )'rº   rR   r~   rÍ  rå  rÿ  r�   rÁ  rk  Úconfig_langÚorig_pipelineÚorig_pretrainingrx  Úresolved_nlpr�   r‘   rÄ  rÅ  rÆ  Úlang_clsrr   ÚinterpolatedrÃ   Úsource_nlpsÚsource_nlp_vectors_hashesÚvocab_brí   re  Úpipe_cfgrj  rD  rã   r}  rz  Úlisteners_replacedr—   rÙ  rÍ  Údisabled_pipess'        `                                 rn   Úfrom_configÚLanguage.from_configâ  só  ø€ öF ÜØ×"Ñ"Ô2Fñç‰e�F‹mð ð ˜ÓÜœVŸ[™[×/Ñ/°vÐ/Ð>Ó?Ð?ð ˜F 5™MÓ)Ø(2Ð4FÐ'GˆF�5‰M˜)Ñ$Ø˜U‘m×'Ñ'¨Ó/ˆØÑ" {·h±hÓ'>ÜÜ—‘×"Ñ"Ø"(¨¡-°Ñ"7Ø!Ÿh™hÜ×-Ò-¨cÓ2ð #ð óð ð !$§¡ˆˆu‰�fÑô
 ×!Ò! &Ó)ˆØŸ
™
 <°Ó4ˆØ!Ÿ:™: m°TÓ:ÐØ!ˆˆ|ÑÞÜ—]’] 6Ä\ÑR‰FàˆFØ,ˆ|ÑØ,ˆ|ÑØÑ'Ø$4�=Ñ!Ø$4�=Ñ!Ü×'Ò'Ø�5‰MØÜ"ñ
ˆð
 (¨Ñ4ÐØ% iÑ0ˆØ&Ð'8Ñ9ˆØ%Ð&6Ñ7ˆØ".Ð/HÑ"IÐØˆØÑ&Ù& sÓ+ˆHä˜x¬×.Ñ.Ü! (¨C×0Ñ0Ø 3Ò&ä ¤§¡×!3Ñ!3¼$¸x».Ð!3Ð!IÓJÐJô 	Ôñ ØØ-Ø)Øñ	
ˆð Ñ%Ù  Ó%ˆCÜ˜c 3×'Ñ'Ü ¤§¡×!3Ñ!3¸Ì4ÐPSË9Ð!3Ð!UÓVÐVð 4:×3I×3I�v×)Ñ)Ô+ÈvˆØ×#Ñ# L°"Ó5ˆð ˆØ$&Ð!ØˆØ ™ zÕ2ˆIØ Ó(Ø—y‘y §¡£Ó1�Ü ¤§¡×!3Ñ!3¸ÈÐ!3Ð!NÓOÐOÜ×'Ò'¨°Ñ(;Ó<ˆHÜ  |Ñ 4°YÑ ?Ó@ˆJØ Õ'Ø HÓ,°ÀÓ1IÜ Ÿ+™+×,Ñ,°)ÀHÐ,ÐM�CÜ$ S›/Ð)Ø Ó(Ø&Ÿl™l¨9Ó5�Gð —L‘LØØ&Ø'Ø!)Ø#-ð !ó ð $ xÓ/Ð/Ð/ð ‘Ø"%§)¡)×"4Ñ"4¸iÈÐ=SÐ"4Ð"T˜Ø$ XÑ.�EØ KÓ/ä-1¯_ª_Ø!¨¯©¸Y¸Kñ.˜ EÑ*ð #+§,¡,¨{¸IÓ"F�KØ).Ð&Ø*¨hÓ6ð $ EÑ*×;Ñ;Ô=Ø*5°eÑ*<×*EÔ*E™J˜D $Ø*¬g°dÐ<RÐTVÓ.WÕWØ +¨EÑ 2× DÑ DØ$(¨+°xÐ@SÑ7Tô!"ð 6:Ò 2ñ +Fô "×0Ò0Õ2Ü ×/Ò/°À,ÒOØŸ™Ø'°¸EÑ0BÈð %ñ ÷ 3ð Ð$=Ó=Ü;?Ø'¨Ñ.×4Ñ4×<Ñ<×EÑEØ)2¨ð Fð ó<Ð1°%Ñ8ð
 1¸¿¹Ó@Ø>@˜Ÿ™Ð!:Ñ;à1°%Ñ8ð —H‘HÐ6Ñ7¸	ÑB÷ *Ñ)Ø'¨Ó.ñQ 3ðT ÑØ�I‰I× Ñ  Ô)ô �gœs×#Ñ#Ø�iˆGÜ�fœc×"Ñ"Ø�XˆFÜ�gœs×#Ñ#Ø�iˆGô ˆf‹:œÔ0Ó1Ó1Ø˜U‘m×'Ñ'¨	°2Ó6ˆGÜ�7�|‰|¤C¨£L×$9Ñ$9¸&×$AÑ$AÜ—’Ü—M‘M×(Ñ(Ø%Ø 'ð )ð ôð ×6Ñ6ÜÐ?�7Ð?˜V E™]×.Ñ.¨z¸2Ó>Ð?Ó@ØØ�5‰M˜*Ñ%ó
ˆô
 ÔJ¡~ÓJÓJˆŒà ™ |Ñ4ˆŒÞ(‘V¨fˆŒ
Ø"Ñ.Ù)¨#Ó.ˆCÜ˜c 3×'Ñ'Ü Ü—K‘K×&Ñ&Ð,?ÄtÈCÃyÐ&ÐQóð ð ˆ
÷{ 3Ö2ús   Ñ(*[Û
[	Útok2vec_namerí   Ú	listenersc                 ó´  • XR                   ;  aD  [        R                  R                  UUUSR	                  U R                   5      S9n[        U5      eX R                   ;  aD  [        R                  R                  UUUSR	                  U R                   5      S9n[        U5      eU R                  U5      nU R                  U5      n[        U[        R                  5      (       d0  [        [        R                  R                  U[        U5      S95      eUR                  nUR                  R                  U/ 5      nU R                  U5      n	U R                   U   n
U(       Gaº  ["        R$                  R'                  SU5        [)        [+        U5      5      [)        U5      :w  a4  [        R,                  R                  UUU[)        U5      S9n[        U5      eU Hg  n ["        R.                  " X«5        US   nSUR4                  ;   a!  UR4                  S   nU" US   U
S   S	   5      n["        R6                  " X«U5        Mi     U HÑ  nUR9                  5       nUR4                  R                  S
5      nUbn  [)        [:        R<                  " U5      R>                  5      nUS:X  a	  U" U5      nO6US:X  a
  U" XþU5      nO&[        [        R@                  R                  US95      e["        RB                  " U	R                  Xï5        URE                  Xâ5        MÓ     gg! [0         a*    [        R2                  R                  X!US9n[        U5      ef = f)a%  Find listener layers (connecting to a token-to-vector embedding
component) of a given pipeline component model and replace
them with a standalone copy of the token-to-vector layer. This can be
useful when training a pipeline with components sourced from an existing
pipeline: if multiple components (e.g. tagger, parser, NER) listen to
the same tok2vec component, but some of them are frozen and not updated,
their performance may degrade significantly as the tok2vec component is
updated with new data. To prevent this, listeners can be replaced with
a standalone tok2vec layer that is owned by the component and doesn't
change if the component isn't updated.

tok2vec_name (str): Name of the token-to-vector component, typically
    "tok2vec" or "transformer".
pipe_name (str): Name of pipeline component to replace listeners for.
listeners (Iterable[str]): The paths to the listeners, relative to the
    component config, e.g. ["model.tok2vec"]. Typically, implementations
    will only connect to one tok2vec component, [model.tok2vec], but in
    theory, custom models can use multiple listeners. The value here can
    either be an empty list to not replace any listeners, or a complete
    (!) list of the paths to all listener layers used by the model.

DOCS: https://spacy.io/api/language#replace_listeners
rn  )Útok2vecr—   Úunknownre  )r—   r  z%Replacing listeners of component '%s')r—   ró  ÚpathsÚn_listeners)r—   ró  rÀ   r}  Úreplace_listener_cfgró  Úreplace_listenerNr!   é   )Ú
num_params)#rÛ   r&   ÚE889r©   rt  r§   rh  rç   r¦   r#   r¹  ÚE888rª   r}  rº  r«   r¥   r$   r…   r†   r×   rÚ   ÚE887Údot_to_objectrf  ÚE886ÚattrsÚset_dot_to_objectÚcopyÚinspectÚ	signatureÚ
parametersÚE1055Úreplace_model_nodeÚremove_listener)r±   rð  rí   rñ  rD  ró  Útok2vec_cfgÚtok2vec_modelÚpipe_listenersr  rë  Úlistener_pathÚ
new_configÚreplace_funcÚlistenerÚ	new_modelÚreplace_listener_funcrú  s                     rn   rÉ  ÚLanguage.replace_listenersÌ  s  € ð: Ÿ™Ó.Ü—+‘+×$Ñ$Ø$ØØ$Ø—Y‘Y˜tŸ™Ó/ð	 %ð ˆCô ˜S“/Ð!ØŸO™OÓ+Ü—+‘+×$Ñ$Ø$ØØ!Ø—Y‘Y˜tŸ™Ó/ð	 %ð ˆCô ˜S“/Ð!Ø—-‘- Ó-ˆØ×*Ñ*¨<Ó8ˆÜ˜'¤2×#9Ñ#9×:Ñ:ÜœVŸ[™[×/Ñ/°\ÌÈWËÐ/ÐVÓWÐWØŸ™ˆØ ×-Ñ-×1Ñ1°)¸RÓ@ˆØ�}‰}˜YÓ'ˆØ×%Ñ% iÑ0ˆßÜ�K‰K×ÑÐEÀyÔQÜ”4˜	“?Ó#¤s¨>Ó':Ó:ô —k‘k×(Ñ(Ø"Ø(Ø#Ü # NÓ 3ð	 )ð �ô ! “oÐ%ó "+�ð*Ü×&Ò& xÔ?ð )¨Ñ1�
Ø)¨]×-@Ñ-@Ó@Ø#0×#6Ñ#6Ð7MÑ#N�LÙ!-Ø# GÑ,¨h°wÑ.?À	Ñ.Jó"�Jô ×&Ò& xÀ
ÖKñ "+ó" +�Ø)×.Ñ.Ó0�	Ø(5×(;Ñ(;×(?Ñ(?Ð@RÓ(SÐ%Ø(Ñ4ô "%Ü×)Ò)Ð*?Ó@×KÑKó"�Jð " Q“Ù$9¸)Ó$D™	Ø# q›Ù$9¸)ÈwÓ$W™	ä(¬¯©×)<Ñ)<È
Ð)<Ð)SÓTÐTä×'Ò'¨¯
©
°HÔHØ×'Ñ'¨Ö<ò# +ðA øô&  ó *Ü Ÿ+™+×,Ñ,Ø&À=ð -ð �Cô % S›/Ð)ð	*ús   Ç#L#Ì#4MÚmemc           	   #   ó"  #   • Uc
  [        5       n[        5        nUR                  U R                  R	                  U5      5      /n[        U R                  S5      (       a9  UR                  UR                  U R                  R	                  U5      5      5        U R                   HG  u  pE[        US5      (       d  M  UR                  UR                  UR	                  U5      5      5        MI     Uv •  SSS5        g! , (       d  f       g= f7f)a:  Begin a block where all resources allocated during the block will
be freed at the end of it. If a resources was created within the
memory zone block, accessing it outside the block is invalid.
Behaviour of this invalid access is undefined. Memory zones should
not be nested.

The memory zone is helpful for services that need to process large
volumes of text with a defined memory budget.

Example
-------
>>> with nlp.memory_zone():
...     for doc in nlp.pipe(texts):
...        process_my_doc(doc)
>>> # use_doc(doc) <-- Invalid: doc was allocated in the memory zone
NÚmemory_zone)	r   r   Úenter_contextr~   r  r  r™   ré   rÃ   )r±   r  Ústackrm  rù   r  s         rn   r  ÚLanguage.memory_zone4  sÄ   é € ð$ ‰;Ü“&ˆCô Œ[˜EØ×+Ñ+¨D¯J©J×,BÑ,BÀ3Ó,GÓHÐIˆHÜ�t—~‘~ }×5Ñ5Ø—‘ × 3Ñ 3°D·N±N×4NÑ4NÈsÓ4SÓ TÔUØŸ=œ=‘�Ü˜4 ×/Ó/Ø—O‘O E×$7Ñ$7¸×8HÑ8HÈÓ8MÓ$NÖOñ )ð ŠI÷ �[Ž[üs#   ‚DšB C>Â>7C>Ã5	DÃ>
DÄDrÈ  rÀ   c                ó   ^ ^• [         R                  " U5      n0 nU 4S jUS'   U 4S jUS'   U 4S jUS'   T R                   H(  u  pEUT;   a  M  [        US5      (       d  M   U4S jX4'   M*     UU 4S	 jUS
'   [         R                  " XT5        g)a1  Save the current state to a directory.  If a model is loaded, this
will include the model.

path (str / Path): Path to a directory, which will be created if
    it doesn't exist.
exclude (Iterable[str]): Names of components or serialization fields to exclude.

DOCS: https://spacy.io/api/language#to_disk
c                 ó:   >• TR                   R                  U S/S9$ ©Nr~   rÈ  )r™   Úto_disk©r	  r±   s    €rn   Ú<lambda>Ú"Language.to_disk.<locals>.<lambda>b  s!   ø€ ¨T¯^©^×-CÑ-CØ˜�yð .Dñ .
rm   r™   c                 óX   >• [         R                  " U [        TR                  5      5      $ r¾   )rê   Ú
write_jsonr  r�   r  s    €rn   r  r  e  s   ø€ ¬U×-=Ò-=ØÔ$ T§Y¡YÓ/ô.
rm   ú	meta.jsonc                 ó:   >• TR                   R                  U 5      $ r¾   )rR   r  r  s    €rn   r  r  h  s   ø€ ¨d¯k©k×.AÑ.AÀ!Ô.Drm   ú
config.cfgr  c                 ó$   • UR                  U S/S9$ r  )r  ©r	  rÙ  s     rn   r  r  n  s   € °T·\±\À!ÈgÈY°\Ñ5Wrm   c                 ó8   >• TR                   R                  U TS9$ ©NrÈ  )r~   r  )r	  rÿ  r±   s    €€rn   r  r  o  s   ø€ ¨¯©×);Ñ);¸AÀwÐ);Ñ)Orm   r~   N)r$   Úensure_pathr®   r  r  )r±   rÀ   rÿ  Úserializersr—   rÙ  s   ` `   rn   r  ÚLanguage.to_diskT  s‘   ù€ ô ×Ò Ó%ˆØˆô$
ˆ�KÑ ô$
ˆ�KÑ ô %Eˆ�LÑ!Ø×*Ô*‰JˆDØ�w‹ÙÜ˜4 ×+Ñ+ÙØ/3Ó WˆKÓñ +õ  Pˆ�GÑÜ�Š�T¨Õ0rm   rÛ   c                 óT  • [        U [        5      (       a  U /n U nU(       ax  [        U[        5      (       a  U/n1 U Vs/ s H  oDU;  d  M
  UPM     snkU kn[        [        U5      U-  5      (       a&  [	        [
        R                  R                  XS95      e[        U5      $ s  snf )a&  Derives whether (1) `disable` and `enable` values are consistent and (2)
resolves those to a single set of disabled components. Raises an error in
case of inconsistency.

disable (Union[str, Iterable[str]]): Name(s) of component(s) or serialization fields to disable.
enable (Union[str, Iterable[str]]): Name(s) of pipeline component(s) to enable.
pipe_names (Iterable[str]): Names of all pipeline components.

RETURNS (Tuple[str, ...]): Names of components to exclude from pipeline w.r.t.
                           specified includes and excludes.
)rå  rÍ  )	r¦   rg   r×   rj   r§   r&   ÚE1042r©   rá  )rÍ  rå  rÛ   ré  rí   s        rn   rá  Ú"Language._resolve_component_statusr  s£   € ô$ �gœs×#Ñ#Ø�iˆGØˆ
æÜ˜&¤#×&Ñ&Ø ˜�ðÙ-7ÓSªZ 	ÈFÑ;R—)©ZÑSðàðˆJô
 ”3�v“; Ñ+×,Ñ,Ü ¤§¡×!4Ñ!4¸FÐ!4Ð!TÓUÐUä�ZÓ Ð ùò Ts   ¿	B%ÁB%)rÿ  Ú	overridesr/  c                ó  ^ ^^• S[         SS4U 4S jjnS[         SS4UU 4S jjn[        R                  " U5      n0 n[        US-  5      R                  5       (       a
  UU 4S jUS'   XFS'   XVS	'   U 4S
 jUS'   T R                   H(  u  pxUT;   a  M  [        US5      (       d  M   U4S jXg'   M*     US	-  R                  5       (       d  S	T;  a  [        T5      S	/-   m[        R                  " XT5        UT l        T R                  5         T $ )au  Loads state from a directory. Modifies the object in place and
returns it. If the saved `Language` object contains a model, the
model will be loaded.

path (str / Path): A path to a directory.
exclude (Iterable[str]): Names of components or serialization fields to exclude.
RETURNS (Language): The modified `Language` object.

DOCS: https://spacy.io/api/language#from_disk
rÀ   ro   Nc                 ó  >• U R                  5       (       al  [        R                  " U 5      nTR                  R	                  U5        UR                  S0 5      R                  S5      TR                  R                  l        g g ©Nr–   r—   )	Úexistsrê   Ú	read_jsonr�   r  r«   r~   r–   r—   )rÀ   r9  r±   s     €rn   Údeserialize_metaÚ,Language.from_disk.<locals>.deserialize_meta§  s]   ø€ Ø�{‰{�}‰}Ü—’ tÓ,�Ø—	‘	× Ñ  Ô&ð +/¯(©(°9¸bÓ*A×*EÑ*EÀfÓ*M�—
‘
×"Ñ"Õ'ð rm   c                 óf   >• U R                  5       (       a  TR                  R                  U TS9  g g r(  )r3  r~   Ú	from_disk)rÀ   rÿ  r±   s    €€rn   Údeserialize_vocabÚ-Language.from_disk.<locals>.deserialize_vocab¯  s*   ø€ Ø�{‰{�}‰}Ø—
‘
×$Ñ$ T°7Ð$Ò;ð rm   r$  c                 ó:   >• TR                   R                  U STS9$ )NF)rƒ  r/  )rR   r8  )r	  r/  r±   s    €€rn   r  Ú$Language.from_disk.<locals>.<lambda>¶  s!   ø€ °D·K±K×4IÑ4IØ˜u°	ð 5Jñ 5rm   r"  r~   c                 ó:   >• TR                   R                  U S/S9$ r  )r™   r8  r  s    €rn   r  r<  »  s!   ø€ ¨t¯~©~×/GÑ/GØ˜�yð 0Hñ 0
rm   r™   r8  c                 ó$   • UR                  U S/S9$ r  )r8  r&  s     rn   r  r<  Ã  s   € °t·~±~Ø˜G˜9ð 8Fñ 8rm   )
r	   r$   r)  r3  r®   r  rÚ   r8  r¢   r˜  )	r±   rÀ   rÿ  r/  r5  r9  Údeserializersr—   rÙ  s	   ` ``     rn   r8  ÚLanguage.from_disk•  s  ú€ ð$	N¤4ð 	N¨D÷ 	Nð	<¤Dð 	<¨T÷ 	<ð 	<ô ×Ò Ó%ˆØˆÜ��|Ñ#Ó$×+Ñ+×-Ñ-õ+ˆM˜,Ñ'ð &6�kÑ"Ø!2�gÑô&
ˆ�kÑ"ð ×*Ô*‰JˆDØ�w‹ÙÜ˜4 ×-Ñ-ÙØ15ó #ˆMÓñ +ð �w‘×&Ñ&×(Ñ(¨W¸GÓ-Cä˜7“m w iÑ/ˆGÜ�Š�t¨GÔ4ØˆŒ
Ø×ÑÔØˆrm   c                óò   ^ ^• 0 nUU 4S jUS'   U 4S jUS'   U 4S jUS'   U 4S jUS'   T R                    H(  u  p4UT;   a  M  [        US	5      (       d  M   U4S
 jX#'   M*     [        R                  " UT5      $ )zïSerialize the current state to a binary string.

exclude (Iterable[str]): Names of components or serialization fields to exclude.
RETURNS (bytes): The serialized form of the `Language` object.

DOCS: https://spacy.io/api/language#to_bytes
c                  ó6   >• TR                   R                  T S9$ r(  )r~   rˆ  )rÿ  r±   s   €€rn   r  Ú#Language.to_bytes.<locals>.<lambda>×  s   ø€  t§z¡z×':Ñ':À7Ð':Ñ'Krm   r~   c                  ó8   >• T R                   R                  S/S9$ r  )r™   rˆ  r¿   s   €rn   r  rC  Ø  s   ø€ ¨4¯>©>×+BÑ+BÈGÈ9Ð+BÑ+Urm   r™   c                  óV   >• [         R                  " [        T R                  5      5      $ r¾   )rê   Ú
json_dumpsr  r�   r¿   s   €rn   r  rC  Ù  s   ø€ ¬5×+;Ò+;Ü! $§)¡)Ó,ô,
rm   r"  c                  ó8   >• T R                   R                  5       $ r¾   )rR   rˆ  r¿   s   €rn   r  rC  Ü  s   ø€ ¨D¯K©K×,@Ñ,@Ô,Brm   r$  rˆ  c                 ó"   • U R                  S/S9$ r  )rˆ  )rÙ  s    rn   r  rC  â  s   € °$·-±-ÈÈ	°-Ñ2Rrm   )r®   r  r$   rˆ  )r±   rÿ  r*  r—   rÙ  s   ``   rn   rˆ  ÚLanguage.to_bytesÎ  s�   ù€ ð 79ˆÝKˆ�GÑÜ#Uˆ�KÑ ô$
ˆ�KÑ ô %Cˆ�LÑ!Ø×*Ô*‰JˆDØ�w‹ÙÜ˜4 ×,Ñ,ÙØ,0Ó RˆKÓñ +ô �}Š}˜[¨'Ó2Ð2rm   Ú
bytes_datac                ó  ^ ^• U 4S jn0 nU 4S jUS'   X4S'   UU 4S jUS'   U 4S jUS'   T R                    H(  u  pVUT;   a  M  [        US	5      (       d  M   U4S
 jXE'   M*     [        R                  " XT5        T R	                  5         T $ )zùLoad state from a binary string.

bytes_data (bytes): The data to load from.
exclude (Iterable[str]): Names of components or serialization fields to exclude.
RETURNS (Language): The `Language` object.

DOCS: https://spacy.io/api/language#from_bytes
c                 óÜ   >• [         R                  " U 5      nTR                  R                  U5        UR	                  S0 5      R	                  S5      TR
                  R                  l        g r2  )rê   Ú
json_loadsr�   r  r«   r~   r–   r—   )Úbr9  r±   s     €rn   r5  Ú-Language.from_bytes.<locals>.deserialize_metañ  sO   ø€ Ü×#Ò# AÓ&ˆDØ�I‰I×Ñ˜TÔ"ð '+§h¡h¨y¸"Ó&=×&AÑ&AÀ&Ó&IˆD�J‰J×ÑÕ#rm   c                 ó8   >• TR                   R                  U SS9$ )NF)rƒ  )rR   rô  ©rN  r±   s    €rn   r  Ú%Language.from_bytes.<locals>.<lambda>ù  s   ø€ °·±×0FÑ0FØ˜5ð 1Gñ 1
rm   r$  r"  c                 ó8   >• TR                   R                  U TS9$ r(  )r~   rô  )rN  rÿ  r±   s    €€rn   r  rR  ý  s   ø€ ¨4¯:©:×+@Ñ+@ÀÈGÐ+@Ñ+Trm   r~   c                 ó:   >• TR                   R                  U S/S9$ r  )r™   rô  rQ  s    €rn   r  rR  þ  s!   ø€ ¨t¯~©~×/HÑ/HØ˜�yð 0Iñ 0
rm   r™   rô  c                 ó$   • UR                  U S/S9$ r  )rô  )rN  rÙ  s     rn   r  rR  	  s   € °t·±Ø˜G˜9ð 8Gñ 8rm   )r®   r  r$   rô  r˜  )r±   rJ  rÿ  r5  r?  r—   rÙ  s   ` `    rn   rô  ÚLanguage.from_byteså  s˜   ù€ õ	Jð <>ˆô'
ˆ�lÑ#ð &6�kÑ"Ý!Tˆ�gÑô&
ˆ�kÑ"ð ×*Ô*‰JˆDØ�w‹ÙÜ˜4 ×.Ñ.ÙØ15ó #ˆMÓñ +ô 	�Š˜
°7Ô;Ø×ÑÔØˆrm   )r®   r    r¯   r¡   r£   r¢   r¥   r¤   r’   r°   rƒ   r�   r™   r~   )Tr¾   )NNNN)ro   rÝ  ©ro   N)sra   rb   rc   rd   re   rN   rx   rƒ   r   rg   rf   r�   rŸ   rB   r&   rB  rý   rŽ   r   r   rJ   Úboolri   r   r   r:   rI   rµ   r¹   ÚpropertyrÀ   r�   Úsetterr   rR   r   rÒ   rÿ   r   rT  rÑ   rÜ   rÃ   rÛ   r  rÙ   Úclassmethodr  r  r"  r%  ræ   rç   rC   r   Úfloatrã   r(  r/   rh  ro  r‰  rœ  r–  r²  r¸  rÀ  r·  rÈ  rË  rµ  rã  râ  rï  ró  rÓ  rL   rú  r<   r   r  r  r+  r½  rM  rÖ  r   rP  r7   rb  r  r   rh   rj  r   r%   r   r  r  r�  r˜  r@   rî  rÉ  r   r  r	   r  Ústaticmethodrá  r8  rˆ  rô  rl   Ú__classcell__)r»   s   @rn   rp   rp   Š   s¬  ø‡ ñð €HØ€Dˆ(�3‰-ÓØ#€Ná  v§{¡{Ñ3€IØ.0€M�4˜˜]Ð*Ñ+Ó0ð %)ðF1ð  Ø!ØSWØEIØòF1à�U˜D�[Ñ!ðF1ð ð	F1ð
 �3˜�8‰nðF1ð # 8¨Z¨L¸(ÀCÀ5È#À:Ñ:NÐ,NÑ#OÑPðF1ð ! ¨7¨)°[Ð*@Ñ!AÑBðF1ð ðF1ð 
öF1õP5ð
 ñó ðð ð#�d˜3 ˜8‘nó #ó ð#ðJ 
‡[�[ð˜$˜s C˜x™.ð ¨Tó ó ðð ð ˜ó  ó ð ðD ‡]�]ð˜Fð  tó ó ðð ðR˜$˜s™)ó Ró ðRð ð'˜t C™yó 'ó ð'ð ð
˜D  s¨LÐ'8Ñ!9Ñ:ó 
ó ð
ð ðY  c¡ó Yó ðYð ðR˜$˜u S¨,Ð%6Ñ7Ñ8ó Ró ðRð ðT˜D ™Ió Tó ðTð ð+  S¨# X¡ó +ó ð+ð ð(˜T # t¨C¡y .Ñ1ó (ó ð(ð ðQ˜sð Q tó Qó ðQð
 ð$ Cð $¨Có $ó ð$ð ðH Cð H¨Mó Hó ðHð ð> Cð >°ð >À$ó >ó ð>ð% #ð %¨-ô %ð	 Cð 	¨Fô 	ð ñ
 *:Ó);Ù!1Ó!3Ù"2Ó"4Ø!Ù<LÓ<NØ#'òWàðWð ˜S #˜X™ð	Wð
 ˜#‘ðWð ˜3‘-ðWð ðWð  $ C¨°%©Ð$8Ñ9ðWð �xÑ ðWð 
ôWó ðWðr ñ
 "2Ó!3Ù"2Ó"4Ø!Ø'+òBàðBð ˜#‘ð	Bð
 ˜3‘-ðBð ðBð �|Ñ$ðBð 
�#�s�(Ñ	ôBó ðBòN KØò	ð �3‰iðð ð	ð
 
�$�s˜C�x‘.Ñ	!õð&Q˜Sð Q \ô Qð  #ðG&ñ
 "2Ó!3Ø'+ØòG&àðG&ð �s‰mðG&ð
 �S˜#�X‘ðG&ð ˜VÑ$ðG&ð ðG&ð 
öG&ðR%,Øð%,Ø(2ð%,Ø=@ð%,à	ˆ|˜SÐ Ñ	!ô%,ðT #ðDð
 -1Ø+/Ø $Ø#Ø'+Ù!1Ó!3Ø'+ØòDàðDð �s‰mðDð
 ˜˜s C˜x™Ñ)ðDð ˜˜c 3˜h™Ñ(ðDð ˜‰~ðDð �t‰nðDð ˜Ñ$ðDð �S˜#�X‘ðDð ˜VÑ$ðDð ðDð 
öDðP -1Ø+/Ø $Ø#ñ5Wà˜˜s C˜x™Ñ)ð5Wð ˜˜c 3˜h™Ñ(ð5Wð ˜‰~ð	5Wð
 �t‰nð5Wð 
õ5Wðn	'˜Sð 	' Tô 	'ñ  "2Ó!3Øò)àð)ð ð)ð
 �S˜#�X‘ð)ð ð)ð 
õ)ðV  Cð  °3ð  ¸4ô  ð4 ð ¨¨c°<Ð.?Ñ(@ô ð2	! ð 	!¨ô 	!ð	( ð 	(¨ô 	(ñ "2Ó!3Ø=Aò)à�C˜�H‰oð)ð ˜#‘ð	)ð
    S¨$¨s°C¨x©.Ð%8Ñ 9Ñ:ð)ð 
õ)ôV0ð  8<Ø6:ò	$,ð ˜%  X¨c¡]Ð 2Ñ3Ñ4ð$,ð ˜˜s H¨S¡MÐ1Ñ2Ñ3ð	$,ð
 
õ$,ðL
$˜Sð 
$ Sô 
$ð	C E¨#¨s°E¨/Ñ$:ð 	C¸sô 	CðØ˜c 3¨˜oÑ.ðØ9Dðà	ôð  ðI-ð
 Ø#'Ø-1Ø=AÙ!1Ó!3Ù#3Ó#5òI-à˜7Ñ#ðI-ð �C‰=ðI-ð
 ðI-ð �iÑ ðI-ð ˜˜c 5˜jÑ)Ñ*ðI-ð    S¨$¨s°C¨x©.Ð%8Ñ 9Ñ:ðI-ð ˜#‘ðI-ð ˜C‘=öI-ð^ $(Ø-1Ø=AÙ!1Ó!3ò>à˜7Ñ#ð>ð �iÑ ð	>ð
 ˜˜c 5˜jÑ)Ñ*ð>ð    S¨$¨s°C¨x©.Ð%8Ñ 9Ñ:ð>ð ˜#‘ð>ð 
ˆc�5ˆjÑ	õ>ðD CGð6ð $(ò	6à˜x¨¨H°WÑ,=Ð(=Ñ>Ñ?ð6ð �iÑ ð	6ð
 
ö6ð CGðJð $(ò	Jà˜x¨¨H°WÑ,=Ð(=Ñ>Ñ?ðJð �iÑ ð	Jð
 
öJðX =Aò  h¨yÑ&9ð ÀYõ ð26à  l°D¸±I¸yÐ IÈ8Ð SÑTô6ð, %)Ø#'Ø=AØ/3Ø#ò9.à˜7Ñ#ð9.ð ˜S‘Mð	9.ð
 ˜Ñ ð9.ð    S¨$¨s°C¨x©.Ð%8Ñ 9Ñ:ð9.ð ˜T # s (™^Ñ,ð9.ð ð9.ð 
ˆc�3ˆh‰õ9.òv8ð
 ð! ¨$¡ó !ó ð!ðF ð
 %(Ø$'Ø!$Ø=@Øò	à˜˜c 3˜h™Ñ(ð	ð ˜5‘>ð		ð
 ˜S‘Mð	ð ˜#‘ð	ð    S¨$¨s°C¨x©.Ð%8Ñ 9Ñ:ð	ð ð	ð 
�#‰ô	ó ð	ð ð
 $'Ø$'Ø!$Ø=@Øò	0à˜˜e C¨ H™o¨{Ð:Ñ;Ñ<ð	0ð ˜4‘=ð		0ð
 ˜S‘Mð	0ð ˜#‘ð	0ð    S¨$¨s°C¨x©.Ð%8Ñ 9Ñ:ð	0ð ð	0ð 
�%˜˜[Ð(Ñ)Ñ	*ô	0ó ð	0ð"  Ø$(Ù!1Ó!3Ø=AØòSàØ�U˜3 ˜8‘_Ñ% x°°e¸CÀ¸H±oÀ{Ð6RÑ0SÑ'TÐTñ
ðSð ðSð ˜S‘MðSð ˜#‘ðSð    S¨$¨s°C¨x©.Ð%8Ñ 9Ñ:ðSð ðSð 
ˆx˜‰}˜h u¨S°+Ð-=Ñ'>Ñ?Ð?Ñ	@õSðj h¨s¡mô ðf-à˜˜c 3˜h™Ñ(ðf-ð ˜  h¨s¡mÐ!3Ñ4Ñ5ðf-ð ð	f-ð
 ðf-ð 
�#‰ôf-ôP0ð, ð 13ðgð %)Ø-AØ,@Ø-AÙ/Ó1ØØògà�d˜3 ˜8‘n fÐ,Ñ-ðgð �U˜D�[Ñ!ð	gð
 �s˜H S™MÐ)Ñ*ðgð �c˜8 C™=Ð(Ñ)ðgð �s˜H S™MÐ)Ñ*ðgð �3˜�8‰nðgð ðgð ðgð 
õgó ðgðRf=àðf=ð ðf=ð ˜C‘=ð	f=ð
 
ôf=ðP ñ˜x¨™~ð ¸À$¹ô ó ðñ@ CSÓBTò1Ø˜#˜t˜)Ñ$ð1Ø2:¸3±-ð1à	õ1ð< ð !Ø�s˜H S™MÐ)Ñ*ð !à�c˜8 C™=Ð(Ñ)ð !ð ˜S‘Mð !ð 
ˆs�Cˆx‰ó	 !ó ð !ñL "2Ó!3Ù$4Ó$6ò7à�C˜�IÑð7ð ˜#‘ð	7ð
 ˜˜S˜‘>ð7ð 
õ7ñr 4DÓ3Eò 3 8¨C¡=ð 3È%õ 3ñ0 >NÓ=Oò&Øð&Ø-5°c©]ð&à	÷&ó &rm   Ú	meta_dictc                 ó2   • [        S S [        U 5      5      $ )Nc                 ó6   • [        U [        R                  5      $ r¾   )r¦   ÚnumpyÚfloating©Úvs    rn   r  Ú'_replace_numpy_floats.<locals>.<lambda>	  s   € ”*˜Q¤§¡Ô/rm   c                 ó   • [        U 5      $ r¾   )r\  rd  s    rn   r  rf  	  s   € ¼5À¼8rm   )r    rh   )r_  s    rn   r  r  	  s   € ÜÙ/Ñ1CÄTÈ)Ã_óð rm   c                   óÎ   • \ rS rSr% Sr\\S'   Sr\\	\\
4      \S'   \" 5       r\\   \S'   \" 5       r\\   \S'   Sr\\S	'   \" 5       r\\   \S
'   Sr\\	\\\   4      \S'   Srg)r�   i	  a  Dataclass containing information about a component and its defaults
provided by the @Language.component or @Language.factory decorator. It's
created whenever a component is defined and stored on the Language class for
each component instance and factory instance.
rã   NrŸ   r/  r0  Fr1  r<  rè   r`   )ra   rb   rc   rd   re   rg   rf   rŸ   r   r   r   rá  r/  r   r0  r1  rX  r<  rè   r\  rl   r`   rm   rn   r�   r�   	  s}   ‡ ñð ƒLØ/3€N�H˜T # s (™^Ñ,Ó3Ù"›W€GˆX�c‰]Ó$Ù#›g€Hˆh�s‰mÓ%Ø€K�ÓÙ!›G€FˆH�S‰MÓ#ØBFÐ˜8 D¨¨h°u©oÐ)=Ñ$>Ñ?ÖFrm   r�   c                   óJ   • \ rS rSrSrS\S\\   SS4S jrS r	S	 r
SS
 jrSrg)rÝ  i%	  z)Manager for temporary pipeline disabling.rr   rú   ro   Nc                 óØ   • Xl         X l        U R                   H  nU R                   R                  U5        M      [        R	                  U 5        U R                  U R                  5        g r¾   )rr   rú   rÈ  rÚ   rµ   Úextend)r±   rr   rú   r—   s       rn   rµ   ÚDisabledPipes.__init__(	  sH   € ØŒØŒ
Ø—J”JˆDØ�H‰H×!Ñ! $Ö'ñ ä�‰�dÔØ�‰�D—J‘JÕrm   c                 ó   • U $ r¾   r`   r¿   s    rn   Ú	__enter__ÚDisabledPipes.__enter__0	  s   € Øˆrm   c                 ó$   • U R                  5         g r¾   )Úrestore)r±   r¦  s     rn   Ú__exit__ÚDisabledPipes.__exit__3	  s   € Ø�‰�rm   c                 óè   • U R                    H]  nXR                  R                  ;  a&  [        [        R
                  R                  US95      eU R                  R                  U5        M_     / U SS& g)zARestore the pipeline to its state when DisabledPipes was created.r,  N)rú   rr   rÜ   r§   r&   ÚE008r©   rË  r)  s     rn   rq  ÚDisabledPipes.restore6	  sZ   € à—J”JˆDØŸ8™8×3Ñ3Ó3Ü ¤§¡×!3Ñ!3¸Ð!3Ð!>Ó?Ð?Ø�H‰H× Ñ  Ö&ñ ð ˆ‰Q‰rm   )rú   rr   rW  )ra   rb   rc   rd   re   rp   r   rg   rµ   rn  rr  rq  rl   r`   rm   rn   rÝ  rÝ  %	  s2   † Ù3ð ˜Hð  ¨T°#©Yð  ¸4ô  òò÷rm   rÝ  r  c                 óŠ   • U  Vs/ s H1  n[        UR                  R                  5       UR                  5      PM3     sn$ s  snf )zèMake a copy of a batch of examples, copying the predicted Doc as well.
This is used in contexts where we need to take ownership of the examples
so that they can be mutated, for instance during Language.evaluate and
Language.update.
)r<   r.  r  r/  )r  r	  s     rn   r  r  ?	  s1   € ñ 2:Ó:²¨2ŒG�B—D‘D—I‘I“K §¡Ö&±Ñ:Ð:ùÒ:s   …8A Ú
ensure_docr
  .Úunderscore_statec                 óÈ  ^ • [         R                  " U5          UR                  5       n[        U[        5      (       a!  UR                  5         UR                  5         gU 4S jU 5       nU H  nU" U5      nM     U Vs/ s H  oˆR                  5       UR                  S4PM!     n	nS/[        U5      [        U	5      -
  -  n
Xš-   n UR                  U5        MÃ  s  snf ! [         aF    SS[        R                  " [        R                  " 5       5      4/nS/[        W5      S-
  -  n
XÊ-   n Nhf = f! [         a#    UR                  5         UR                  5          gf = f)a  Worker for Language.pipe

ensure_doc (Callable[[Union[str, Doc]], Doc]): Function to create Doc from text
    or raise an error if the input is neither a Doc nor a string.
pipes (Iterable[Pipe]): The components to apply.
receiver (multiprocessing.Connection): Pipe to receive text. Usually
    created by `multiprocessing.Pipe()`
sender (multiprocessing.Connection): Pipe to send doc. Usually created by
    `multiprocessing.Pipe()`
underscore_state (Tuple[dict, dict, dict]): The data in the Underscore class
    of the parent.
Nc              3   ó8   >#   • U  H  u  pT" X5      v •  M     g 7fr¾   r`   )r   rñ  r÷  rx  s      €rn   r¢  Ú_apply_pipes.<locals>.<genexpr>f	  s   øé € ð ÚGUÑ2C°(‘
˜8×-Ð-Â~ùs   ƒ)NNNr!   )r;   Ú
load_stater«   r¦   Ú_WorkDoneSentinelrž  rˆ  rù  r×   rÖ  rê   Úmsgpack_dumpsÚ	tracebackÚ
format_excr™  ÚBrokenPipeError)rx  r
  Úreceiverr­  ry  Útexts_with_ctxr^  r  rØ  Ú	byte_docsÚpaddingr9  Ú	error_msgs   `            rn   r›  r›  H	  sU  ø€ ô& ×ÒÐ*Ô+Ø
ð	'Ø%Ÿ\™\›^ˆNô ˜.Ô*;×<Ñ<Ø—‘”Ø—‘Ô ØôÙGUóˆDó �Ù˜D“z’ñ ñ JNÓNÊÀ#Ÿ,™,›.¨#¯,©,¸Ó=ÉˆIÐNØ)Ð*¬c°.Ó.AÄCÈ	ÃNÑ.RÑSˆGàÑ#ð ð	Ø�K‰K˜Ôñ7 ùò  Oøô
 ó 	'Ø ¤e×&9Ò&9¼)×:NÒ:NÓ:PÓ&QÐRÐSˆIØ)Ð*¬c°.Ó.AÀAÑ.EÑFˆGØÑ&ŠDð	'ûô ó 	ð �L‰LŒNØ�N‰NÔÙð	ús=   šAC! Á !C! Â&CÂ'!C! Ã	D4 ÃC! Ã!AD1Ä0D1Ä4*E!Å E!c                   óf   • \ rS rSrSrS\\   S\\R                     S\
SS4S jrSS	 jrSS
 jrSrg)r˜  i�	  zAUtil for sending data to multiprocessing workers in Language.piper9  Úqueuesr‹  ro   Nc                 óp   • [        U5      U l        [        [        U5      5      U l        X0l        SU l        g )Nr   )Úiterr9  r   r‰  r‹  Úcount)r±   r9  r‰  r‹  s       rn   rµ   Ú_Sender.__init__„	  s+   € ô ˜“JˆŒ	Üœ5 ›=Ó)ˆŒØ$ŒØˆ�
rm   c                 óÈ   • [         R                  " [        U R                  [	        U R
                  5      5      U R                  5       H  u  pUR                  U5        M     g)z1Send chunk_size items from self.data to channels.N)r’  Úislicer  r9  r   r‰  r‹  r£  )r±   Úitemrµ  s      rn   r™  Ú_Sender.sendŒ	  sC   € ä ×'Ò'Ü�—	‘	œ5 §¡Ó-Ó.°·±ö
‰GˆDð �E‰E�$ŽKò	
rm   c                 ó’   • U =R                   S-  sl         U R                   U R                  :¼  a  SU l         U R                  5         gg)z^Tell sender that comsumed one item. Data is sent to the workers after
every chunk_size calls.
r!   r   N)rŒ  r‹  r™  r¿   s    rn   r¢  Ú_Sender.step”	  s6   € ð 	�
Š
�a‰�
Ø�:‰:˜Ÿ™Ó(ØˆDŒJØ�I‰I�Kð )rm   )r‹  rŒ  r9  r‰  rW  )ra   rb   rc   rd   re   r   r   r   r{  r•  ri   rµ   r™  r¢  rl   r`   rm   rn   r˜  r˜  �	  s@   † ÙKðØ˜S‘MðØ+/°·±©>ðØGJðà	ôô÷rm   r˜  c                   ó   • \ rS rSrSrg)r~  iž	  r`   N)ra   rb   rc   rd   rl   r`   rm   rn   r~  r~  ž	  s   † Úrm   r~  )„r}  r  r’  Úmultiprocessingr{  r   r€  r  Ú
contextlibr   r   r  r   Údataclassesr   r   r   Úpathlibr	   Útimeitr
   rZ  Útypingr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rb  rê   Úcymem.cymemr   Ú	thinc.apir   r   r   r   Ú
thinc.utilr    rÇ   r"   r#   r$   Úcompatr%   Úerrorsr&   r'   Úgit_infor(   Úlang.punctuationr)   r*   r+   Úlang.tokenizer_exceptionsr,   r-   r‡   r.   Úpipe_analysisr/   r0   r1   Úschemasr2   r3   r4   r5   r6   rR  r7   r™   r9   Útokensr:   Útokens.underscorer;   râ   r<   r=   Útraining.initializer>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   r–   rI   r~   rJ   rK   rT  Ú__file__ÚparentÚDEFAULT_CONFIG_PATHÚload_configr�   ÚDEFAULT_CONFIG_PRETRAIN_PATHrL   rN   r�   rˆ   rp   rh   r  r�   rÚ   rÝ  r  rg   ró  r›  r˜  r~  r¤  r`   rm   rn   Ú<module>r­     s  ðÛ Û Û Û Û Û Û ß 0Ý Ý !ß "Ý Ý )÷÷ ÷ ÷ ó ó& Û Ý ß AÓ AÝ (ç Ñ Ý ß $Ý !ß WÑ Wß AÝ !ß MÑ M÷õ õ Ý  Ý Ý )ß 0ß 9÷
÷ 
õ 
õ !ß &à˜˜˜s˜
Ñ#€ñ ˜8“n×+Ñ+Ð.BÑBÐ Ø×!Ò!Ð"5Ó6€ñ  $ H›~×4Ñ4Ð7WÑWÐ ñ �mÓ$€÷Qñ Qð&˜( J <°Ð#:Ñ;ô ò2÷A"ñ A"ðHD Tð ¨dô ð ÷Gð Gó ðGô �Dô ð4;˜X gÑ.ð ;°4¸±=ô ;ð6Ø˜%  S¨% Ñ0°+Ð>ÀÐCÑDð6à�H˜S (¨3¡-Ð/Ñ0Ñ1ð6ð
 ˜D $¨Ð,Ñ-ð6ð 
ô6÷rñ ÷:	ñ 	ñ (Ó)Ñ rm   