import{s as Ra,o as Aa,n as G}from"../chunks/scheduler.25b97de1.js";import{S as Ya,i as Oa,g as n,s,r as f,m as Ka,A as en,h as l,f as t,c as o,j as M,u,x as p,n as tn,k as y,y as r,a as i,v as h,d as g,t as _,w as v}from"../chunks/index.d9030fc9.js";import{T as No}from"../chunks/Tip.baa67368.js";import{D as P}from"../chunks/Docstring.ffac8efa.js";import{C as be}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Mr}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as xe,E as rn}from"../chunks/EditOnGithub.91d95064.js";function sn(U){let d,w=`This class method is simply calling the feature extractor
<a href="/docs/transformers/pr_22105/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a>, image processor
<a href="/docs/transformers/pr_22105/en/internal/image_processing_utils#transformers.ImageProcessingMixin">ImageProcessingMixin</a> and the tokenizer
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code> methods. Please refer to the docstrings of the
methods above for more information.`;return{c(){d=n("p"),d.innerHTML=w},l($){d=l($,"P",{"data-svelte-h":!0}),p(d)!=="svelte-102atj5"&&(d.innerHTML=w)},m($,m){i($,d,m)},p:G,d($){$&&t(d)}}}function on(U){let d,w="And we define the call method as:",$,m,x;return m=new be({props:{code:"ZGVmJTIwX19jYWxsX18oJTBBJTIwJTIwJTIwJTIwc2VsZiUyQyUwQSUyMCUyMCUyMCUyMHRleHQlM0ElMjBzdHIlMkMlMEElMjAlMjAlMjAlMjBpbWFnZXMlM0ElMjBPcHRpb25hbCU1QkltYWdlSW5wdXQlNUQlMjAlM0QlMjBOb25lJTJDJTBBJTIwJTIwJTIwJTIwKmFyZyUyQyUwQSUyMCUyMCUyMCUyMGF1ZGlvJTNETm9uZSUyQyUwQSUyMCUyMCUyMCUyMHZpZGVvcyUzRE5vbmUlMkMlMEEp",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">__call__</span>(<span class="hljs-params">
    self,
    text: <span class="hljs-built_in">str</span>,
    images: <span class="hljs-type">Optional</span>[ImageInput] = <span class="hljs-literal">None</span>,
    *arg,
    audio=<span class="hljs-literal">None</span>,
    videos=<span class="hljs-literal">None</span>,
</span>)`,wrap:!1}}),{c(){d=n("p"),d.textContent=w,$=s(),f(m.$$.fragment)},l(c){d=l(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-ft0bna"&&(d.textContent=w),$=o(c),u(m.$$.fragment,c)},m(c,T){i(c,d,T),i(c,$,T),h(m,c,T),x=!0},p:G,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(d),t($)),v(m,c)}}}function an(U){let d,w="Then, if we call the processor as:",$,m,x;return m=new be({props:{code:"aW1hZ2VzJTIwJTNEJTIwJTVCLi4uJTVEJTBBcHJvY2Vzc29yKCUyMldoYXQlMjBpcyUyMGNvbW1vbiUyMGluJTIwdGhlc2UlMjBpbWFnZXMlM0YlMjIlMkMlMjBpbWFnZXMlMkMlMjBhcmdfdmFsdWVfMSUyQyUyMGFyZ192YWx1ZV8yKQ==",highlighted:`images = [...]
processor(<span class="hljs-string">&quot;What is common in these images?&quot;</span>, images, arg_value_1, arg_value_2)`,wrap:!1}}),{c(){d=n("p"),d.textContent=w,$=s(),f(m.$$.fragment)},l(c){d=l(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-k5ldhr"&&(d.textContent=w),$=o(c),u(m.$$.fragment,c)},m(c,T){i(c,d,T),i(c,$,T),h(m,c,T),x=!0},p:G,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(d),t($)),v(m,c)}}}function nn(U){let d,w="Then, this method will return:",$,m,x;return m=new be({props:{code:"JTdCJTBBJTIwJTIwJTIwJTIwJTIyYXJnX25hbWVfMSUyMiUzQSUyMGFyZ192YWx1ZV8xJTJDJTBBJTIwJTIwJTIwJTIwJTIyYXJnX25hbWVfMiUyMiUzQSUyMGFyZ192YWx1ZV8yJTJDJTBBJTdE",highlighted:`{
    <span class="hljs-string">&quot;arg_name_1&quot;</span>: arg_value_1,
    <span class="hljs-string">&quot;arg_name_2&quot;</span>: arg_value_2,
}`,wrap:!1}}),{c(){d=n("p"),d.textContent=w,$=s(),f(m.$$.fragment)},l(c){d=l(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-wadzyw"&&(d.textContent=w),$=o(c),u(m.$$.fragment,c)},m(c,T){i(c,d,T),i(c,$,T),h(m,c,T),x=!0},p:G,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(d),t($)),v(m,c)}}}function ln(U){let d,w="Examples:",$,m,x;return m=new be({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUtYmVydCUyRmJlcnQtYmFzZS1jYXNlZCUyMiklMEElMEElMjMlMjBQdXNoJTIwdGhlJTIwcHJvY2Vzc29yJTIwdG8lMjB5b3VyJTIwbmFtZXNwYWNlJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEFwcm9jZXNzb3IucHVzaF90b19odWIoJTIybXktZmluZXR1bmVkLWJlcnQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMHByb2Nlc3NvciUyMHRvJTIwYW4lMjBvcmdhbml6YXRpb24lMjB3aXRoJTIwdGhlJTIwbmFtZSUyMCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyLiUwQXByb2Nlc3Nvci5wdXNoX3RvX2h1YiglMjJodWdnaW5nZmFjZSUyRm15LWZpbmV0dW5lZC1iZXJ0JTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google-bert/bert-base-cased&quot;</span>)

<span class="hljs-comment"># Push the processor to your namespace with the name &quot;my-finetuned-bert&quot;.</span>
processor.push_to_hub(<span class="hljs-string">&quot;my-finetuned-bert&quot;</span>)

<span class="hljs-comment"># Push the processor to an organization with the name &quot;my-finetuned-bert&quot;.</span>
processor.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`,wrap:!1}}),{c(){d=n("p"),d.textContent=w,$=s(),f(m.$$.fragment)},l(c){d=l(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-kvfsh7"&&(d.textContent=w),$=o(c),u(m.$$.fragment,c)},m(c,T){i(c,d,T),i(c,$,T),h(m,c,T),x=!0},p:G,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(d),t($)),v(m,c)}}}function cn(U){let d,w="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){d=n("p"),d.textContent=w},l($){d=l($,"P",{"data-svelte-h":!0}),p(d)!=="svelte-15rpg4"&&(d.textContent=w)},m($,m){i($,d,m)},p:G,d($){$&&t(d)}}}function dn(U){let d,w=`This class method is simply calling <a href="/docs/transformers/pr_22105/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/pr_22105/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a>. Please refer to the docstrings of the
methods above for more information.`;return{c(){d=n("p"),d.innerHTML=w},l($){d=l($,"P",{"data-svelte-h":!0}),p(d)!=="svelte-l6r40y"&&(d.innerHTML=w)},m($,m){i($,d,m)},p:G,d($){$&&t(d)}}}function pn(U){let d,w="Examples:",$,m,x;return m=new be({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvd19kYXRhc2V0cyUyMGFzJTIwdGZkcyUwQSUwQWRhdGFzZXQlMjAlM0QlMjB0ZmRzLmxvYWQoJTIyc3F1YWQlMjIpJTBBJTBBdHJhaW5pbmdfZXhhbXBsZXMlMjAlM0QlMjBnZXRfZXhhbXBsZXNfZnJvbV9kYXRhc2V0KGRhdGFzZXQlMkMlMjBldmFsdWF0ZSUzREZhbHNlKSUwQWV2YWx1YXRpb25fZXhhbXBsZXMlMjAlM0QlMjBnZXRfZXhhbXBsZXNfZnJvbV9kYXRhc2V0KGRhdGFzZXQlMkMlMjBldmFsdWF0ZSUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow_datasets <span class="hljs-keyword">as</span> tfds

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = tfds.load(<span class="hljs-string">&quot;squad&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>training_examples = get_examples_from_dataset(dataset, evaluate=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>evaluation_examples = get_examples_from_dataset(dataset, evaluate=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){d=n("p"),d.textContent=w,$=s(),f(m.$$.fragment)},l(c){d=l(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-kvfsh7"&&(d.textContent=w),$=o(c),u(m.$$.fragment,c)},m(c,T){i(c,d,T),i(c,$,T),h(m,c,T),x=!0},p:G,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(d),t($)),v(m,c)}}}function mn(U){let d,w="Example:",$,m,x;return m=new be({props:{code:"cHJvY2Vzc29yJTIwJTNEJTIwU3F1YWRWMlByb2Nlc3NvcigpJTBBZXhhbXBsZXMlMjAlM0QlMjBwcm9jZXNzb3IuZ2V0X2Rldl9leGFtcGxlcyhkYXRhX2RpciklMEElMEFmZWF0dXJlcyUyMCUzRCUyMHNxdWFkX2NvbnZlcnRfZXhhbXBsZXNfdG9fZmVhdHVyZXMoJTBBJTIwJTIwJTIwJTIwZXhhbXBsZXMlM0RleGFtcGxlcyUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRHRva2VuaXplciUyQyUwQSUyMCUyMCUyMCUyMG1heF9zZXFfbGVuZ3RoJTNEYXJncy5tYXhfc2VxX2xlbmd0aCUyQyUwQSUyMCUyMCUyMCUyMGRvY19zdHJpZGUlM0RhcmdzLmRvY19zdHJpZGUlMkMlMEElMjAlMjAlMjAlMjBtYXhfcXVlcnlfbGVuZ3RoJTNEYXJncy5tYXhfcXVlcnlfbGVuZ3RoJTJDJTBBJTIwJTIwJTIwJTIwaXNfdHJhaW5pbmclM0Rub3QlMjBldmFsdWF0ZSUyQyUwQSk=",highlighted:`processor = SquadV2Processor()
examples = processor.get_dev_examples(data_dir)

features = squad_convert_examples_to_features(
    examples=examples,
    tokenizer=tokenizer,
    max_seq_length=args.max_seq_length,
    doc_stride=args.doc_stride,
    max_query_length=args.max_query_length,
    is_training=<span class="hljs-keyword">not</span> evaluate,
)`,wrap:!1}}),{c(){d=n("p"),d.textContent=w,$=s(),f(m.$$.fragment)},l(c){d=l(c,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=w),$=o(c),u(m.$$.fragment,c)},m(c,T){i(c,d,T),i(c,$,T),h(m,c,T),x=!0},p:G,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(d),t($)),v(m,c)}}}function fn(U){let d,w,$,m,x,c,T,So="Processors can mean two different things in the Transformers library:",wr,Me,Fo=`<li>the objects that pre-process inputs for multi-modal models such as <a href="../model_doc/wav2vec2">Wav2Vec2</a> (speech and text)
or <a href="../model_doc/clip">CLIP</a> (text and vision)</li> <li>deprecated objects that were used in older versions of the library to preprocess data for GLUE or SQUAD.</li>`,Tr,ye,Cr,we,Do=`Any multi-modal model will require an object to encode or decode the data that groups several modalities (among text,
vision and audio). This is handled by objects called processors, which group together two or more processing objects
such as tokenizers (for the text modality), image processors (for vision) and feature extractors (for audio).`,Pr,Te,Wo="Those processors inherit from the following base class that implements the saving and loading functionality:",Jr,b,Ce,Js,Vt,Go="This is a mixin used to provide saving/loading functionality for all processor classes.",Is,Q,Pe,ks,Et,Qo=`Similar to the <code>apply_chat_template</code> method on tokenizers, this method applies a Jinja template to input
conversations to turn them into a single tokenizable string.`,Us,R,Je,js,zt,Ro="Instantiates a type of <code>~processing_utils.ProcessingMixin</code> from a Python dictionary of parameters.",Ls,V,Ie,Xs,Ht,Ao="Instantiate a processor associated with a pretrained model.",Zs,A,qs,Y,ke,Vs,Bt,Yo=`From a <code>pretrained_model_name_or_path</code>, resolve to a dictionary of parameters, to be used for instantiating a
processor of type <code>~processing_utils.ProcessingMixin</code> using <code>from_args_and_dict</code>.`,Es,O,Ue,zs,Nt,Oo="Post-process the output of a vlm to decode the text.",Hs,J,je,Bs,St,Ko=`Matches optional positional arguments to their corresponding names in <code>optional_call_args</code>
in the processor class in the order they are passed to the processor call.`,Ns,Ft,ea=`Note that this should only be used in the <code>__call__</code> method of the processors with special
arguments. Special arguments are arguments that aren’t <code>text</code>, <code>images</code>, <code>audio</code>, nor <code>videos</code>
but also aren’t passed to the tokenizer, image processor, etc. Examples of such processors are:`,Ss,Dt,ta="<li><code>CLIPSegProcessor</code></li> <li><code>LayoutLMv2Processor</code></li> <li><code>OwlViTProcessor</code></li>",Fs,Wt,ra=`Also note that passing by position to the processor call is now deprecated and will be disallowed
in future versions. We only have this for backward compatibility.`,Ds,Gt,sa=`Example:
Suppose that the processor class has <code>optional_call_args = [&quot;arg_name_1&quot;, &quot;arg_name_2&quot;]</code>.`,Ws,K,Gs,ee,Qs,te,Rs,As,E,Le,Ys,Qt,oa="Upload the processor files to the 🤗 Model Hub.",Os,re,Ks,z,Xe,eo,Rt,aa=`Register this class with a given auto class. This should only be used for custom feature extractors as the ones
in the library are already mapped with <code>AutoProcessor</code>.`,to,se,ro,H,Ze,so,At,na=`Saves the attributes of this processor (feature extractor, tokenizer…) in the specified directory so that it
can be reloaded using the <a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.ProcessorMixin.from_pretrained">from_pretrained()</a> method.`,oo,oe,ao,ae,qe,no,Yt,la="Serializes this instance to a Python dictionary.",lo,ne,Ve,io,Ot,ia="Save this instance to a JSON file.",co,le,Ee,po,Kt,ca="Serializes this instance to a JSON string.",Ir,ze,kr,He,da=`All processors follow the same architecture which is that of the
<a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.DataProcessor">DataProcessor</a>. The processor returns a list of
<a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.InputExample">InputExample</a>. These
<a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.InputExample">InputExample</a> can be converted to
<a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.InputFeatures">InputFeatures</a> in order to be fed to the model.`,Ur,k,Be,mo,er,pa="Base class for data converters for sequence classification data sets.",fo,ie,Ne,uo,tr,ma='Gets a collection of <a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.InputExample">InputExample</a> for the dev set.',ho,ce,Se,go,rr,fa="Gets an example from a dict with tensorflow tensors.",_o,de,Fe,vo,sr,ua="Gets the list of labels for this data set.",$o,pe,De,xo,or,ha='Gets a collection of <a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.InputExample">InputExample</a> for the test set.',bo,me,We,Mo,ar,ga='Gets a collection of <a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.InputExample">InputExample</a> for the train set.',yo,fe,Ge,wo,nr,_a=`Some tensorflow_datasets datasets are not formatted the same way the GLUE datasets are. This method converts
examples to the correct format.`,jr,X,Qe,To,lr,va="A single training/test example for simple sequence classification.",Co,ue,Re,Po,ir,$a="Serializes this instance to a JSON string.",Lr,Z,Ae,Jo,cr,xa="A single set of features of data. Property names are the same names as the corresponding inputs to a model.",Io,he,Ye,ko,dr,ba="Serializes this instance to a JSON string.",Xr,Oe,Zr,Ke,Ma=`<a href="https://gluebenchmark.com/" rel="nofollow">General Language Understanding Evaluation (GLUE)</a> is a benchmark that evaluates the
performance of models across a diverse set of existing NLU tasks. It was released together with the paper <a href="https://openreview.net/pdf?id=rJ4km2R5t7" rel="nofollow">GLUE: A
multi-task benchmark and analysis platform for natural language understanding</a>`,qr,et,ya=`This library hosts a total of 10 processors for the following tasks: MRPC, MNLI, MNLI (mismatched), CoLA, SST2, STSB,
QQP, QNLI, RTE and WNLI.`,Vr,tt,wa="Those processors are:",Er,rt,Ta="<li><code>~data.processors.utils.MrpcProcessor</code></li> <li><code>~data.processors.utils.MnliProcessor</code></li> <li><code>~data.processors.utils.MnliMismatchedProcessor</code></li> <li><code>~data.processors.utils.Sst2Processor</code></li> <li><code>~data.processors.utils.StsbProcessor</code></li> <li><code>~data.processors.utils.QqpProcessor</code></li> <li><code>~data.processors.utils.QnliProcessor</code></li> <li><code>~data.processors.utils.RteProcessor</code></li> <li><code>~data.processors.utils.WnliProcessor</code></li>",zr,st,Ca=`Additionally, the following method can be used to load values from a data file and convert them to a list of
<a href="/docs/transformers/pr_22105/en/main_classes/processors#transformers.InputExample">InputExample</a>.`,Hr,S,ot,Uo,pr,Pa="Loads a data file into a list of <code>InputFeatures</code>",Br,at,Nr,nt,Ja=`<a href="https://www.nyu.edu/projects/bowman/xnli/" rel="nofollow">The Cross-Lingual NLI Corpus (XNLI)</a> is a benchmark that evaluates the
quality of cross-lingual text representations. XNLI is crowd-sourced dataset based on <a href="http://www.nyu.edu/projects/bowman/multinli/" rel="nofollow"><em>MultiNLI</em></a>: pairs of text are labeled with textual entailment annotations for 15
different languages (including both high-resource language such as English and low-resource languages such as Swahili).`,Sr,lt,Ia='It was released together with the paper <a href="https://arxiv.org/abs/1809.05053" rel="nofollow">XNLI: Evaluating Cross-lingual Sentence Representations</a>',Fr,it,ka="This library hosts the processor to load the XNLI data:",Dr,ct,Ua="<li><code>~data.processors.utils.XnliProcessor</code></li>",Wr,dt,ja="Please note that since the gold labels are available on the test set, evaluation is performed on the test set.",Gr,pt,La='An example using these processors is given in the <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification/run_xnli.py" rel="nofollow">run_xnli.py</a> script.',Qr,mt,Rr,ft,Xa=`<a href="https://rajpurkar.github.io/SQuAD-explorer//" rel="nofollow">The Stanford Question Answering Dataset (SQuAD)</a> is a benchmark that
evaluates the performance of models on question answering. Two versions are available, v1.1 and v2.0. The first version
(v1.1) was released together with the paper <a href="https://arxiv.org/abs/1606.05250" rel="nofollow">SQuAD: 100,000+ Questions for Machine Comprehension of Text</a>. The second version (v2.0) was released alongside the paper <a href="https://arxiv.org/abs/1806.03822" rel="nofollow">Know What You Don’t
Know: Unanswerable Questions for SQuAD</a>.`,Ar,ut,Za="This library hosts a processor for each of the two versions:",Yr,ht,Or,gt,qa="Those processors are:",Kr,_t,Va="<li><code>~data.processors.utils.SquadV1Processor</code></li> <li><code>~data.processors.utils.SquadV2Processor</code></li>",es,vt,Ea="They both inherit from the abstract class <code>~data.processors.utils.SquadProcessor</code>",ts,L,$t,jo,mr,za=`Processor for the SQuAD data set. overridden by SquadV1Processor and SquadV2Processor, used by the version 1.1 and
version 2.0 of SQuAD, respectively.`,Lo,ge,xt,Xo,fr,Ha="Returns the evaluation example from the data directory.",Zo,B,bt,qo,ur,Ba="Creates a list of <code>SquadExample</code> using a TFDS dataset.",Vo,_e,Eo,ve,Mt,zo,hr,Na="Returns the training examples from the data directory.",rs,yt,Sa=`Additionally, the following method can be used to convert SQuAD examples into
<code>~data.processors.utils.SquadFeatures</code> that can be used as model inputs.`,ss,q,wt,Ho,gr,Fa=`Converts a list of examples into a list of features that can be directly given as input to a model. It is
model-dependant and takes advantage of many of the tokenizer’s features to create the model’s inputs.`,Bo,$e,os,Tt,Da=`These processors as well as the aforementioned method can be used with files containing the data as well as with the
<em>tensorflow_datasets</em> package. Examples are given below.`,as,Ct,ns,Pt,Wa="Here is an example using the processors as well as the conversion method using data files:",ls,Jt,is,It,Ga="Using <em>tensorflow_datasets</em> is as easy as using a data file:",cs,kt,ds,Ut,Qa='Another example using these processors is given in the <a href="https://github.com/huggingface/transformers/tree/main/examples/legacy/question-answering/run_squad.py" rel="nofollow">run_squad.py</a> script.',ps,jt,ms,yr,fs;return x=new xe({props:{title:"Processors",local:"processors",headingTag:"h1"}}),ye=new xe({props:{title:"Multi-modal processors",local:"transformers.ProcessorMixin",headingTag:"h2"}}),Ce=new P({props:{name:"class transformers.ProcessorMixin",anchor:"transformers.ProcessorMixin",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L340"}}),Pe=new P({props:{name:"apply_chat_template",anchor:"transformers.ProcessorMixin.apply_chat_template",parameters:[{name:"conversation",val:": List"},{name:"chat_template",val:": Optional = None"},{name:"tokenize",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ProcessorMixin.apply_chat_template.conversation",description:`<strong>conversation</strong> (<code>List[Dict, str, str]</code>) &#x2014;
The conversation to format.`,name:"conversation"},{anchor:"transformers.ProcessorMixin.apply_chat_template.chat_template",description:`<strong>chat_template</strong> (<code>Optional[str]</code>, <em>optional</em>) &#x2014;
The Jinja template to use for formatting the conversation. If not provided, the tokenizer&#x2019;s
chat template is used.`,name:"chat_template"},{anchor:"transformers.ProcessorMixin.apply_chat_template.tokenize",description:`<strong>tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tokenize the output or not.
**kwargs &#x2014;
Additional keyword arguments`,name:"tokenize"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L1074"}}),Je=new P({props:{name:"from_args_and_dict",anchor:"transformers.ProcessorMixin.from_args_and_dict",parameters:[{name:"args",val:""},{name:"processor_dict",val:": Dict"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ProcessorMixin.from_args_and_dict.processor_dict",description:`<strong>processor_dict</strong> (<code>Dict[str, Any]</code>) &#x2014;
Dictionary that will be used to instantiate the processor object. Such a dictionary can be
retrieved from a pretrained checkpoint by leveraging the
<code>~processing_utils.ProcessingMixin.to_dict</code> method.`,name:"processor_dict"},{anchor:"transformers.ProcessorMixin.from_args_and_dict.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>) &#x2014;
Additional parameters from which to initialize the processor object.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L715",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The processor object instantiated from those
parameters.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~processing_utils.ProcessingMixin</code></p>
`}}),Ie=new P({props:{name:"from_pretrained",anchor:"transformers.ProcessorMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"cache_dir",val:": Union = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": Union = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ProcessorMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained feature_extractor hosted inside a model repo on
huggingface.co.</li>
<li>a path to a <em>directory</em> containing a feature extractor file saved using the
<a href="/docs/transformers/pr_22105/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/pr_22105/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L890"}}),A=new No({props:{$$slots:{default:[sn]},$$scope:{ctx:U}}}),ke=new P({props:{name:"get_processor_dict",anchor:"transformers.ProcessorMixin.get_processor_dict",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ProcessorMixin.get_processor_dict.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The identifier of the pre-trained checkpoint from which we want the dictionary of parameters.`,name:"pretrained_model_name_or_path"},{anchor:"transformers.ProcessorMixin.get_processor_dict.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
specify the folder name here.`,name:"subfolder"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L562",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The dictionary(ies) that will be used to instantiate the processor object.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Tuple[Dict, Dict]</code></p>
`}}),Ue=new P({props:{name:"post_process_image_text_to_text",anchor:"transformers.ProcessorMixin.post_process_image_text_to_text",parameters:[{name:"generated_outputs",val:""}],parametersDescription:[{anchor:"transformers.ProcessorMixin.post_process_image_text_to_text.generated_outputs",description:`<strong>generated_outputs</strong> (<code>torch.Tensor</code> or <code>np.ndarray</code>) &#x2014;
The output of the model <code>generate</code> function. The output is expected to be a tensor of shape <code>(batch_size, sequence_length)</code>
or <code>(sequence_length,)</code>.`,name:"generated_outputs"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L1110",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The decoded text.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[str]</code></p>
`}}),je=new P({props:{name:"prepare_and_validate_optional_call_args",anchor:"transformers.ProcessorMixin.prepare_and_validate_optional_call_args",parameters:[{name:"*args",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L1016"}}),K=new Mr({props:{anchor:"transformers.ProcessorMixin.prepare_and_validate_optional_call_args.example",$$slots:{default:[on]},$$scope:{ctx:U}}}),ee=new Mr({props:{anchor:"transformers.ProcessorMixin.prepare_and_validate_optional_call_args.example-2",$$slots:{default:[an]},$$scope:{ctx:U}}}),te=new Mr({props:{anchor:"transformers.ProcessorMixin.prepare_and_validate_optional_call_args.example-3",$$slots:{default:[nn]},$$scope:{ctx:U}}}),Le=new P({props:{name:"push_to_hub",anchor:"transformers.ProcessorMixin.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": Optional = None"},{name:"commit_message",val:": Optional = None"},{name:"private",val:": Optional = None"},{name:"token",val:": Union = None"},{name:"max_shard_size",val:": Union = '5GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"revision",val:": str = None"},{name:"commit_description",val:": str = None"},{name:"tags",val:": Optional = None"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.ProcessorMixin.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your processor to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.ProcessorMixin.push_to_hub.use_temp_dir",description:`<strong>use_temp_dir</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to use a temporary directory to store the files saved before they are pushed to the Hub.
Will default to <code>True</code> if there is no directory named like <code>repo_id</code>, <code>False</code> otherwise.`,name:"use_temp_dir"},{anchor:"transformers.ProcessorMixin.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Will default to <code>&quot;Upload processor&quot;</code>.`,name:"commit_message"},{anchor:"transformers.ProcessorMixin.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not the repository created should be private.`,name:"private"},{anchor:"transformers.ProcessorMixin.push_to_hub.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.ProcessorMixin.push_to_hub.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, <em>optional</em>, defaults to <code>&quot;5GB&quot;</code>) &#x2014;
Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard
will then be each of size lower than this size. If expressed as a string, needs to be digits followed
by a unit (like <code>&quot;5MB&quot;</code>). We default it to <code>&quot;5GB&quot;</code> so that users can easily load models on free-tier
Google Colab instances without any CPU OOM issues.`,name:"max_shard_size"},{anchor:"transformers.ProcessorMixin.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"transformers.ProcessorMixin.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"},{anchor:"transformers.ProcessorMixin.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"},{anchor:"transformers.ProcessorMixin.push_to_hub.commit_description",description:`<strong>commit_description</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The description of the commit that will be created`,name:"commit_description"},{anchor:"transformers.ProcessorMixin.push_to_hub.tags",description:`<strong>tags</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
List of tags to push on the Hub.`,name:"tags"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/utils/hub.py#L828"}}),re=new Mr({props:{anchor:"transformers.ProcessorMixin.push_to_hub.example",$$slots:{default:[ln]},$$scope:{ctx:U}}}),Xe=new P({props:{name:"register_for_auto_class",anchor:"transformers.ProcessorMixin.register_for_auto_class",parameters:[{name:"auto_class",val:" = 'AutoProcessor'"}],parametersDescription:[{anchor:"transformers.ProcessorMixin.register_for_auto_class.auto_class",description:`<strong>auto_class</strong> (<code>str</code> or <code>type</code>, <em>optional</em>, defaults to <code>&quot;AutoProcessor&quot;</code>) &#x2014;
The auto class to register this new feature extractor with.`,name:"auto_class"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L954"}}),se=new No({props:{warning:!0,$$slots:{default:[cn]},$$scope:{ctx:U}}}),Ze=new P({props:{name:"save_pretrained",anchor:"transformers.ProcessorMixin.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ProcessorMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the feature extractor JSON file and the tokenizer files will be saved (directory will
be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.ProcessorMixin.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.ProcessorMixin.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/pr_22105/en/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L460"}}),oe=new No({props:{$$slots:{default:[dn]},$$scope:{ctx:U}}}),qe=new P({props:{name:"to_dict",anchor:"transformers.ProcessorMixin.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L393",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this processor instance.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),Ve=new P({props:{name:"to_json_file",anchor:"transformers.ProcessorMixin.to_json_file",parameters:[{name:"json_file_path",val:": Union"}],parametersDescription:[{anchor:"transformers.ProcessorMixin.to_json_file.json_file_path",description:`<strong>json_file_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Path to the JSON file in which this processor instance&#x2019;s parameters will be saved.`,name:"json_file_path"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L444"}}),Ee=new P({props:{name:"to_json_string",anchor:"transformers.ProcessorMixin.to_json_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/processing_utils.py#L433",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>String containing all the attributes that make up this feature_extractor instance in JSON format.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`}}),ze=new xe({props:{title:"Deprecated processors",local:"transformers.DataProcessor",headingTag:"h2"}}),Be=new P({props:{name:"class transformers.DataProcessor",anchor:"transformers.DataProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L80"}}),Ne=new P({props:{name:"get_dev_examples",anchor:"transformers.DataProcessor.get_dev_examples",parameters:[{name:"data_dir",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L97"}}),Se=new P({props:{name:"get_example_from_tensor_dict",anchor:"transformers.DataProcessor.get_example_from_tensor_dict",parameters:[{name:"tensor_dict",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L83"}}),Fe=new P({props:{name:"get_labels",anchor:"transformers.DataProcessor.get_labels",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L105"}}),De=new P({props:{name:"get_test_examples",anchor:"transformers.DataProcessor.get_test_examples",parameters:[{name:"data_dir",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L101"}}),We=new P({props:{name:"get_train_examples",anchor:"transformers.DataProcessor.get_train_examples",parameters:[{name:"data_dir",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L93"}}),Ge=new P({props:{name:"tfds_map",anchor:"transformers.DataProcessor.tfds_map",parameters:[{name:"example",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L109"}}),Qe=new P({props:{name:"class transformers.InputExample",anchor:"transformers.InputExample",parameters:[{name:"guid",val:": str"},{name:"text_a",val:": str"},{name:"text_b",val:": Optional = None"},{name:"label",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L29"}}),Re=new P({props:{name:"to_json_string",anchor:"transformers.InputExample.to_json_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L49"}}),Ae=new P({props:{name:"class transformers.InputFeatures",anchor:"transformers.InputFeatures",parameters:[{name:"input_ids",val:": List"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"label",val:": Union = None"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L54"}}),Ye=new P({props:{name:"to_json_string",anchor:"transformers.InputFeatures.to_json_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/utils.py#L75"}}),Oe=new xe({props:{title:"GLUE",local:"transformers.glue_convert_examples_to_features",headingTag:"h2"}}),ot=new P({props:{name:"transformers.glue_convert_examples_to_features",anchor:"transformers.glue_convert_examples_to_features",parameters:[{name:"examples",val:": Union"},{name:"tokenizer",val:": PreTrainedTokenizer"},{name:"max_length",val:": Optional = None"},{name:"task",val:" = None"},{name:"label_list",val:" = None"},{name:"output_mode",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/glue.py#L41",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If the <code>examples</code> input is a <code>tf.data.Dataset</code>, will return a <code>tf.data.Dataset</code> containing the task-specific
features. If the input is a list of <code>InputExamples</code>, will return a list of task-specific <code>InputFeatures</code> which
can be fed to the model.</p>
`}}),at=new xe({props:{title:"XNLI",local:"xnli",headingTag:"h2"}}),mt=new xe({props:{title:"SQuAD",local:"squad",headingTag:"h2"}}),ht=new xe({props:{title:"Processors",local:"transformers.data.processors.squad.SquadProcessor",headingTag:"h3"}}),$t=new P({props:{name:"class transformers.data.processors.squad.SquadProcessor",anchor:"transformers.data.processors.squad.SquadProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/squad.py#L541"}}),xt=new P({props:{name:"get_dev_examples",anchor:"transformers.data.processors.squad.SquadProcessor.get_dev_examples",parameters:[{name:"data_dir",val:""},{name:"filename",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/squad.py#L629"}}),bt=new P({props:{name:"get_examples_from_dataset",anchor:"transformers.data.processors.squad.SquadProcessor.get_examples_from_dataset",parameters:[{name:"dataset",val:""},{name:"evaluate",val:" = False"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/squad.py#L574",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of SquadExample</p>
`}}),_e=new Mr({props:{anchor:"transformers.data.processors.squad.SquadProcessor.get_examples_from_dataset.example",$$slots:{default:[pn]},$$scope:{ctx:U}}}),Mt=new P({props:{name:"get_train_examples",anchor:"transformers.data.processors.squad.SquadProcessor.get_train_examples",parameters:[{name:"data_dir",val:""},{name:"filename",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/squad.py#L607"}}),wt=new P({props:{name:"transformers.squad_convert_examples_to_features",anchor:"transformers.squad_convert_examples_to_features",parameters:[{name:"examples",val:""},{name:"tokenizer",val:""},{name:"max_seq_length",val:""},{name:"doc_stride",val:""},{name:"max_query_length",val:""},{name:"is_training",val:""},{name:"padding_strategy",val:" = 'max_length'"},{name:"return_dataset",val:" = False"},{name:"threads",val:" = 1"},{name:"tqdm_enabled",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/data/processors/squad.py#L316",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>list of <code>SquadFeatures</code></p>
`}}),$e=new Mr({props:{anchor:"transformers.squad_convert_examples_to_features.example",$$slots:{default:[mn]},$$scope:{ctx:U}}}),Ct=new xe({props:{title:"Example usage",local:"example-usage",headingTag:"h3"}}),Jt=new be({props:{code:"JTIzJTIwTG9hZGluZyUyMGElMjBWMiUyMHByb2Nlc3NvciUwQXByb2Nlc3NvciUyMCUzRCUyMFNxdWFkVjJQcm9jZXNzb3IoKSUwQWV4YW1wbGVzJTIwJTNEJTIwcHJvY2Vzc29yLmdldF9kZXZfZXhhbXBsZXMoc3F1YWRfdjJfZGF0YV9kaXIpJTBBJTBBJTIzJTIwTG9hZGluZyUyMGElMjBWMSUyMHByb2Nlc3NvciUwQXByb2Nlc3NvciUyMCUzRCUyMFNxdWFkVjFQcm9jZXNzb3IoKSUwQWV4YW1wbGVzJTIwJTNEJTIwcHJvY2Vzc29yLmdldF9kZXZfZXhhbXBsZXMoc3F1YWRfdjFfZGF0YV9kaXIpJTBBJTBBZmVhdHVyZXMlMjAlM0QlMjBzcXVhZF9jb252ZXJ0X2V4YW1wbGVzX3RvX2ZlYXR1cmVzKCUwQSUyMCUyMCUyMCUyMGV4YW1wbGVzJTNEZXhhbXBsZXMlMkMlMEElMjAlMjAlMjAlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIlMkMlMEElMjAlMjAlMjAlMjBtYXhfc2VxX2xlbmd0aCUzRG1heF9zZXFfbGVuZ3RoJTJDJTBBJTIwJTIwJTIwJTIwZG9jX3N0cmlkZSUzRGFyZ3MuZG9jX3N0cmlkZSUyQyUwQSUyMCUyMCUyMCUyMG1heF9xdWVyeV9sZW5ndGglM0RtYXhfcXVlcnlfbGVuZ3RoJTJDJTBBJTIwJTIwJTIwJTIwaXNfdHJhaW5pbmclM0Rub3QlMjBldmFsdWF0ZSUyQyUwQSk=",highlighted:`<span class="hljs-comment"># Loading a V2 processor</span>
processor = SquadV2Processor()
examples = processor.get_dev_examples(squad_v2_data_dir)

<span class="hljs-comment"># Loading a V1 processor</span>
processor = SquadV1Processor()
examples = processor.get_dev_examples(squad_v1_data_dir)

features = squad_convert_examples_to_features(
    examples=examples,
    tokenizer=tokenizer,
    max_seq_length=max_seq_length,
    doc_stride=args.doc_stride,
    max_query_length=max_query_length,
    is_training=<span class="hljs-keyword">not</span> evaluate,
)`,wrap:!1}}),kt=new be({props:{code:"JTIzJTIwdGVuc29yZmxvd19kYXRhc2V0cyUyMG9ubHklMjBoYW5kbGUlMjBTcXVhZCUyMFYxLiUwQXRmZHNfZXhhbXBsZXMlMjAlM0QlMjB0ZmRzLmxvYWQoJTIyc3F1YWQlMjIpJTBBZXhhbXBsZXMlMjAlM0QlMjBTcXVhZFYxUHJvY2Vzc29yKCkuZ2V0X2V4YW1wbGVzX2Zyb21fZGF0YXNldCh0ZmRzX2V4YW1wbGVzJTJDJTIwZXZhbHVhdGUlM0RldmFsdWF0ZSklMEElMEFmZWF0dXJlcyUyMCUzRCUyMHNxdWFkX2NvbnZlcnRfZXhhbXBsZXNfdG9fZmVhdHVyZXMoJTBBJTIwJTIwJTIwJTIwZXhhbXBsZXMlM0RleGFtcGxlcyUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRHRva2VuaXplciUyQyUwQSUyMCUyMCUyMCUyMG1heF9zZXFfbGVuZ3RoJTNEbWF4X3NlcV9sZW5ndGglMkMlMEElMjAlMjAlMjAlMjBkb2Nfc3RyaWRlJTNEYXJncy5kb2Nfc3RyaWRlJTJDJTBBJTIwJTIwJTIwJTIwbWF4X3F1ZXJ5X2xlbmd0aCUzRG1heF9xdWVyeV9sZW5ndGglMkMlMEElMjAlMjAlMjAlMjBpc190cmFpbmluZyUzRG5vdCUyMGV2YWx1YXRlJTJDJTBBKQ==",highlighted:`<span class="hljs-comment"># tensorflow_datasets only handle Squad V1.</span>
tfds_examples = tfds.load(<span class="hljs-string">&quot;squad&quot;</span>)
examples = SquadV1Processor().get_examples_from_dataset(tfds_examples, evaluate=evaluate)

features = squad_convert_examples_to_features(
    examples=examples,
    tokenizer=tokenizer,
    max_seq_length=max_seq_length,
    doc_stride=args.doc_stride,
    max_query_length=max_query_length,
    is_training=<span class="hljs-keyword">not</span> evaluate,
)`,wrap:!1}}),jt=new rn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/main_classes/processors.md"}}),{c(){d=n("meta"),w=s(),$=n("p"),m=s(),f(x.$$.fragment),c=s(),T=n("p"),T.textContent=So,wr=s(),Me=n("ul"),Me.innerHTML=Fo,Tr=s(),f(ye.$$.fragment),Cr=s(),we=n("p"),we.textContent=Do,Pr=s(),Te=n("p"),Te.textContent=Wo,Jr=s(),b=n("div"),f(Ce.$$.fragment),Js=s(),Vt=n("p"),Vt.textContent=Go,Is=s(),Q=n("div"),f(Pe.$$.fragment),ks=s(),Et=n("p"),Et.innerHTML=Qo,Us=s(),R=n("div"),f(Je.$$.fragment),js=s(),zt=n("p"),zt.innerHTML=Ro,Ls=s(),V=n("div"),f(Ie.$$.fragment),Xs=s(),Ht=n("p"),Ht.textContent=Ao,Zs=s(),f(A.$$.fragment),qs=s(),Y=n("div"),f(ke.$$.fragment),Vs=s(),Bt=n("p"),Bt.innerHTML=Yo,Es=s(),O=n("div"),f(Ue.$$.fragment),zs=s(),Nt=n("p"),Nt.textContent=Oo,Hs=s(),J=n("div"),f(je.$$.fragment),Bs=s(),St=n("p"),St.innerHTML=Ko,Ns=s(),Ft=n("p"),Ft.innerHTML=ea,Ss=s(),Dt=n("ul"),Dt.innerHTML=ta,Fs=s(),Wt=n("p"),Wt.textContent=ra,Ds=s(),Gt=n("p"),Gt.innerHTML=sa,Ws=s(),f(K.$$.fragment),Gs=s(),f(ee.$$.fragment),Qs=s(),f(te.$$.fragment),Rs=Ka("\nwhich we could then pass as kwargs to `self._merge_kwargs`"),As=s(),E=n("div"),f(Le.$$.fragment),Ys=s(),Qt=n("p"),Qt.textContent=oa,Os=s(),f(re.$$.fragment),Ks=s(),z=n("div"),f(Xe.$$.fragment),eo=s(),Rt=n("p"),Rt.innerHTML=aa,to=s(),f(se.$$.fragment),ro=s(),H=n("div"),f(Ze.$$.fragment),so=s(),At=n("p"),At.innerHTML=na,oo=s(),f(oe.$$.fragment),ao=s(),ae=n("div"),f(qe.$$.fragment),no=s(),Yt=n("p"),Yt.textContent=la,lo=s(),ne=n("div"),f(Ve.$$.fragment),io=s(),Ot=n("p"),Ot.textContent=ia,co=s(),le=n("div"),f(Ee.$$.fragment),po=s(),Kt=n("p"),Kt.textContent=ca,Ir=s(),f(ze.$$.fragment),kr=s(),He=n("p"),He.innerHTML=da,Ur=s(),k=n("div"),f(Be.$$.fragment),mo=s(),er=n("p"),er.textContent=pa,fo=s(),ie=n("div"),f(Ne.$$.fragment),uo=s(),tr=n("p"),tr.innerHTML=ma,ho=s(),ce=n("div"),f(Se.$$.fragment),go=s(),rr=n("p"),rr.textContent=fa,_o=s(),de=n("div"),f(Fe.$$.fragment),vo=s(),sr=n("p"),sr.textContent=ua,$o=s(),pe=n("div"),f(De.$$.fragment),xo=s(),or=n("p"),or.innerHTML=ha,bo=s(),me=n("div"),f(We.$$.fragment),Mo=s(),ar=n("p"),ar.innerHTML=ga,yo=s(),fe=n("div"),f(Ge.$$.fragment),wo=s(),nr=n("p"),nr.textContent=_a,jr=s(),X=n("div"),f(Qe.$$.fragment),To=s(),lr=n("p"),lr.textContent=va,Co=s(),ue=n("div"),f(Re.$$.fragment),Po=s(),ir=n("p"),ir.textContent=$a,Lr=s(),Z=n("div"),f(Ae.$$.fragment),Jo=s(),cr=n("p"),cr.textContent=xa,Io=s(),he=n("div"),f(Ye.$$.fragment),ko=s(),dr=n("p"),dr.textContent=ba,Xr=s(),f(Oe.$$.fragment),Zr=s(),Ke=n("p"),Ke.innerHTML=Ma,qr=s(),et=n("p"),et.textContent=ya,Vr=s(),tt=n("p"),tt.textContent=wa,Er=s(),rt=n("ul"),rt.innerHTML=Ta,zr=s(),st=n("p"),st.innerHTML=Ca,Hr=s(),S=n("div"),f(ot.$$.fragment),Uo=s(),pr=n("p"),pr.innerHTML=Pa,Br=s(),f(at.$$.fragment),Nr=s(),nt=n("p"),nt.innerHTML=Ja,Sr=s(),lt=n("p"),lt.innerHTML=Ia,Fr=s(),it=n("p"),it.textContent=ka,Dr=s(),ct=n("ul"),ct.innerHTML=Ua,Wr=s(),dt=n("p"),dt.textContent=ja,Gr=s(),pt=n("p"),pt.innerHTML=La,Qr=s(),f(mt.$$.fragment),Rr=s(),ft=n("p"),ft.innerHTML=Xa,Ar=s(),ut=n("p"),ut.textContent=Za,Yr=s(),f(ht.$$.fragment),Or=s(),gt=n("p"),gt.textContent=qa,Kr=s(),_t=n("ul"),_t.innerHTML=Va,es=s(),vt=n("p"),vt.innerHTML=Ea,ts=s(),L=n("div"),f($t.$$.fragment),jo=s(),mr=n("p"),mr.textContent=za,Lo=s(),ge=n("div"),f(xt.$$.fragment),Xo=s(),fr=n("p"),fr.textContent=Ha,Zo=s(),B=n("div"),f(bt.$$.fragment),qo=s(),ur=n("p"),ur.innerHTML=Ba,Vo=s(),f(_e.$$.fragment),Eo=s(),ve=n("div"),f(Mt.$$.fragment),zo=s(),hr=n("p"),hr.textContent=Na,rs=s(),yt=n("p"),yt.innerHTML=Sa,ss=s(),q=n("div"),f(wt.$$.fragment),Ho=s(),gr=n("p"),gr.textContent=Fa,Bo=s(),f($e.$$.fragment),os=s(),Tt=n("p"),Tt.innerHTML=Da,as=s(),f(Ct.$$.fragment),ns=s(),Pt=n("p"),Pt.textContent=Wa,ls=s(),f(Jt.$$.fragment),is=s(),It=n("p"),It.innerHTML=Ga,cs=s(),f(kt.$$.fragment),ds=s(),Ut=n("p"),Ut.innerHTML=Qa,ps=s(),f(jt.$$.fragment),ms=s(),yr=n("p"),this.h()},l(e){const a=en("svelte-u9bgzb",document.head);d=l(a,"META",{name:!0,content:!0}),a.forEach(t),w=o(e),$=l(e,"P",{}),M($).forEach(t),m=o(e),u(x.$$.fragment,e),c=o(e),T=l(e,"P",{"data-svelte-h":!0}),p(T)!=="svelte-8nvl5z"&&(T.textContent=So),wr=o(e),Me=l(e,"UL",{"data-svelte-h":!0}),p(Me)!=="svelte-1r5mt3j"&&(Me.innerHTML=Fo),Tr=o(e),u(ye.$$.fragment,e),Cr=o(e),we=l(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-16hpp4n"&&(we.textContent=Do),Pr=o(e),Te=l(e,"P",{"data-svelte-h":!0}),p(Te)!=="svelte-x3ucqc"&&(Te.textContent=Wo),Jr=o(e),b=l(e,"DIV",{class:!0});var C=M(b);u(Ce.$$.fragment,C),Js=o(C),Vt=l(C,"P",{"data-svelte-h":!0}),p(Vt)!=="svelte-1s4wckx"&&(Vt.textContent=Go),Is=o(C),Q=l(C,"DIV",{class:!0});var Lt=M(Q);u(Pe.$$.fragment,Lt),ks=o(Lt),Et=l(Lt,"P",{"data-svelte-h":!0}),p(Et)!=="svelte-10dqwuv"&&(Et.innerHTML=Qo),Lt.forEach(t),Us=o(C),R=l(C,"DIV",{class:!0});var Xt=M(R);u(Je.$$.fragment,Xt),js=o(Xt),zt=l(Xt,"P",{"data-svelte-h":!0}),p(zt)!=="svelte-1i2d3vx"&&(zt.innerHTML=Ro),Xt.forEach(t),Ls=o(C),V=l(C,"DIV",{class:!0});var F=M(V);u(Ie.$$.fragment,F),Xs=o(F),Ht=l(F,"P",{"data-svelte-h":!0}),p(Ht)!=="svelte-1cj8dcb"&&(Ht.textContent=Ao),Zs=o(F),u(A.$$.fragment,F),F.forEach(t),qs=o(C),Y=l(C,"DIV",{class:!0});var Zt=M(Y);u(ke.$$.fragment,Zt),Vs=o(Zt),Bt=l(Zt,"P",{"data-svelte-h":!0}),p(Bt)!=="svelte-hsvutq"&&(Bt.innerHTML=Yo),Zt.forEach(t),Es=o(C),O=l(C,"DIV",{class:!0});var qt=M(O);u(Ue.$$.fragment,qt),zs=o(qt),Nt=l(qt,"P",{"data-svelte-h":!0}),p(Nt)!=="svelte-13etpi4"&&(Nt.textContent=Oo),qt.forEach(t),Hs=o(C),J=l(C,"DIV",{class:!0});var I=M(J);u(je.$$.fragment,I),Bs=o(I),St=l(I,"P",{"data-svelte-h":!0}),p(St)!=="svelte-1s01p9s"&&(St.innerHTML=Ko),Ns=o(I),Ft=l(I,"P",{"data-svelte-h":!0}),p(Ft)!=="svelte-14s9qj8"&&(Ft.innerHTML=ea),Ss=o(I),Dt=l(I,"UL",{"data-svelte-h":!0}),p(Dt)!=="svelte-1wgd4o3"&&(Dt.innerHTML=ta),Fs=o(I),Wt=l(I,"P",{"data-svelte-h":!0}),p(Wt)!=="svelte-p5jl0d"&&(Wt.textContent=ra),Ds=o(I),Gt=l(I,"P",{"data-svelte-h":!0}),p(Gt)!=="svelte-tdqt7p"&&(Gt.innerHTML=sa),Ws=o(I),u(K.$$.fragment,I),Gs=o(I),u(ee.$$.fragment,I),Qs=o(I),u(te.$$.fragment,I),Rs=tn(I,"\nwhich we could then pass as kwargs to `self._merge_kwargs`"),I.forEach(t),As=o(C),E=l(C,"DIV",{class:!0});var D=M(E);u(Le.$$.fragment,D),Ys=o(D),Qt=l(D,"P",{"data-svelte-h":!0}),p(Qt)!=="svelte-1cwsjho"&&(Qt.textContent=oa),Os=o(D),u(re.$$.fragment,D),D.forEach(t),Ks=o(C),z=l(C,"DIV",{class:!0});var W=M(z);u(Xe.$$.fragment,W),eo=o(W),Rt=l(W,"P",{"data-svelte-h":!0}),p(Rt)!=="svelte-hhsvto"&&(Rt.innerHTML=aa),to=o(W),u(se.$$.fragment,W),W.forEach(t),ro=o(C),H=l(C,"DIV",{class:!0});var _r=M(H);u(Ze.$$.fragment,_r),so=o(_r),At=l(_r,"P",{"data-svelte-h":!0}),p(At)!=="svelte-z747v"&&(At.innerHTML=na),oo=o(_r),u(oe.$$.fragment,_r),_r.forEach(t),ao=o(C),ae=l(C,"DIV",{class:!0});var us=M(ae);u(qe.$$.fragment,us),no=o(us),Yt=l(us,"P",{"data-svelte-h":!0}),p(Yt)!=="svelte-1ww3wqq"&&(Yt.textContent=la),us.forEach(t),lo=o(C),ne=l(C,"DIV",{class:!0});var hs=M(ne);u(Ve.$$.fragment,hs),io=o(hs),Ot=l(hs,"P",{"data-svelte-h":!0}),p(Ot)!=="svelte-1g70y32"&&(Ot.textContent=ia),hs.forEach(t),co=o(C),le=l(C,"DIV",{class:!0});var gs=M(le);u(Ee.$$.fragment,gs),po=o(gs),Kt=l(gs,"P",{"data-svelte-h":!0}),p(Kt)!=="svelte-5ayq1f"&&(Kt.textContent=ca),gs.forEach(t),C.forEach(t),Ir=o(e),u(ze.$$.fragment,e),kr=o(e),He=l(e,"P",{"data-svelte-h":!0}),p(He)!=="svelte-1050vz5"&&(He.innerHTML=da),Ur=o(e),k=l(e,"DIV",{class:!0});var j=M(k);u(Be.$$.fragment,j),mo=o(j),er=l(j,"P",{"data-svelte-h":!0}),p(er)!=="svelte-1bsw04k"&&(er.textContent=pa),fo=o(j),ie=l(j,"DIV",{class:!0});var _s=M(ie);u(Ne.$$.fragment,_s),uo=o(_s),tr=l(_s,"P",{"data-svelte-h":!0}),p(tr)!=="svelte-5bhljs"&&(tr.innerHTML=ma),_s.forEach(t),ho=o(j),ce=l(j,"DIV",{class:!0});var vs=M(ce);u(Se.$$.fragment,vs),go=o(vs),rr=l(vs,"P",{"data-svelte-h":!0}),p(rr)!=="svelte-pplryq"&&(rr.textContent=fa),vs.forEach(t),_o=o(j),de=l(j,"DIV",{class:!0});var $s=M(de);u(Fe.$$.fragment,$s),vo=o($s),sr=l($s,"P",{"data-svelte-h":!0}),p(sr)!=="svelte-3oqyjr"&&(sr.textContent=ua),$s.forEach(t),$o=o(j),pe=l(j,"DIV",{class:!0});var xs=M(pe);u(De.$$.fragment,xs),xo=o(xs),or=l(xs,"P",{"data-svelte-h":!0}),p(or)!=="svelte-1f7vsvr"&&(or.innerHTML=ha),xs.forEach(t),bo=o(j),me=l(j,"DIV",{class:!0});var bs=M(me);u(We.$$.fragment,bs),Mo=o(bs),ar=l(bs,"P",{"data-svelte-h":!0}),p(ar)!=="svelte-1y15dv5"&&(ar.innerHTML=ga),bs.forEach(t),yo=o(j),fe=l(j,"DIV",{class:!0});var Ms=M(fe);u(Ge.$$.fragment,Ms),wo=o(Ms),nr=l(Ms,"P",{"data-svelte-h":!0}),p(nr)!=="svelte-1jevh15"&&(nr.textContent=_a),Ms.forEach(t),j.forEach(t),jr=o(e),X=l(e,"DIV",{class:!0});var vr=M(X);u(Qe.$$.fragment,vr),To=o(vr),lr=l(vr,"P",{"data-svelte-h":!0}),p(lr)!=="svelte-vkt0pi"&&(lr.textContent=va),Co=o(vr),ue=l(vr,"DIV",{class:!0});var ys=M(ue);u(Re.$$.fragment,ys),Po=o(ys),ir=l(ys,"P",{"data-svelte-h":!0}),p(ir)!=="svelte-5ayq1f"&&(ir.textContent=$a),ys.forEach(t),vr.forEach(t),Lr=o(e),Z=l(e,"DIV",{class:!0});var $r=M(Z);u(Ae.$$.fragment,$r),Jo=o($r),cr=l($r,"P",{"data-svelte-h":!0}),p(cr)!=="svelte-168wf64"&&(cr.textContent=xa),Io=o($r),he=l($r,"DIV",{class:!0});var ws=M(he);u(Ye.$$.fragment,ws),ko=o(ws),dr=l(ws,"P",{"data-svelte-h":!0}),p(dr)!=="svelte-5ayq1f"&&(dr.textContent=ba),ws.forEach(t),$r.forEach(t),Xr=o(e),u(Oe.$$.fragment,e),Zr=o(e),Ke=l(e,"P",{"data-svelte-h":!0}),p(Ke)!=="svelte-pgkk87"&&(Ke.innerHTML=Ma),qr=o(e),et=l(e,"P",{"data-svelte-h":!0}),p(et)!=="svelte-1iz8kjk"&&(et.textContent=ya),Vr=o(e),tt=l(e,"P",{"data-svelte-h":!0}),p(tt)!=="svelte-ejlsq2"&&(tt.textContent=wa),Er=o(e),rt=l(e,"UL",{"data-svelte-h":!0}),p(rt)!=="svelte-my8qym"&&(rt.innerHTML=Ta),zr=o(e),st=l(e,"P",{"data-svelte-h":!0}),p(st)!=="svelte-1i94m6k"&&(st.innerHTML=Ca),Hr=o(e),S=l(e,"DIV",{class:!0});var Ts=M(S);u(ot.$$.fragment,Ts),Uo=o(Ts),pr=l(Ts,"P",{"data-svelte-h":!0}),p(pr)!=="svelte-5lvrve"&&(pr.innerHTML=Pa),Ts.forEach(t),Br=o(e),u(at.$$.fragment,e),Nr=o(e),nt=l(e,"P",{"data-svelte-h":!0}),p(nt)!=="svelte-9mlx1z"&&(nt.innerHTML=Ja),Sr=o(e),lt=l(e,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-1qabksm"&&(lt.innerHTML=Ia),Fr=o(e),it=l(e,"P",{"data-svelte-h":!0}),p(it)!=="svelte-uho2qa"&&(it.textContent=ka),Dr=o(e),ct=l(e,"UL",{"data-svelte-h":!0}),p(ct)!=="svelte-1e2xq99"&&(ct.innerHTML=Ua),Wr=o(e),dt=l(e,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-sz5yy2"&&(dt.textContent=ja),Gr=o(e),pt=l(e,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-1mss3di"&&(pt.innerHTML=La),Qr=o(e),u(mt.$$.fragment,e),Rr=o(e),ft=l(e,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-1i4abtq"&&(ft.innerHTML=Xa),Ar=o(e),ut=l(e,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-zxdzom"&&(ut.textContent=Za),Yr=o(e),u(ht.$$.fragment,e),Or=o(e),gt=l(e,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-ejlsq2"&&(gt.textContent=qa),Kr=o(e),_t=l(e,"UL",{"data-svelte-h":!0}),p(_t)!=="svelte-1qiv3qf"&&(_t.innerHTML=Va),es=o(e),vt=l(e,"P",{"data-svelte-h":!0}),p(vt)!=="svelte-1r22nj6"&&(vt.innerHTML=Ea),ts=o(e),L=l(e,"DIV",{class:!0});var N=M(L);u($t.$$.fragment,N),jo=o(N),mr=l(N,"P",{"data-svelte-h":!0}),p(mr)!=="svelte-173gxyd"&&(mr.textContent=za),Lo=o(N),ge=l(N,"DIV",{class:!0});var Cs=M(ge);u(xt.$$.fragment,Cs),Xo=o(Cs),fr=l(Cs,"P",{"data-svelte-h":!0}),p(fr)!=="svelte-wmaktk"&&(fr.textContent=Ha),Cs.forEach(t),Zo=o(N),B=l(N,"DIV",{class:!0});var xr=M(B);u(bt.$$.fragment,xr),qo=o(xr),ur=l(xr,"P",{"data-svelte-h":!0}),p(ur)!=="svelte-11nqnea"&&(ur.innerHTML=Ba),Vo=o(xr),u(_e.$$.fragment,xr),xr.forEach(t),Eo=o(N),ve=l(N,"DIV",{class:!0});var Ps=M(ve);u(Mt.$$.fragment,Ps),zo=o(Ps),hr=l(Ps,"P",{"data-svelte-h":!0}),p(hr)!=="svelte-d5zv1x"&&(hr.textContent=Na),Ps.forEach(t),N.forEach(t),rs=o(e),yt=l(e,"P",{"data-svelte-h":!0}),p(yt)!=="svelte-12wzh89"&&(yt.innerHTML=Sa),ss=o(e),q=l(e,"DIV",{class:!0});var br=M(q);u(wt.$$.fragment,br),Ho=o(br),gr=l(br,"P",{"data-svelte-h":!0}),p(gr)!=="svelte-169nh0g"&&(gr.textContent=Fa),Bo=o(br),u($e.$$.fragment,br),br.forEach(t),os=o(e),Tt=l(e,"P",{"data-svelte-h":!0}),p(Tt)!=="svelte-2mj9lk"&&(Tt.innerHTML=Da),as=o(e),u(Ct.$$.fragment,e),ns=o(e),Pt=l(e,"P",{"data-svelte-h":!0}),p(Pt)!=="svelte-1q119ra"&&(Pt.textContent=Wa),ls=o(e),u(Jt.$$.fragment,e),is=o(e),It=l(e,"P",{"data-svelte-h":!0}),p(It)!=="svelte-9ecb4t"&&(It.innerHTML=Ga),cs=o(e),u(kt.$$.fragment,e),ds=o(e),Ut=l(e,"P",{"data-svelte-h":!0}),p(Ut)!=="svelte-8lr0dh"&&(Ut.innerHTML=Qa),ps=o(e),u(jt.$$.fragment,e),ms=o(e),yr=l(e,"P",{}),M(yr).forEach(t),this.h()},h(){y(d,"name","hf:doc:metadata"),y(d,"content",un),y(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,a){r(document.head,d),i(e,w,a),i(e,$,a),i(e,m,a),h(x,e,a),i(e,c,a),i(e,T,a),i(e,wr,a),i(e,Me,a),i(e,Tr,a),h(ye,e,a),i(e,Cr,a),i(e,we,a),i(e,Pr,a),i(e,Te,a),i(e,Jr,a),i(e,b,a),h(Ce,b,null),r(b,Js),r(b,Vt),r(b,Is),r(b,Q),h(Pe,Q,null),r(Q,ks),r(Q,Et),r(b,Us),r(b,R),h(Je,R,null),r(R,js),r(R,zt),r(b,Ls),r(b,V),h(Ie,V,null),r(V,Xs),r(V,Ht),r(V,Zs),h(A,V,null),r(b,qs),r(b,Y),h(ke,Y,null),r(Y,Vs),r(Y,Bt),r(b,Es),r(b,O),h(Ue,O,null),r(O,zs),r(O,Nt),r(b,Hs),r(b,J),h(je,J,null),r(J,Bs),r(J,St),r(J,Ns),r(J,Ft),r(J,Ss),r(J,Dt),r(J,Fs),r(J,Wt),r(J,Ds),r(J,Gt),r(J,Ws),h(K,J,null),r(J,Gs),h(ee,J,null),r(J,Qs),h(te,J,null),r(J,Rs),r(b,As),r(b,E),h(Le,E,null),r(E,Ys),r(E,Qt),r(E,Os),h(re,E,null),r(b,Ks),r(b,z),h(Xe,z,null),r(z,eo),r(z,Rt),r(z,to),h(se,z,null),r(b,ro),r(b,H),h(Ze,H,null),r(H,so),r(H,At),r(H,oo),h(oe,H,null),r(b,ao),r(b,ae),h(qe,ae,null),r(ae,no),r(ae,Yt),r(b,lo),r(b,ne),h(Ve,ne,null),r(ne,io),r(ne,Ot),r(b,co),r(b,le),h(Ee,le,null),r(le,po),r(le,Kt),i(e,Ir,a),h(ze,e,a),i(e,kr,a),i(e,He,a),i(e,Ur,a),i(e,k,a),h(Be,k,null),r(k,mo),r(k,er),r(k,fo),r(k,ie),h(Ne,ie,null),r(ie,uo),r(ie,tr),r(k,ho),r(k,ce),h(Se,ce,null),r(ce,go),r(ce,rr),r(k,_o),r(k,de),h(Fe,de,null),r(de,vo),r(de,sr),r(k,$o),r(k,pe),h(De,pe,null),r(pe,xo),r(pe,or),r(k,bo),r(k,me),h(We,me,null),r(me,Mo),r(me,ar),r(k,yo),r(k,fe),h(Ge,fe,null),r(fe,wo),r(fe,nr),i(e,jr,a),i(e,X,a),h(Qe,X,null),r(X,To),r(X,lr),r(X,Co),r(X,ue),h(Re,ue,null),r(ue,Po),r(ue,ir),i(e,Lr,a),i(e,Z,a),h(Ae,Z,null),r(Z,Jo),r(Z,cr),r(Z,Io),r(Z,he),h(Ye,he,null),r(he,ko),r(he,dr),i(e,Xr,a),h(Oe,e,a),i(e,Zr,a),i(e,Ke,a),i(e,qr,a),i(e,et,a),i(e,Vr,a),i(e,tt,a),i(e,Er,a),i(e,rt,a),i(e,zr,a),i(e,st,a),i(e,Hr,a),i(e,S,a),h(ot,S,null),r(S,Uo),r(S,pr),i(e,Br,a),h(at,e,a),i(e,Nr,a),i(e,nt,a),i(e,Sr,a),i(e,lt,a),i(e,Fr,a),i(e,it,a),i(e,Dr,a),i(e,ct,a),i(e,Wr,a),i(e,dt,a),i(e,Gr,a),i(e,pt,a),i(e,Qr,a),h(mt,e,a),i(e,Rr,a),i(e,ft,a),i(e,Ar,a),i(e,ut,a),i(e,Yr,a),h(ht,e,a),i(e,Or,a),i(e,gt,a),i(e,Kr,a),i(e,_t,a),i(e,es,a),i(e,vt,a),i(e,ts,a),i(e,L,a),h($t,L,null),r(L,jo),r(L,mr),r(L,Lo),r(L,ge),h(xt,ge,null),r(ge,Xo),r(ge,fr),r(L,Zo),r(L,B),h(bt,B,null),r(B,qo),r(B,ur),r(B,Vo),h(_e,B,null),r(L,Eo),r(L,ve),h(Mt,ve,null),r(ve,zo),r(ve,hr),i(e,rs,a),i(e,yt,a),i(e,ss,a),i(e,q,a),h(wt,q,null),r(q,Ho),r(q,gr),r(q,Bo),h($e,q,null),i(e,os,a),i(e,Tt,a),i(e,as,a),h(Ct,e,a),i(e,ns,a),i(e,Pt,a),i(e,ls,a),h(Jt,e,a),i(e,is,a),i(e,It,a),i(e,cs,a),h(kt,e,a),i(e,ds,a),i(e,Ut,a),i(e,ps,a),h(jt,e,a),i(e,ms,a),i(e,yr,a),fs=!0},p(e,[a]){const C={};a&2&&(C.$$scope={dirty:a,ctx:e}),A.$set(C);const Lt={};a&2&&(Lt.$$scope={dirty:a,ctx:e}),K.$set(Lt);const Xt={};a&2&&(Xt.$$scope={dirty:a,ctx:e}),ee.$set(Xt);const F={};a&2&&(F.$$scope={dirty:a,ctx:e}),te.$set(F);const Zt={};a&2&&(Zt.$$scope={dirty:a,ctx:e}),re.$set(Zt);const qt={};a&2&&(qt.$$scope={dirty:a,ctx:e}),se.$set(qt);const I={};a&2&&(I.$$scope={dirty:a,ctx:e}),oe.$set(I);const D={};a&2&&(D.$$scope={dirty:a,ctx:e}),_e.$set(D);const W={};a&2&&(W.$$scope={dirty:a,ctx:e}),$e.$set(W)},i(e){fs||(g(x.$$.fragment,e),g(ye.$$.fragment,e),g(Ce.$$.fragment,e),g(Pe.$$.fragment,e),g(Je.$$.fragment,e),g(Ie.$$.fragment,e),g(A.$$.fragment,e),g(ke.$$.fragment,e),g(Ue.$$.fragment,e),g(je.$$.fragment,e),g(K.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(Le.$$.fragment,e),g(re.$$.fragment,e),g(Xe.$$.fragment,e),g(se.$$.fragment,e),g(Ze.$$.fragment,e),g(oe.$$.fragment,e),g(qe.$$.fragment,e),g(Ve.$$.fragment,e),g(Ee.$$.fragment,e),g(ze.$$.fragment,e),g(Be.$$.fragment,e),g(Ne.$$.fragment,e),g(Se.$$.fragment,e),g(Fe.$$.fragment,e),g(De.$$.fragment,e),g(We.$$.fragment,e),g(Ge.$$.fragment,e),g(Qe.$$.fragment,e),g(Re.$$.fragment,e),g(Ae.$$.fragment,e),g(Ye.$$.fragment,e),g(Oe.$$.fragment,e),g(ot.$$.fragment,e),g(at.$$.fragment,e),g(mt.$$.fragment,e),g(ht.$$.fragment,e),g($t.$$.fragment,e),g(xt.$$.fragment,e),g(bt.$$.fragment,e),g(_e.$$.fragment,e),g(Mt.$$.fragment,e),g(wt.$$.fragment,e),g($e.$$.fragment,e),g(Ct.$$.fragment,e),g(Jt.$$.fragment,e),g(kt.$$.fragment,e),g(jt.$$.fragment,e),fs=!0)},o(e){_(x.$$.fragment,e),_(ye.$$.fragment,e),_(Ce.$$.fragment,e),_(Pe.$$.fragment,e),_(Je.$$.fragment,e),_(Ie.$$.fragment,e),_(A.$$.fragment,e),_(ke.$$.fragment,e),_(Ue.$$.fragment,e),_(je.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(Le.$$.fragment,e),_(re.$$.fragment,e),_(Xe.$$.fragment,e),_(se.$$.fragment,e),_(Ze.$$.fragment,e),_(oe.$$.fragment,e),_(qe.$$.fragment,e),_(Ve.$$.fragment,e),_(Ee.$$.fragment,e),_(ze.$$.fragment,e),_(Be.$$.fragment,e),_(Ne.$$.fragment,e),_(Se.$$.fragment,e),_(Fe.$$.fragment,e),_(De.$$.fragment,e),_(We.$$.fragment,e),_(Ge.$$.fragment,e),_(Qe.$$.fragment,e),_(Re.$$.fragment,e),_(Ae.$$.fragment,e),_(Ye.$$.fragment,e),_(Oe.$$.fragment,e),_(ot.$$.fragment,e),_(at.$$.fragment,e),_(mt.$$.fragment,e),_(ht.$$.fragment,e),_($t.$$.fragment,e),_(xt.$$.fragment,e),_(bt.$$.fragment,e),_(_e.$$.fragment,e),_(Mt.$$.fragment,e),_(wt.$$.fragment,e),_($e.$$.fragment,e),_(Ct.$$.fragment,e),_(Jt.$$.fragment,e),_(kt.$$.fragment,e),_(jt.$$.fragment,e),fs=!1},d(e){e&&(t(w),t($),t(m),t(c),t(T),t(wr),t(Me),t(Tr),t(Cr),t(we),t(Pr),t(Te),t(Jr),t(b),t(Ir),t(kr),t(He),t(Ur),t(k),t(jr),t(X),t(Lr),t(Z),t(Xr),t(Zr),t(Ke),t(qr),t(et),t(Vr),t(tt),t(Er),t(rt),t(zr),t(st),t(Hr),t(S),t(Br),t(Nr),t(nt),t(Sr),t(lt),t(Fr),t(it),t(Dr),t(ct),t(Wr),t(dt),t(Gr),t(pt),t(Qr),t(Rr),t(ft),t(Ar),t(ut),t(Yr),t(Or),t(gt),t(Kr),t(_t),t(es),t(vt),t(ts),t(L),t(rs),t(yt),t(ss),t(q),t(os),t(Tt),t(as),t(ns),t(Pt),t(ls),t(is),t(It),t(cs),t(ds),t(Ut),t(ps),t(ms),t(yr)),t(d),v(x,e),v(ye,e),v(Ce),v(Pe),v(Je),v(Ie),v(A),v(ke),v(Ue),v(je),v(K),v(ee),v(te),v(Le),v(re),v(Xe),v(se),v(Ze),v(oe),v(qe),v(Ve),v(Ee),v(ze,e),v(Be),v(Ne),v(Se),v(Fe),v(De),v(We),v(Ge),v(Qe),v(Re),v(Ae),v(Ye),v(Oe,e),v(ot),v(at,e),v(mt,e),v(ht,e),v($t),v(xt),v(bt),v(_e),v(Mt),v(wt),v($e),v(Ct,e),v(Jt,e),v(kt,e),v(jt,e)}}}const un='{"title":"Processors","local":"processors","sections":[{"title":"Multi-modal processors","local":"transformers.ProcessorMixin","sections":[],"depth":2},{"title":"Deprecated processors","local":"transformers.DataProcessor","sections":[],"depth":2},{"title":"GLUE","local":"transformers.glue_convert_examples_to_features","sections":[],"depth":2},{"title":"XNLI","local":"xnli","sections":[],"depth":2},{"title":"SQuAD","local":"squad","sections":[{"title":"Processors","local":"transformers.data.processors.squad.SquadProcessor","sections":[],"depth":3},{"title":"Example usage","local":"example-usage","sections":[],"depth":3}],"depth":2}],"depth":1}';function hn(U){return Aa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class yn extends Ya{constructor(d){super(),Oa(this,d,hn,fn,Ra,{})}}export{yn as component};
