
    h
                        S SK r S SKJr  S SKJr  S SKrS SKJr  SSKJ	r	  SSK	J
r
Jr  SS	KJrJrJrJrJrJr  \R&                  " S
SSS.S9\" SSSSS9\" SSS9\" SSSSS9\" SSSSSS94S\R(                  S\S\S\\   S\4
S  jj5       rg)!    N)Path)Optional)msg   )util)get_sourced_componentsload_model_from_config   )ArgOptappimport_codeparse_config_overridesshow_validation_errorassembleT)allow_extra_argsignore_unknown_options)context_settings.zPath to config file)helpexists
allow_dashz/Output directory to store assembled pipeline in)r   z--codez-czNPath to Python file with additional code (registered functions) to be importedFz	--verbosez-Vz-VVz/Display more information for debugging purposesctxconfig_pathoutput_path	code_pathverbosec                    U(       a-  [         R                  R                  [        R                  5        U(       a$  [        U5      S:w  a+  UR                  5       (       d  [        R                  " SUSS9  [        U R                  5      n[        U5        [        U5         [         R                  " XSS9nSSS5        [        R                  " S5        [        WS	S
9nUR!                  5       n[#        U5      nUR%                  5         UR'                  / UQS9   UR)                  5         SSS5        [        R*                  " S5        [        R                  " S5        Ub=  UR                  5       (       d(  UR-                  S	S9  [        R*                  " SU 35        UR/                  U5        g! , (       d  f       GN= f! , (       d  f       N= f)a  
Assemble a spaCy pipeline from a config file. The config file includes
all settings for initializing the pipeline. To override settings in the
config, e.g. settings that point to local paths or that you want to
experiment with, you can override them as command line options. The
--code argument lets you pass in a Python file that can be used to
register custom functions that are referenced in the config.

DOCS: https://spacy.io/api/cli#assemble
-zConfig file not foundr
   )exitsF)	overridesinterpolateNzInitializing pipelineT)	auto_fill)disablezInitialized pipelinezSerializing to disk)parentszCreated output directory: )r   loggersetLevelloggingDEBUGstrr   r   failr   argsr   r   load_configdividerr	   r!   r   _link_componentsselect_pipes
initializegoodmkdirto_disk)	r   r   r   r   r   r    confignlpsourceds	            L/home/james-whalen/.local/lib/python3.13/site-packages/spacy/cli/assemble.pyassemble_clir8      sS   . W]]+3{+s2;;M;M;O;O(+Q?&sxx0I		{	+!!+PUV 
,KK'(
 4
8C!F$V,G			*G*		- 
.HH#$KK%&{'9'9';';$'-k];<KK 
,	+ 
.	-s   !F2G2
G
G)r'   pathlibr   typingr   typerwasabir    r   r   r	   _utilr   r   r   r   r   r   commandContextboolr8        r7   <module>rD      s          A  *.$O C&;DUYZC&WX #D(D  @P  !Q{D%>op)	) ) 	)
 ~) )	)rC   