Files
INTUIA/Programa final/spacy/__pycache__/schemas.cpython-312.pyc
T

156 lines
28 KiB
Plaintext
Raw Normal View History

2026-03-15 13:27:50 +00:00
Ë
=û gÝVãó¾ddlZddlZddlmZddlmZddlmZmZm Z m
Z
m Z m Z m
Z
mZmZmZmZ ddlmZmZmZmZmZmZmZmZmZmZddlmZddl"m#Z#m$Z$m%Z%ddl&m'Z'd d
l(m)Z)d d l*m+Z+d d l,m-Z-d d
l.m/Z/erd dl0m1Z1d dl2m3Z3d dl4m5Z5ed«Z6ee e e6ge e e6fe'fZ7ee de8ge dfe'fZ9ee dgee e
e8efgdfe ffe'fZ:deede
e8efde e8fdZ;Gdd«Z<Gdd«Z=e>«dddœde d e e8d!e8d"e?def
d#„Z@dd$d%d&œde d'e
e8efd(e
e8d!e8d e e8de
e8eff d)„ZAdeBde e8fd*„ZCGd+„d,e«ZDGd-„d.e«ZEGd/„d0e8e«ZFGd1„d2e«ZGeeFeGfZHeeDefZIeeEeefZJeeDeEe8eKeLeBe?fZMe+d3ZNGd4„d5e«ZOGd6„d7e«ZPGd8„d9e«ZQGd:„d;e«ZRGd<„d=e«ZSGd>„d?e«ZTGd@„dAe«ZUGdB„dCe«ZVGdD„dEe«ZWeSeReUeVdFœZXGdG„dHe«ZYGdI„dJe«ZZGdK„dLe«Z[GdM„dNe«Z\y#e$r"ddl mZmZmZmZmZmZmZmZmZmZddl!mZYŒ
wxYw)OéN)Ú defaultdict)ÚEnum) Ú
TYPE_CHECKINGÚAnyÚCallableÚDictÚIterableÚListÚOptionalÚTupleÚTypeÚTypeVarÚUnion)
Ú BaseModelÚConstrainedStrÚFieldÚ
StrictBoolÚ StrictFloatÚ StrictIntÚ StrictStrÚValidationErrorÚ create_modelÚ validator)ÚModelMetaclass)ÚConfigValidationErrorÚModelÚ Optimizer)ÚPromiseé)ÚNAMES)ÚLiteral)ÚLookups)Úis_cython_func)ÚLanguage)ÚExample)ÚVocabÚItemTr$r%ÚschemaÚobjÚreturnc óÐ |di|¤ŽgS#t$rÐ}|j«}tt«}|D]c}dj |j dg«Dcgc]
}t
|«Œncc}wc}«}||j|j d««Œe|j«D cgc]\}} d|ddj | «Œncc} }wc} }cYd}~Sd}~wwxYw) zôValidate data against a given pydantic schema.
obj (Dict[str, Any]): JSON-serializable data to validate.
schema (pydantic.BaseModel): The schema to validate against.
RETURNS (List[str]): A list of error messages, if available.
z -> ÚlocÚmsgú[z] z, N©) rÚerrorsrÚlistÚjoinÚgetÚstrÚappendÚitems)
r(r)Úer0ÚdataÚerrorÚerr_locr,r-s
úNC:\Users\garci\AppData\Roaming\Python\Python312\site-packages\spacy/schemas.pyÚvalidater=Fð JÙ
Š
؈ øÜ òJ؈ܜ4Ó ˆÛˆEØ—k‘k°5·9±9¸UÀBÔ3GÓ"HÑ3G¨a¤3 q¥6Ñ3GùÔ"HÓIˆ ‰M× Ñ  §¡¨5Ó!1Õ ð=A¿J¹J¼LÔI¹L±°°S!C5˜˜4Ÿ9™9 S+¹LùÖIûð
Jús4 Œ C%•AC ÁA+ Á*AC Â/!CÃ
C ÃC%Ã C%cóeZdZdZdZy)ÚArgSchemaConfigÚforbidTN©Ú__name__Ú
__module__Ú __qualname__ÚextraÚarbitrary_types_allowedr/ór<r?r?\ó
Ø €EØrGr?cóeZdZdZdZy)ÚArgSchemaConfigExtrar@TNrAr/rGr<rJrJarHrGrJÚArgModelT)ÚexcludeÚnameÚstrictÚfuncrLrMrNcó6i} tj|«}d}|j
j
«D}|j|vrŒ|j|jk(rd}Œ.|j|jk7r |jnt}t|«rdnd} |j|jk7r |jn| }
||
f||j<Œ¡|xr| } | rtnt|d<t|fi|¤ŽS#t$rt|t¬«cYSwxYw)aGenerate a pydantic model for function arguments.
func (Callable): The function to generate the schema for.
exclude (Iterable[str]): Parameter names to ignore.
name (str): Name of created model class.
strict (bool): Don't allow extra arguments if no variable keyword arguments
are allowed on the function.
RETURNS (ModelMetaclass): A pydantic model.
)Ú
__config__FTN.rQ)ÚinspectÚ signatureÚ
ValueErrorrrJÚ
parametersÚvaluesrMÚkindÚ VAR_KEYWORDÚ
annotationÚemptyrr#Údefaultr?) rOrLrMrNÚsig_argsÚsigÚ has_variableÚparamrYÚ
default_emptyr[Ú is_stricts r<Ú
get_arg_modelrbfsð €HðCÜ×Ñ Óð
€LØ×(ˆØ :‰:˜Ñ Ø Ø :‰:˜×  ˆ à).×)9Ñ)9¸U¿[¹[Ò)HU×%Ìcˆ
ô!/¨tÔ 4™¸#ˆ
Ø#(§=¡=°E·K±KÒ#?%—-’-À]ˆØ *¨GÐ4ˆÒð!)ð"Ò+˜+€IÙ09_Ô?S€Hˆ\ÑÜ ˜Ñ Ñ )øô1 òCô˜DÔ-AÔCúsC;Ã;DÄDÚ)Ú get_examplesÚnlp)ÚsectionrMrLÚsettingsrfcóÈt||d¬«} |d i|¤Žj«S#t$r2}|sdnd|}d|d}t||j «||¬«dd}~wwxYw)
aValidate initialization settings against the expected arguments in
the method signature. Will parse values if possible (e.g. int to string)
and return the updated settings dict. Will raise a ConfigValidationError
if types don't match or required values are missing.
func (Callable): The initialize method of a given component etc.
settings (Dict[str, Any]): The settings from the respective [initialize] block.
section (str): Initialize section, for error message.
name (str): Name of the block in the section.
exclude (Iterable[str]): Parameter names to exclude from schema.
RETURNS (Dict[str, Any]): The validated settings.
Ú InitArgModel)rLrMÚ
initializez initialize.z-Error validating initialization settings in [ú])Útitler0ÚconfigÚparentNr/)rbÚdictrrr0) rOrgrfrMrLr(r7Úblockrls r<Úvalidate_init_settingsrqs{ô(˜4¨°~Ô
F€FðÙÑ!˜Ñ!×(øÜ òÙ$+‘ °;¸w¸iÐ1HˆØ¸wÀaÐÜ §¡£
°8ÀDô
àð ûðús&¦ A!¯-AÁA!cód}t|t«rUg}|D]L}t|t«r)|j«Dcic]\}}||«|Œ}}}|j |«ŒN|}t t d|i«Scc}}w)Ncó\t|t«r|tt«kr t|S|S©N)Ú
isinstanceÚintÚlenr )Úks r<ú<lambda>z(validate_token_pattern.<locals>.<lambda>¸s#¤J¨q´#Ô$6¸1¼sÄ5»zº>œ˜a™ÐPÈqÐPrGÚpattern)rur1ror6r5r=ÚTokenPatternSchema)r)Úget_keyÚ convertedrzrxÚvs r<Úvalidate_token_patternrs~áP€GÜ#”tÔØˆ Ûˆ˜'¤4Ô(Ø5<·]±]´E±_©T¨Q°™7 1›: q™=°_Ñ × Ñ ˜WÕ ðˆÜ Ô°CÐ(8Ó 9ùóFs¾A;cóeZdZUedd¬«Zeeedfed<edd¬«Z ee
eed<edd¬«Z ee
eed<edd ¬«Z ee
eed
<edd ¬«Z
ee
eed <edd
¬«Zee
eed<edd¬«Zeeedfed<edd¬«Zeeedfed<edd¬«Zeeedfed<edd¬«Zeeedfed<edd¬«Zeeedfed<edd¬«Zeeedfed<edd¬«Zeeedfed<edd¬«Zeeedfed<edd¬«Zeeedfed <edd!¬«Zeeedfed"<Gd#„d$«Zed%d&d&d&¬'«d(„«Zy))ÚTokenPatternStringNÚregex©ÚaliasÚREGEXÚinÚINÚnot_inÚNOT_INÚ is_subsetÚ IS_SUBSETÚ is_supersetÚ IS_SUPERSETÚ
intersectsÚ
INTERSECTSÚfuzzyÚFUZZYÚfuzzy1ÚFUZZY1Úfuzzy2ÚFUZZY2Úfuzzy3ÚFUZZY3Úfuzzy4ÚFUZZY4Úfuzzy5ÚFUZZY5Úfuzzy6ÚFUZZY6Úfuzzy7ÚFUZZY7Úfuzzy8ÚFUZZY8Úfuzzy9ÚFUZZY9cóeZdZdZdZy)úTokenPatternString.Configr@TN©rBrCrDrEÚallow_population_by_field_namer/rGr<ÚConfigr¥çó
؈Ø)-Ñ&rGÚ*T©ÚpreÚ each_itemÚ allow_reusecó | td«|S©NzNone / null is not allowed©rT©Úclsr~s r<Úraise_for_nonez!TokenPatternString.raise_for_noneëóà ˆ9ÜÐ ˆrG)rBrCrDrr…r rrÚ__annotations__r‡r
r‰rrrrr“r•r—r™rrrr´r/rGr<rrÃsqÙ>CÀDÐPWÔ>X€Eˆ8E˜)Ð%9Ð XÙ$)¨$°dÔ$;€BˆiÑ;Ù(-¨d¸(Ô(C€FˆHT˜) CÙ+0°¸[Ô+I€Iˆx˜˜Y™ÑIÙ-2°4¸}Ô-M€K˜$˜y™/ÑMÙ,1°$¸lÔ,K€J˜˜i™ÑKÙ>CÀDÐPWÔ>X€Eˆ8E˜)Ð%9Ð XÙ?DØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ñ@EØ @€FˆHU˜9Ð&:Ð ÷ˆs˜¨¸$Ôó@ñrGrcóPeZdZUedd¬«Zeeed<edd¬«Zee e
ed<edd¬«Z ee e
ed<edd ¬«Z ee e
ed
<edd ¬«Z
ee e
ed <edd
¬«Zee e
ed<edd¬«Zeee
efed<edd¬«Zeee
efed<edd¬«Zeee
efed<edd¬«Zeee
efed<edd¬«Zeee
efed<edd¬«Zeee
efed<Gdd«Zedddd¬«d „«Zy)!ÚTokenPatternNumberNrr…r†r‡r‰rrrz==ÚEQz!=ÚNEQz>=ÚGEQz<=ÚLEQúGTúLTcóeZdZdZdZy)úTokenPatternNumber.Configr@TNr¦r/rGr<rGTr«có | td«|Ss r<r´z!TokenPatternNumber.raise_for_nonerG)rBrCrDrr…r rr‡r
rr‰rrrrrrr´r/rGr<r¸r¸òs„Ù!& t°7Ô!;€Eˆ8 Ó;Ù$)¨$°dÔ$;€BˆiÑ;Ù(-¨d¸(Ô(C€FˆHT˜) CÙ+0°¸[Ô+I€Iˆx˜˜Y™ÑIÙ-2°4¸}Ô-M€K˜$˜y™/ÑMÙ,1°$¸lÔ,K€J˜˜i™ÑKÙ27¸ÀDÔ2I€Bˆy IÙ38¸ÀTÔ3J€Cˆ%˜  /Ñ 0ÓJÙ38¸ÀTÔ3J€Cˆ%˜  /Ñ 0ÓJÙ38¸ÀTÔ3J€Cˆ%˜  /Ñ 0ÓJÙ27¸ÀCÔ2H€Bˆy HÙ27¸ÀCÔ2H€Bˆy ˆs˜¨¸$Ôó@ñrGr¸cóveZdZUed«Zeed<ed«Zeed<ed«Zeed<ed«Zeed<y )
ÚTokenPatternOperatorSimpleúplusrªÚstarúquestionú exclamationN) rBrCrDrr/rGr< s:Ù “n€Dˆ)Ó “n€Dˆ)Ó# C.€Hˆ& s^€KÔ+rGcó0eZdZejd«Zy)ÚTokenPatternOperatorMinMaxz^({\d+}|{\d+,\d*}|{\d*,\d+})$N)rBrCrDÚreÚcompilerr/rGr<sØ ˆBJ‰JÐ 8ErG)rcÚBrréécóBeZdZUdZeeed<dZeeed<dZeeed<dZ eeed<dZ
eeed<dZ eeed<dZ eeed<dZ
eeed <dZeeed
<dZeeed <dZeeed <dZeeed
<dZeeed<dZeeed<dZeeed<dZeeed<dZeeed<dZeeed<dZeeed<dZeeed<dZeeed<dZeeed<dZeeed<dZ eeed<dZ!eeed<dZ"eeed<dZ#eeed<dZ$eeed<dZ%eeed<dZ&eeed<dZ'eeed <dZ(eeed!<dZ)eeed"<dZ*eeed#<dZ+eeed$<dZ,ee-ed%<e.dd&¬'«Z/ee0e1e2fed(<Gd)„d*«Z3e4d+d,d,¬-«d.„«Z5y)/Ú TokenPatternNÚorthÚtextÚlowerÚposÚtagÚmorphÚdepÚlemmaÚshapeÚent_typeÚent_iobÚent_idÚ ent_kb_idÚnormÚlengthÚspacyÚis_alphaÚis_asciiÚis_digitÚis_lowerÚis_upperÚis_titleÚis_punctÚis_spaceÚ
is_bracketÚis_quoteÚ
is_left_punctÚis_right_punctÚ is_currencyÚis_stopÚ
is_sent_startÚ
sent_startÚlike_numÚlike_urlÚ
like_emailÚopÚ_rƒÚ
underscorecóeZdZdZdZdZy)úTokenPattern.Configr@Tcó"|j«Srt)Úupper)Úvalues r<ryzTokenPattern.Config.<lambda>Is
¨¯ © ¬
rGN)rBrCrDrEÚalias_generatorr/rGr<rÿFs؈Ø)-Ð5‰rGT)có | td«|Ss r<r´zTokenPattern.raise_for_noneKrG)6rBrCrDr Ú StringValuer¶ÚIobValuerãÚ NumberValuerçrÚTokenPatternOperatorrrrÚUnderscoreValuer¨rr´r/rGr<r×r×sfØ"&€Dˆ(
Ó&Ø"&€Dˆ(
Ó&Ø#'€Eˆ8 Ó'Ø!%€CˆÓ%Ø!%€CˆÓ%Ø#'€Eˆ8 Ó'Ø!%€CˆÓ%Ø#'€Eˆ8 Ó'Ø#'€Eˆ8 Ó'Ø&*€Hˆh*Ø"&€GˆX
Ó&Ø$(€FˆH (Ø'+€Iˆx˜ Ñ+Ø"&€Dˆ(
Ó&Ø$(€FˆH (Ø"&€Eˆ8 Ó&Ø%)€Hˆh)Ø%)€Hˆh)Ø%)€Hˆh)Ø%)€Hˆh)Ø%)€Hˆh)Ø%)€Hˆh)Ø%)€Hˆh)Ø%)€Hˆh)Ø'+€J˜Ñ+Ø%)€Hˆh)Ø*.€M8˜.Ø+/€NH˜/Ø(,€K˜,Ø$(€GˆX
(Ø*.€M8˜.Ø'+€J˜Ñ+Ø%)€Hˆh)Ø%)€Hˆh)Ø'+€J˜Ñ+Ø)-€BˆÐ-Ù=BÀ4ÈsÔ=S€J˜˜i¨Ð
ˆs˜¨$ÔórGr×cóFeZdZUedd¬«Zeeed<Gdd«Zy)r{.r)Ú min_itemsrzcóeZdZdZy)úTokenPatternSchema.Configr@rBrCrDrEr/rGr<r
UóØrGN) rBrCrDrrzr
r×r/rGr<r{r{Rs"Ù"'¨°qÔ"9€GˆT
ÓòrGr{cóbeZdZUedd¬«Zeed<edd¬«Zeed<edd¬«Zeed<ed d
¬«Z eed <ed d
¬«Z
eed<egd¬«Z e eed<egd¬«Z
e eed<ed d¬«Zeed<ed d¬«Zeed<ed d¬«Zeed<ed d¬«Zeed<ed d¬«Zeed<edd¬«Zeee ee eeeffed<eid ¬«Zeeefed!<eid"¬«Zeee efed#<eid$¬«Zeeefed%<ed d&¬«Zeed'<y)(ÚModelMetaSchema.z#Two-letter language code, e.g. 'en'©rlÚlangz
Model namerMz
Model versionÚversionrcz#Compatible spaCy version identifierÚ
spacy_versionrçz9Name of parent spaCy package, e.g. spacy or spacy-nightlyÚparent_packagezIAdditional Python package dependencies, used for the Python package setupÚ requirementszNames of pipeline componentsÚpipelinezModel descriptionÚ descriptionz
Model licenseÚlicensezModel author nameÚauthorzModel author emailÚemailzModel author URLÚurlNzTraining data sourcesÚsourceszIncluded word vectorsÚvectorsz)Component labels, keyed by component nameÚlabelszAccuracy and speed numbersÚ performancezCommit of spaCy version usedÚspacy_git_version)rBrCrDrrrrMrrrrr
rrrrrrrr rrr4rrr r!r"r/rGr<rr\s}á˜CÐ'LÔM€Dˆ˜C 4€Dˆ)Ó˜s¨/Ô:€Gˆ$ RÐ/TÔU€MUÙ % gÐ5pÔ q€NqÙ$)¨"Ð4ô%A€L$yAÙ % bÐ0NÔ O€Hˆd9‰oÓ" 2Ð-@ÔA€KÓ˜r¨Ô9€Gˆ˜bÐ(;Ô<€Fˆ˜RÐ';Ô<€Eˆ˜2Ð%7Ô8€CˆÓ8ÙFKÈDÐXoÔFp€GˆXe˜D ™O¨T°$°s¸C°x±.Ñ-AÐ
# BÐ.EÔF€GˆT#s(‰^ÓFÙ#(¨Ð3^Ô#_€FˆDd˜3iÑ Ó_Ù"'¨Ð2NÔ"O€Kc˜3hÓOÙ#(¨Ð3QÔ#RÐRrGrcó eZdZUedd¬«Zeed<edd¬«Zeed<edd¬«Ze ed<edd ¬«Z
e ed
<edd ¬«Z e
ed <edd
¬«Ze
ed<edd¬«Ze
ed<edd¬«Ze
ed<edd¬«Zee
ed<edd¬«Zeeed<edd¬«Ze
ed<edd¬«Zeeeee e
ffed<edd¬«Zeed<edd¬«Zeed<edd¬«Zeeed <edd!¬«Zeeed"<edd#¬«Z ee!d$gd$fed%<edd&¬«Z"ee!d$eee#fgd'fed(<Gd)„d*«Z$y')+ÚConfigSchemaTraining.z"Path in the config to the dev datarÚ
dev_corpusú'Path in the config to the training dataÚ train_corpusúBatcher for the training dataÚbatcherú Dropout rateÚdropoutzBHow many steps to continue without improvement in evaluation scoreÚpatienceú%Maximum number of epochs to train forÚ
max_epochsz+Maximum number of update steps to train forÚ max_stepsz-How often to evaluate during training (steps)Úeval_frequencyz Random seedÚseedz$Memory allocator when running on GPUÚ
gpu_allocatorz,Whether to divide the batch up into substepsÚaccumulate_gradientz<Scores to report and their weights for selecting final modelÚ
score_weightsúThe optimizer to useÚ optimizerz%The logger to track training progressÚloggerz=Pipeline components that shouldn't be updated during trainingÚfrozen_componentsz?Pipeline components that should set annotations during trainingÚannotating_componentszPOptional callback to modify nlp object after training, before it's saved to diskr$Úbefore_to_diskzDOptional callback that is invoked at the start of each training stepNÚ
before_updatecóeZdZdZdZy)úConfigSchemaTraining.Configr@TNrAr/rGr<r=ó
؈Ø"&ÑrG)%rBrCrDrr%rr'r)ÚBatcherr+rr,rr.r/r0r1r r2r3r4rrr6rr7ÚLoggerr8r
r4r9r:rr;rr/rGr<r$r$zá! #Ð-QÔR€J Ó# CÐ/XÔY€L˜SÐ(GÔH€GˆWÓ  ¨NÔ;€Gˆ[Ó Ð+oÔp€Hˆ! #Ð-TÔU€J Ó  Ð,YÔZ€IˆZÙ % cÐ1`Ô a€NaÙ % Ô ?€Dˆ(
Ó?Ù).¨sÐ:`Ô)a€M8˜aÙ%*¨3Ð6dÔ%eИÓeÙNSÐTWð`^ôO_€M4˜  8¨E°+¸yÐ2HÑ,IÑ#JÐ_Ù  Ð,BÔC€Iˆ˜3Ð&MÔN€FˆNÙ#(¨Ð4sÔ#tÐt˜CtÙ',¨SÐ8yÔ'zИ4 ™9ÓzÙCHÈðUgôDh€NH˜X z l°JÐ&>ÑhÙLQÐRUð^dôMe€M8˜H j°$°s¸C°x±.Ð%AÀ4Ð%GÑe÷'rGr$có„eZdZUedd¬«Zeed<edd¬«Zeeed<edd¬«Z eeed<edd ¬«Z
e ed
<edd ¬«Z e
e ed ged fed
<edd¬«Ze
e d gd fed<edd¬«Ze
e d gd fed<edd¬«Ze
eed<edd¬«Ze ed<Gdd«Zy)ÚConfigSchemaNlp.zThe base language to userrz%The pipeline component names in orderrz)Pipeline components to disable by defaultÚdisabledzThe tokenizer to useÚ tokenizerz@Optional callback to modify Language class before initializationr$Úbefore_creationz\Optional callback to modify nlp object after creation and before the pipeline is constructedÚafter_creationzHOptional callback to modify nlp object after the pipeline is constructedÚafter_pipeline_creationzDefault batch sizeÚ
batch_sizezVectors implementationrcóeZdZdZdZy)úConfigSchemaNlp.Configr@TNrAr/rGr<rJ¢r>rGN)rBrCrDrrrrr