Ë
    `›¾jß  ã                   ó  — d dl Zd dlZd dlZd dlmZmZ d dlmZ d dl	Z	d dl
Z
d dlmZ ddlmZ ddlmZ ddlmZmZmZmZmZmZ d	d
lmZmZmZmZmZ  ej<                  ddddœ¬«       edd¬«       eddddd¬«       edddd¬«       edddd¬«      fde
j>                  de de!d e!d!e f
d"„«       Z"	 	 	 d1de de!d e!d#ee    d$df
d%„Z#d2d&e d'e d e!d$e fd(„Z$d$e%fd)„Z&de d*e%d$e fd+„Z'de d$e fd,„Z(	 	 d3d-e d.eee       d#ee    d$dfd/„Z)d$e*fd0„Z+y)4é    N)ÚOptionalÚSequence)Úurljoin)Úmsgé   )Úabout)ÚOLD_MODEL_SHORTCUTS)Úget_minor_versionÚis_in_interactiveÚis_in_jupyterÚ
is_packageÚis_prerelease_versionÚrun_commandé   )ÚSDIST_SUFFIXÚWHEEL_SUFFIXÚArgÚOptÚappÚdownloadT)Úallow_extra_argsÚignore_unknown_options)Úcontext_settings.z$Name of pipeline package to download)ÚhelpFz--directz-dz-Dz'Force direct download of name + versionz--sdistz-SzBDownload sdist (.tar.gz) archive instead of pre-built binary wheelz--urlz-UzDownload from given urlÚctxÚmodelÚdirectÚsdistÚurlc                 ó6   — t        ||||g| j                  ¢­Ž  y)aÀ  
    Download compatible trained pipeline from the default download path using
    pip. If --direct flag is set, the command expects the full package name with
    version. For direct downloads, the compatibility check will be skipped. All
    additional arguments provided to this command will be passed to `pip install`
    on package installation.

    DOCS: https://spacy.io/api/cli#download
    AVAILABLE PACKAGES: https://spacy.io/models
    N)r   Úargs)r   r   r   r   r   s        ú\/home/spazio/kingdom_calls/work5/transenv/lib/python3.12/site-packages/spacy/cli/download.pyÚdownload_clir#      s   € ô< ˆU�F˜E 3Ð2¨¯©Ô2ó    Ú
custom_urlÚreturnc                 ó’  — t        d«      s)t        d«      sd|vrt        j                  d«       |dz   }|rKd| v rt        j                  dd| › d	�d
¬«       | j	                  d«      }dj                  |d d «      }|d   }nL| }| t        v r,t        j                  d| › dt        |    › d�«       t        |    }t        «       }t        ||«      }t        |||«      }	t        |	||«       t        j                  dd|› d�«       t        «       rd}
t        j                  d|
«       y t        «       rd}
t        j                  d|
«       y y )NÚspacyzspacy-nightlyú	--no-depsai  Skipping pipeline package dependencies and setting `--no-deps`. You don't seem to have the spaCy package itself installed (maybe because you've built from source?), so installing the package dependencies would cause spaCy to be downloaded, which probably isn't what you want. If the pipeline package has other dependencies, you'll have to install them manually.)r)   ú/zModel download rejectedzCannot download model 'z>'. Models are expected to be file names, not URLs or fragmentsT)ÚtitleÚtextÚexitsú-Ú éÿÿÿÿz"As of spaCy v3.0, shortcuts like 'z=' are deprecated. Please use the full pipeline package name 'z
' instead.z$Download and installation successfulz-You can now load the package via spacy.load('z')zÉIf you are in a Jupyter or Colab notebook, you may need to restart Python in order to load all the package's dependencies. You can do this by selecting the 'Restart kernel' or 'Restart runtime' option.zRestart to reload dependenciesz·If you are in an interactive Python session, you may need to exit and restart Python to load all the package's dependencies. You can exit with Ctrl-D (or Ctrl-Z and Enter on Windows).)r   r   ÚwarnÚfailÚsplitÚjoinr	   Úget_compatibilityÚget_versionÚget_model_filenameÚdownload_modelÚgoodr   r   )r   r   r   r%   Úpip_argsÚ
componentsÚ
model_nameÚversionÚcompatibilityÚfilenameÚreload_deps_msgs              r"   r   r   9   so  € ô ˜Ô ¤J¨Ô$?Ø˜xÑ'ä�‰ðBô	
ð ˜nÑ,ˆÙà�%‰<Ü�H‰HØ/Ø.¨u¨gÐ5sÐtØõð
 —[‘[ Ó%ˆ
Ø—W‘W˜Z¨¨˜_Ó-ˆ
Ø˜R‘.‰àˆ
ØÔ'Ñ'Ü�H‰HØ4°U°Gð <7Ü7JÈ5Ñ7QÐ6RÐR\ð^ôô -¨UÑ3ˆJÜ)Ó+ˆÜ˜j¨-Ó8ˆä! *¨g°uÓ=€Hä�8˜X zÔ2Ü‡H�HØ.Ø
7¸
°|À2ÐFôô „ðð 	ô 	�‰Ø,Øõ	
ô 
Ô	ðIð 	ô
 	�‰Ø,Øõ	
ð 
r$   r<   r=   c                 óN   — d}|rt         nt        }|j                  | ||¬«      }|S )Nz{m}-{v}/{m}-{v}{s})ÚmÚvÚs)r   r   Úformat)r<   r=   r   Údl_tplÚsuffixr?   s         r"   r7   r7   �   s)   € Ø!€FÙ"�\¬€FØ�}‰}˜z¨W¸ˆ}Ó?€HØ€Or$   c                  óÎ  — t        t        j                  «      rt        j                  } nt        t        j                  «      } t	        j
                  t        j                  «      }|j                  dk7  r8t        j                  d|j                  › d�dt        j                  › d�d¬«       |j                  «       }|d   }| |vrt        j                  d	| › d
�d¬«       ||    S )NéÈ   zServer error (ú)zXCouldn't fetch compatibility table. Please find a package for your spaCy installation (vzc), and download it manually. For more details, see the documentation: https://spacy.io/usage/modelsr   ©r-   r(   z"No compatible packages found for vz	 of spaCy)r   r   Ú__version__r
   ÚrequestsÚgetÚ__compatibility__Ústatus_coder   r2   Újson)r=   ÚrÚ
comp_tableÚcomps       r"   r5   r5   ˆ   sÉ   € ÜœU×.Ñ.Ô/Ü!&×!2Ñ!2‰ä#¤E×$5Ñ$5Ó6ˆÜ�‰”U×,Ñ,Ó-€AØ‡}�}˜ÒÜ�‰Ø˜QŸ]™]˜O¨1Ð-ðÜ#×/Ñ/Ð0ð 1,ð-ð õ	
ð —‘“€JØ�gÑ€DØ�dÑÜ�‰Ð5°g°Y¸iÐHÐPQÕRØ�‰=Ðr$   rT   c                 ór   — | |vr,t        j                  d| › dt        j                  › d�d¬«       ||    d   S )Nz!No compatible package found for 'z
' (spaCy vrJ   r   rK   r   )r   r2   r   rL   ©r   rT   s     r"   r6   r6   ž   sC   € Ø�DÑÜ�‰Ø/°¨w°jÄ×ARÑARÐ@SÐSTÐUØõ	
ð �‰;�q‰>Ðr$   c                 ó.   — t        «       }t        | |«      S )N)r5   r6   rV   s     r"   Úget_latest_versionrX   §   s   € ÜÓ€DÜ�u˜dÓ#Ð#r$   r?   Úuser_pip_argsc                 ó>  — |r|nt         j                  }|j                  d«      st         j                  dz   }t        || «      }|j	                  t         j                  «      st        d| › d�«      ‚|�t        |«      ng }t        «       |z   |gz   }t        |«       y )Nr*   zDownload from z" rejected. Was it a relative path?)	r   Ú__download_url__Úendswithr   Ú
startswithÚ
ValueErrorÚlistÚ_get_pip_install_cmdr   )r?   rY   r%   Úbase_urlÚdownload_urlr:   Úcmds          r"   r8   r8   ¬   s“   € ñ (‰z¬U×-CÑ-C€Hà×Ñ˜SÔ!Ü×)Ñ)¨CÑ/ˆÜ˜8 XÓ.€LØ×"Ñ"¤5×#9Ñ#9Ô:Ü˜>¨(¨Ð3UÐVÓWÐWØ&3Ð&?Œt�MÔ"ÀR€HÜ
Ó
  8Ñ
+¨|¨nÑ
<€CÜ�Õr$   c                  óÌ   — t         j                  j                  d«      �t        j                  dddgS t        j                  d«      rg d¢S t        j                  ddd¬	«       y )
NÚpipz-mÚinstallÚuv)rg   re   rf   zNo package installer foundz]spaCy requires either pip or uv to download models. Please install one of them and try again.r   rK   )	Ú	importlibÚutilÚ	find_specÚsysÚ
executableÚshutilÚwhichr   r2   © r$   r"   r`   r`   À   sS   € Ü‡~�~×Ñ Ó&Ð2Ü—‘  e¨YÐ7Ð7Ü	�‰�dÔ	Ú'Ð'ä�‰Ø(ð8àö		
r$   )FFN)F)NN),Úimportlib.utilrh   rm   rk   Útypingr   r   Úurllib.parser   rM   ÚtyperÚwasabir   r/   r   Úerrorsr	   ri   r
   r   r   r   r   r   Ú_utilr   r   r   r   r   ÚcommandÚContextÚstrÚboolr#   r   r7   Údictr5   r6   rX   r8   r_   r`   ro   r$   r"   ú<module>r|      sÈ  ðÛ Û Û 
ß %Ý  ã Û Ý å Ý (÷÷ ÷ =Õ <ð €‡�ØØ*.È$ÑOôñ �SÐEÔFÙØˆz˜4 Ð,Uôñ ØØØØQô	ñ �4˜ $Ð-FÔGñ3à	�‰ð3ð ð3ð ð	3ð ð3ð 
ò3ó	ð3ð> ØØ $ñ	E
ØðE
àðE
ð ðE
ð ˜‘ð	E
ð 
óE
ñP 3ð °ð ¸Tð Ècó ð˜4ó ð,�sð  $ð ¨3ó ð$˜cð $ có $ð .2Ø $ñØðà˜H S™MÑ*ðð ˜‘ðð 
ó	ð(
˜dô 
r$   