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

64 lines
11 KiB
Plaintext
Raw Normal View History

2026-03-15 13:27:50 +00:00
Ë
=û g«%ãó¸UddlZddlZddlZddlmZddlmZddlmZm Z m
Z
m Z m Z m
Z
ddlZddlmZddlmZmZddlmZdd lmZmZmZmZd
d lmZmZmZmZeeeeeed œZ e e!e d
e
effe"d<dZ#dZ$Gdde!e«Z%ejLd«ed
dd¬«edddd¬«edddd¬«ed
dd d!¬«ed"d#d$d%¬«edd&d'd(d)¬«ed"d*d+d,¬«ed"d-d.d/¬«ee#d0d1d2e'e jQ««¬«edd3d4d5d¬«edd6d7d8¬«edd9d:d;¬«f d<e!d=ed>e%d?e)d@e*dAe e!dBe*dCe*dDe!dEe edFe e!dGe*fdH„«Z+dId
d"dd"d"ddd"dddJœ d<ed=e
e!efd>e!d?e)d@e*dAe e!dBe*dCe*dDe!dEe edFe e!dGe*dKe*dLe edMdfdN„Z,dOedPe!dMdfdQ„Z-dOedRedPe!dMdfdS„Z.dTe!dMe e!fdU„Z/dLed<ed=e
e!efd>e!dDe!dEe ef dV„Z0d<efdW„Z1y)XéN)ÚEnum)ÚPath)ÚAnyÚCallableÚIterableÚMappingÚOptionalÚUnion)ÚPrinteré)ÚDocÚDocBin)Ú docs_to_json)Úconll_ner_to_docsÚconllu_to_docsÚ iob_to_docsÚ json_to_docsé)ÚArgÚOptÚappÚwalk_directory)Ú conllubioÚconlluÚconllÚnerÚiobÚjson.Ú
CONVERTERSÚauto)rcóeZdZdZdZy)Ú FileTypesrÚspacyN)Ú__name__Ú
__module__Ú __qualname__rr#©óúRC:\Users\garci\AppData\Roaming\Python\Python312\site-packages\spacy/cli/convert.pyr"r"*s Ø €DØ Er(r"ÚconvertzInput file or directoryT)ÚhelpÚexistsú-z!Output directory. '-' for stdout.)r+Ú
allow_dashr,r#z --file-typez-tzType of data to produce)r+z --n-sentsz-nz*Number of sentences per doc (0 to disable)Fz --seg-sentsz-szSegment sentences (for -c ner)z--modelz--basez-bzQTrained spaCy pipeline for sentence segmentation to use as base (for --seg-sents)z --morphologyz-mz#Enable appending morphology to tagsz--merge-subtokensz-TzMerge CoNLL-U subtokensz --converterz-cz Converter: z --ner-mapz-nmz6NER tag mapping (as JSON-encoded dict of entity types)z--langz-lz Language (if tokenizer required)z
--concatenatez-Cz#Concatenate output to a single fileÚ
input_pathÚ
output_dirÚ file_typeÚn_sentsÚ seg_sentsÚmodelÚ
morphologyÚmerge_subtokensÚ converterÚner_mapÚlangÚ concatenatec óôt|«}|td«k(rdn|}|dk(} t| ¬«}
t|
||«}t|
|||j|| «t |||j||||||| |
| | |
¬«y)
Convert files into json or DocBin format for training. The resulting .spacy
file can be used with the train command and other experiment management
functions.
If no output_dir is specified and the output format is JSON, the data
is written to stdout, so you can pipe them forward to a JSON file:
$ spacy convert some_file.conllu --file-type json > some_file.json
DOCS: https://spacy.io/api/cli#convert
r-©Úno_print) r1r2r3r4r5r6r7r8r9r:ÚsilentÚmsgN)rr Ú_get_converterÚverify_cli_argsÚvaluer*)r/r0r1r2r3r4r5r6r7r8r9r:r>r?s r)Ú convert_clirC/ô8!€JØ*4¼¸S» Ò*A¡3Àz€JØ
˜
€FÜ
˜
"€Cܘs I¨zÓ:€IÜ Z°·±À)ÈWÔ ØØØ—/‘/ØØØØØØØ
ØØØ ör(r) r1r2r3r4r5r6r8r9r:r>r?r>r?Úreturnc ó®t|«}|
s t| ¬«}
| tj| «nd} g}t ||«D][}|j dd¬«5}|j
«}ddd«t|}||||||
|| | ¬« }|j||f«Œ]| r7tjj|Dcgc]\}}|Œ c}}«}||fg}|D\}}|dk(rt|«g}t|«}n(t|d¬«}t|«}|j«}|d k(r
t!||«Œ]||k7r2|j#|«}t|«|j%d
|«z }n/t|«|j&d z }|j%d
|«}t)|||«|
j+d |d
|«Œèy#1swYŒ^xYwcc}}w)Nr<Úrzutf-8©Úencoding)r2r3Úappend_morphologyr6r9r4r=r8rT)ÚdocsÚstore_user_datar-ú.éÿÿÿÿzGenerated output file (z
documents): )rr ÚsrslyÚ read_jsonrÚopenÚreadrÚappendÚ itertoolsÚchainÚ
from_iterablerÚlenrÚto_bytesÚ_print_docs_to_stdoutÚ relative_toÚ with_suffixÚpartsÚ_write_docs_to_fileÚgood)r/r0r1r2r3r4r5r6r7r8r9r:r>r?Ú doc_filesÚ input_locÚinfileÚ
input_dataÚfuncrJÚall_docsÚdataÚlen_docsÚdbÚsubpathÚ output_files r)r*r*cô"!€J٠ܘ&ˆØ*1Ð*=Œeo‰o˜&À4€GØ€IÜ# J° Ö:ˆ Ø
^‰^˜C¨'ˆ
2°fØŸˆJ÷˜)ÑÙØ ØØØØØØô

ˆð ×ј) +ð!;ñ"Ü—??×0ÁiÔ1PÁi¹7¸1¸d²$ÀiÒ1PÓQˆØ  (Ð,ˆ Û$‰ˆ ˜Ò Ü  Ó'ˆ˜4“y‰Hä˜T°4Ô8ˆBܘ2“wˆHØ—;‘;“=ˆDØ ˜Ò Ü ! $¨ Õ ˜#×
Ó;Ü" ×1DÑ1DÀqÈÈ À_Ó1UÑU ä" ·±ÀÑ1DÑD ظ)¸°oÓF Ü   k°9Ô H‰HÐ.¨x¨j¸
ÀkÀ]Ð Tñ%%÷'
2üó"2QsÁGÂ? G
ÇG reÚ output_typecóŽ|dk(rtjd|«ytjjj |«y)Nrr-)rNÚ
write_jsonÚsysÚstdoutÚbufferÚwrite)rerjs r)rXrX¢s2ØÜ
×ј˜