import{s as Na,o as Fa,n as R}from"../chunks/scheduler.9991993c.js";import{S as Sa,i as Wa,g as n,s,r as f,m as Ga,A as Da,h as l,f as t,c as o,j as w,u,x as d,n as Ra,k as T,y as r,a as i,v as h,d as g,t as _,w as v}from"../chunks/index.7fc9a5e7.js";import{T as zo}from"../chunks/Tip.9de92fc6.js";import{D as P}from"../chunks/Docstring.ef7d0149.js";import{C as be}from"../chunks/CodeBlock.e11cba92.js";import{E as vr}from"../chunks/ExampleCodeBlock.0db1a011.js";import{H as xe,E as Qa}from"../chunks/EditOnGithub.84ab7f0e.js";function Ya(k){let p,b=`This class method is simply calling the feature extractor
<a href="/docs/transformers/pr_30950/zh/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a>, image processor
<a href="/docs/transformers/pr_30950/zh/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(){p=n("p"),p.innerHTML=b},l($){p=l($,"P",{"data-svelte-h":!0}),d(p)!=="svelte-13th5ll"&&(p.innerHTML=b)},m($,m){i($,p,m)},p:R,d($){$&&t(p)}}}function Aa(k){let p,b="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(){p=n("p"),p.textContent=b,$=s(),f(m.$$.fragment)},l(c){p=l(c,"P",{"data-svelte-h":!0}),d(p)!=="svelte-ft0bna"&&(p.textContent=b),$=o(c),u(m.$$.fragment,c)},m(c,M){i(c,p,M),i(c,$,M),h(m,c,M),x=!0},p:R,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(p),t($)),v(m,c)}}}function Oa(k){let p,b="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(){p=n("p"),p.textContent=b,$=s(),f(m.$$.fragment)},l(c){p=l(c,"P",{"data-svelte-h":!0}),d(p)!=="svelte-k5ldhr"&&(p.textContent=b),$=o(c),u(m.$$.fragment,c)},m(c,M){i(c,p,M),i(c,$,M),h(m,c,M),x=!0},p:R,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(p),t($)),v(m,c)}}}function Ka(k){let p,b="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(){p=n("p"),p.textContent=b,$=s(),f(m.$$.fragment)},l(c){p=l(c,"P",{"data-svelte-h":!0}),d(p)!=="svelte-wadzyw"&&(p.textContent=b),$=o(c),u(m.$$.fragment,c)},m(c,M){i(c,p,M),i(c,$,M),h(m,c,M),x=!0},p:R,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(p),t($)),v(m,c)}}}function en(k){let p,b="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(){p=n("p"),p.textContent=b,$=s(),f(m.$$.fragment)},l(c){p=l(c,"P",{"data-svelte-h":!0}),d(p)!=="svelte-kvfsh7"&&(p.textContent=b),$=o(c),u(m.$$.fragment,c)},m(c,M){i(c,p,M),i(c,$,M),h(m,c,M),x=!0},p:R,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(p),t($)),v(m,c)}}}function tn(k){let p,b="This API is experimental and may have some slight breaking changes in the next releases.";return{c(){p=n("p"),p.textContent=b},l($){p=l($,"P",{"data-svelte-h":!0}),d(p)!=="svelte-15rpg4"&&(p.textContent=b)},m($,m){i($,p,m)},p:R,d($){$&&t(p)}}}function rn(k){let p,b=`This class method is simply calling <a href="/docs/transformers/pr_30950/zh/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/pr_30950/zh/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a>. Please refer to the docstrings of the
methods above for more information.`;return{c(){p=n("p"),p.innerHTML=b},l($){p=l($,"P",{"data-svelte-h":!0}),d(p)!=="svelte-16hrslm"&&(p.innerHTML=b)},m($,m){i($,p,m)},p:R,d($){$&&t(p)}}}function sn(k){let p,b="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(){p=n("p"),p.textContent=b,$=s(),f(m.$$.fragment)},l(c){p=l(c,"P",{"data-svelte-h":!0}),d(p)!=="svelte-kvfsh7"&&(p.textContent=b),$=o(c),u(m.$$.fragment,c)},m(c,M){i(c,p,M),i(c,$,M),h(m,c,M),x=!0},p:R,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(p),t($)),v(m,c)}}}function on(k){let p,b="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(){p=n("p"),p.textContent=b,$=s(),f(m.$$.fragment)},l(c){p=l(c,"P",{"data-svelte-h":!0}),d(p)!=="svelte-11lpom8"&&(p.textContent=b),$=o(c),u(m.$$.fragment,c)},m(c,M){i(c,p,M),i(c,$,M),h(m,c,M),x=!0},p:R,i(c){x||(g(m.$$.fragment,c),x=!0)},o(c){_(m.$$.fragment,c),x=!1},d(c){c&&(t(p),t($)),v(m,c)}}}function an(k){let p,b,$,m,x,c,M,Vo="在 Transformers 库中，processors可以有两种不同的含义：",xr,Me,qo='<li>为多模态模型，例如<a href="../model_doc/wav2vec2">Wav2Vec2</a>（语音和文本）或<a href="../model_doc/clip">CLIP</a>（文本和视觉）预处理输入的对象</li> <li>在库的旧版本中用于预处理GLUE或SQUAD数据的已弃用对象。</li>',br,ye,Mr,we,Eo="任何多模态模型都需要一个对象来编码或解码将多个模态（包括文本、视觉和音频）组合在一起的数据。这由称为processors的对象处理，这些processors将两个或多个处理对象组合在一起，例如tokenizers（用于文本模态），image processors（用于视觉）和feature extractors（用于音频）。",yr,Te,Ho="这些processors继承自以下实现保存和加载功能的基类：",wr,y,Ce,ws,Zt,Bo="This is a mixin used to provide saving/loading functionality for all processor classes.",Ts,Q,Pe,Cs,zt,No=`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.`,Ps,Y,Je,Js,Vt,Fo="Instantiates a type of <code>~processing_utils.ProcessingMixin</code> from a Python dictionary of parameters.",Is,V,Ie,Us,qt,So="Instantiate a processor associated with a pretrained model.",ks,A,js,O,Ue,Xs,Et,Wo=`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>.`,Ls,J,ke,Zs,Ht,Go=`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.`,zs,Bt,Do=`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:`,Vs,Nt,Ro="<li><code>CLIPSegProcessor</code></li> <li><code>LayoutLMv2Processor</code></li> <li><code>OwlViTProcessor</code></li>",qs,Ft,Qo=`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.`,Es,St,Yo=`Example:
Suppose that the processor class has <code>optional_call_args = [&quot;arg_name_1&quot;, &quot;arg_name_2&quot;]</code>.`,Hs,K,Bs,ee,Ns,te,Fs,Ss,q,je,Ws,Wt,Ao="Upload the processor files to the 🤗 Model Hub.",Gs,re,Ds,E,Xe,Rs,Gt,Oo=`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>.`,Qs,se,Ys,H,Le,As,Dt,Ko=`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_30950/zh/main_classes/processors#transformers.ProcessorMixin.from_pretrained">from_pretrained()</a> method.`,Os,oe,Ks,ae,Ze,eo,Rt,ea="Serializes this instance to a Python dictionary.",to,ne,ze,ro,Qt,ta="Save this instance to a JSON file.",so,le,Ve,oo,Yt,ra="Serializes this instance to a JSON string.",Tr,qe,Cr,Ee,sa='所有processor都遵循与 <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.DataProcessor">DataProcessor</a> 相同的架构。processor返回一个 <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.InputExample">InputExample</a> 列表。这些 <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.InputExample">InputExample</a> 可以转换为 <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.InputFeatures">InputFeatures</a> 以供输送到模型。',Pr,U,He,ao,At,oa="Base class for data converters for sequence classification data sets.",no,ie,Be,lo,Ot,aa='Gets a collection of <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.InputExample">InputExample</a> for the dev set.',io,ce,Ne,co,Kt,na="Gets an example from a dict with tensorflow tensors.",po,pe,Fe,mo,er,la="Gets the list of labels for this data set.",fo,de,Se,uo,tr,ia='Gets a collection of <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.InputExample">InputExample</a> for the test set.',ho,me,We,go,rr,ca='Gets a collection of <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.InputExample">InputExample</a> for the train set.',_o,fe,Ge,vo,sr,pa=`Some tensorflow_datasets datasets are not formatted the same way the GLUE datasets are. This method converts
examples to the correct format.`,Jr,L,De,$o,or,da="A single training/test example for simple sequence classification.",xo,ue,Re,bo,ar,ma="Serializes this instance to a JSON string.",Ir,Z,Qe,Mo,nr,fa="A single set of features of data. Property names are the same names as the corresponding inputs to a model.",yo,he,Ye,wo,lr,ua="Serializes this instance to a JSON string.",Ur,Ae,kr,Oe,ha='<a href="https://gluebenchmark.com/" rel="nofollow">General Language Understanding Evaluation (GLUE)</a> 是一个基准测试，评估模型在各种现有的自然语言理解任务上的性能。它与论文 <a href="https://openreview.net/pdf?id=rJ4km2R5t7" rel="nofollow">GLUE: A multi-task benchmark and analysis platform for natural language understanding</a> 一同发布。',jr,Ke,ga="该库为以下任务提供了总共10个processor：MRPC、MNLI、MNLI（mismatched）、CoLA、SST2、STSB、QQP、QNLI、RTE 和 WNLI。",Xr,et,_a="这些processor是：",Lr,tt,va="<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,rt,$a='此外，还可以使用以下方法从数据文件加载值并将其转换为 <a href="/docs/transformers/pr_30950/zh/main_classes/processors#transformers.InputExample">InputExample</a> 列表。',zr,F,st,To,ir,xa="Loads a data file into a list of <code>InputFeatures</code>",Vr,ot,qr,at,ba='<a href="https://www.nyu.edu/projects/bowman/xnli/" rel="nofollow">跨语言NLI语料库（XNLI）</a> 是一个评估跨语言文本表示质量的基准测试。XNLI是一个基于<a href="http://www.nyu.edu/projects/bowman/multinli/" rel="nofollow"><em>MultiNLI</em></a>的众包数据集：”文本对“被标记为包含15种不同语言（包括英语等高资源语言和斯瓦希里语等低资源语言）的文本蕴涵注释。',Er,nt,Ma='它与论文 <a href="https://arxiv.org/abs/1809.05053" rel="nofollow">XNLI: Evaluating Cross-lingual Sentence Representations</a> 一同发布。',Hr,lt,ya="该库提供了加载XNLI数据的processor：",Br,it,wa="<li><code>~data.processors.utils.XnliProcessor</code></li>",Nr,ct,Ta="请注意，由于测试集上有“gold”标签，因此评估是在测试集上进行的。",Fr,pt,Ca='使用这些processor的示例在 <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification/run_xnli.py" rel="nofollow">run_xnli.py</a> 脚本中提供。',Sr,dt,Wr,mt,Pa='<a href="https://rajpurkar.github.io/SQuAD-explorer//" rel="nofollow">斯坦福问答数据集（SQuAD）</a> 是一个评估模型在问答上性能的基准测试。有两个版本，v1.1 和 v2.0。第一个版本（v1.1）与论文 <a href="https://arxiv.org/abs/1606.05250" rel="nofollow">SQuAD: 100,000+ Questions for Machine Comprehension of Text</a> 一同发布。第二个版本（v2.0）与论文 <a href="https://arxiv.org/abs/1806.03822" rel="nofollow">Know What You Don’t Know: Unanswerable Questions for SQuAD</a> 一同发布。',Gr,ft,Ja="该库为两个版本各自提供了一个processor：",Dr,ut,Rr,ht,Ia="这两个processor是：",Qr,gt,Ua="<li><code>~data.processors.utils.SquadV1Processor</code></li> <li><code>~data.processors.utils.SquadV2Processor</code></li>",Yr,_t,ka="它们都继承自抽象类 <code>~data.processors.utils.SquadProcessor</code>。",Ar,X,vt,Co,cr,ja=`Processor for the SQuAD data set. overridden by SquadV1Processor and SquadV2Processor, used by the version 1.1 and
version 2.0 of SQuAD, respectively.`,Po,ge,$t,Jo,pr,Xa="Returns the evaluation example from the data directory.",Io,B,xt,Uo,dr,La="Creates a list of <code>SquadExample</code> using a TFDS dataset.",ko,_e,jo,ve,bt,Xo,mr,Za="Returns the training examples from the data directory.",Or,Mt,za="此外，可以使用以下方法将 SQuAD 示例转换为可用作模型输入的 <code>~data.processors.utils.SquadFeatures</code>。",Kr,z,yt,Lo,fr,Va=`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.`,Zo,$e,es,wt,qa="这些processor以及前面提到的方法可以与包含数据的文件以及tensorflow_datasets包一起使用。下面给出了示例。",ts,Tt,rs,Ct,Ea="以下是使用processor以及使用数据文件的转换方法的示例：",ss,Pt,os,Jt,Ha="使用 <em>tensorflow_datasets</em> 就像使用数据文件一样简单：",as,It,ns,Ut,Ba='另一个使用这些processor的示例在 <a href="https://github.com/huggingface/transformers/tree/main/examples/legacy/question-answering/run_squad.py" rel="nofollow">run_squad.py</a> 脚本中提供。',ls,kt,is,$r,cs;return x=new xe({props:{title:"Processors",local:"processors",headingTag:"h1"}}),ye=new xe({props:{title:"多模态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_30950/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_30950/src/transformers/processing_utils.py#L1051"}}),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_30950/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_30950/zh/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_30950/zh/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_30950/src/transformers/processing_utils.py#L867"}}),A=new zo({props:{$$slots:{default:[Ya]},$$scope:{ctx:k}}}),Ue=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_30950/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>
`}}),ke=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_30950/src/transformers/processing_utils.py#L993"}}),K=new vr({props:{anchor:"transformers.ProcessorMixin.prepare_and_validate_optional_call_args.example",$$slots:{default:[Aa]},$$scope:{ctx:k}}}),ee=new vr({props:{anchor:"transformers.ProcessorMixin.prepare_and_validate_optional_call_args.example-2",$$slots:{default:[Oa]},$$scope:{ctx:k}}}),te=new vr({props:{anchor:"transformers.ProcessorMixin.prepare_and_validate_optional_call_args.example-3",$$slots:{default:[Ka]},$$scope:{ctx:k}}}),je=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_30950/src/transformers/utils/hub.py#L828"}}),re=new vr({props:{anchor:"transformers.ProcessorMixin.push_to_hub.example",$$slots:{default:[en]},$$scope:{ctx:k}}}),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_30950/src/transformers/processing_utils.py#L931"}}),se=new zo({props:{warning:!0,$$slots:{default:[tn]},$$scope:{ctx:k}}}),Le=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_30950/zh/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30950/src/transformers/processing_utils.py#L460"}}),oe=new zo({props:{$$slots:{default:[rn]},$$scope:{ctx:k}}}),Ze=new P({props:{name:"to_dict",anchor:"transformers.ProcessorMixin.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30950/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>
`}}),ze=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_30950/src/transformers/processing_utils.py#L444"}}),Ve=new P({props:{name:"to_json_string",anchor:"transformers.ProcessorMixin.to_json_string",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30950/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>
`}}),qe=new xe({props:{title:"已弃用的processors",local:"transformers.DataProcessor",headingTag:"h2"}}),He=new P({props:{name:"class transformers.DataProcessor",anchor:"transformers.DataProcessor",parameters:[],source:"https://github.com/huggingface/transformers/blob/vr_30950/src/transformers/data/processors/utils.py#L80"}}),Be=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_30950/src/transformers/data/processors/utils.py#L97"}}),Ne=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_30950/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_30950/src/transformers/data/processors/utils.py#L105"}}),Se=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_30950/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_30950/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_30950/src/transformers/data/processors/utils.py#L109"}}),De=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_30950/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_30950/src/transformers/data/processors/utils.py#L49"}}),Qe=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_30950/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_30950/src/transformers/data/processors/utils.py#L75"}}),Ae=new xe({props:{title:"GLUE",local:"transformers.glue_convert_examples_to_features",headingTag:"h2"}}),st=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_30950/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>
`}}),ot=new xe({props:{title:"XNLI",local:"xnli",headingTag:"h2"}}),dt=new xe({props:{title:"SQuAD",local:"squad",headingTag:"h2"}}),ut=new xe({props:{title:"Processors",local:"transformers.data.processors.squad.SquadProcessor",headingTag:"h3"}}),vt=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_30950/src/transformers/data/processors/squad.py#L541"}}),$t=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_30950/src/transformers/data/processors/squad.py#L629"}}),xt=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_30950/src/transformers/data/processors/squad.py#L574",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of SquadExample</p>
`}}),_e=new vr({props:{anchor:"transformers.data.processors.squad.SquadProcessor.get_examples_from_dataset.example",$$slots:{default:[sn]},$$scope:{ctx:k}}}),bt=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_30950/src/transformers/data/processors/squad.py#L607"}}),yt=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_30950/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 vr({props:{anchor:"transformers.squad_convert_examples_to_features.example",$$slots:{default:[on]},$$scope:{ctx:k}}}),Tt=new xe({props:{title:"Example使用",local:"example使用",headingTag:"h3"}}),Pt=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}}),It=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}}),kt=new Qa({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/zh/main_classes/processors.md"}}),{c(){p=n("meta"),b=s(),$=n("p"),m=s(),f(x.$$.fragment),c=s(),M=n("p"),M.textContent=Vo,xr=s(),Me=n("ul"),Me.innerHTML=qo,br=s(),f(ye.$$.fragment),Mr=s(),we=n("p"),we.textContent=Eo,yr=s(),Te=n("p"),Te.textContent=Ho,wr=s(),y=n("div"),f(Ce.$$.fragment),ws=s(),Zt=n("p"),Zt.textContent=Bo,Ts=s(),Q=n("div"),f(Pe.$$.fragment),Cs=s(),zt=n("p"),zt.innerHTML=No,Ps=s(),Y=n("div"),f(Je.$$.fragment),Js=s(),Vt=n("p"),Vt.innerHTML=Fo,Is=s(),V=n("div"),f(Ie.$$.fragment),Us=s(),qt=n("p"),qt.textContent=So,ks=s(),f(A.$$.fragment),js=s(),O=n("div"),f(Ue.$$.fragment),Xs=s(),Et=n("p"),Et.innerHTML=Wo,Ls=s(),J=n("div"),f(ke.$$.fragment),Zs=s(),Ht=n("p"),Ht.innerHTML=Go,zs=s(),Bt=n("p"),Bt.innerHTML=Do,Vs=s(),Nt=n("ul"),Nt.innerHTML=Ro,qs=s(),Ft=n("p"),Ft.textContent=Qo,Es=s(),St=n("p"),St.innerHTML=Yo,Hs=s(),f(K.$$.fragment),Bs=s(),f(ee.$$.fragment),Ns=s(),f(te.$$.fragment),Fs=Ga("\nwhich we could then pass as kwargs to `self._merge_kwargs`"),Ss=s(),q=n("div"),f(je.$$.fragment),Ws=s(),Wt=n("p"),Wt.textContent=Ao,Gs=s(),f(re.$$.fragment),Ds=s(),E=n("div"),f(Xe.$$.fragment),Rs=s(),Gt=n("p"),Gt.innerHTML=Oo,Qs=s(),f(se.$$.fragment),Ys=s(),H=n("div"),f(Le.$$.fragment),As=s(),Dt=n("p"),Dt.innerHTML=Ko,Os=s(),f(oe.$$.fragment),Ks=s(),ae=n("div"),f(Ze.$$.fragment),eo=s(),Rt=n("p"),Rt.textContent=ea,to=s(),ne=n("div"),f(ze.$$.fragment),ro=s(),Qt=n("p"),Qt.textContent=ta,so=s(),le=n("div"),f(Ve.$$.fragment),oo=s(),Yt=n("p"),Yt.textContent=ra,Tr=s(),f(qe.$$.fragment),Cr=s(),Ee=n("p"),Ee.innerHTML=sa,Pr=s(),U=n("div"),f(He.$$.fragment),ao=s(),At=n("p"),At.textContent=oa,no=s(),ie=n("div"),f(Be.$$.fragment),lo=s(),Ot=n("p"),Ot.innerHTML=aa,io=s(),ce=n("div"),f(Ne.$$.fragment),co=s(),Kt=n("p"),Kt.textContent=na,po=s(),pe=n("div"),f(Fe.$$.fragment),mo=s(),er=n("p"),er.textContent=la,fo=s(),de=n("div"),f(Se.$$.fragment),uo=s(),tr=n("p"),tr.innerHTML=ia,ho=s(),me=n("div"),f(We.$$.fragment),go=s(),rr=n("p"),rr.innerHTML=ca,_o=s(),fe=n("div"),f(Ge.$$.fragment),vo=s(),sr=n("p"),sr.textContent=pa,Jr=s(),L=n("div"),f(De.$$.fragment),$o=s(),or=n("p"),or.textContent=da,xo=s(),ue=n("div"),f(Re.$$.fragment),bo=s(),ar=n("p"),ar.textContent=ma,Ir=s(),Z=n("div"),f(Qe.$$.fragment),Mo=s(),nr=n("p"),nr.textContent=fa,yo=s(),he=n("div"),f(Ye.$$.fragment),wo=s(),lr=n("p"),lr.textContent=ua,Ur=s(),f(Ae.$$.fragment),kr=s(),Oe=n("p"),Oe.innerHTML=ha,jr=s(),Ke=n("p"),Ke.textContent=ga,Xr=s(),et=n("p"),et.textContent=_a,Lr=s(),tt=n("ul"),tt.innerHTML=va,Zr=s(),rt=n("p"),rt.innerHTML=$a,zr=s(),F=n("div"),f(st.$$.fragment),To=s(),ir=n("p"),ir.innerHTML=xa,Vr=s(),f(ot.$$.fragment),qr=s(),at=n("p"),at.innerHTML=ba,Er=s(),nt=n("p"),nt.innerHTML=Ma,Hr=s(),lt=n("p"),lt.textContent=ya,Br=s(),it=n("ul"),it.innerHTML=wa,Nr=s(),ct=n("p"),ct.textContent=Ta,Fr=s(),pt=n("p"),pt.innerHTML=Ca,Sr=s(),f(dt.$$.fragment),Wr=s(),mt=n("p"),mt.innerHTML=Pa,Gr=s(),ft=n("p"),ft.textContent=Ja,Dr=s(),f(ut.$$.fragment),Rr=s(),ht=n("p"),ht.textContent=Ia,Qr=s(),gt=n("ul"),gt.innerHTML=Ua,Yr=s(),_t=n("p"),_t.innerHTML=ka,Ar=s(),X=n("div"),f(vt.$$.fragment),Co=s(),cr=n("p"),cr.textContent=ja,Po=s(),ge=n("div"),f($t.$$.fragment),Jo=s(),pr=n("p"),pr.textContent=Xa,Io=s(),B=n("div"),f(xt.$$.fragment),Uo=s(),dr=n("p"),dr.innerHTML=La,ko=s(),f(_e.$$.fragment),jo=s(),ve=n("div"),f(bt.$$.fragment),Xo=s(),mr=n("p"),mr.textContent=Za,Or=s(),Mt=n("p"),Mt.innerHTML=za,Kr=s(),z=n("div"),f(yt.$$.fragment),Lo=s(),fr=n("p"),fr.textContent=Va,Zo=s(),f($e.$$.fragment),es=s(),wt=n("p"),wt.textContent=qa,ts=s(),f(Tt.$$.fragment),rs=s(),Ct=n("p"),Ct.textContent=Ea,ss=s(),f(Pt.$$.fragment),os=s(),Jt=n("p"),Jt.innerHTML=Ha,as=s(),f(It.$$.fragment),ns=s(),Ut=n("p"),Ut.innerHTML=Ba,ls=s(),f(kt.$$.fragment),is=s(),$r=n("p"),this.h()},l(e){const a=Da("svelte-u9bgzb",document.head);p=l(a,"META",{name:!0,content:!0}),a.forEach(t),b=o(e),$=l(e,"P",{}),w($).forEach(t),m=o(e),u(x.$$.fragment,e),c=o(e),M=l(e,"P",{"data-svelte-h":!0}),d(M)!=="svelte-1fd9lf0"&&(M.textContent=Vo),xr=o(e),Me=l(e,"UL",{"data-svelte-h":!0}),d(Me)!=="svelte-rmvfpp"&&(Me.innerHTML=qo),br=o(e),u(ye.$$.fragment,e),Mr=o(e),we=l(e,"P",{"data-svelte-h":!0}),d(we)!=="svelte-ctzpmo"&&(we.textContent=Eo),yr=o(e),Te=l(e,"P",{"data-svelte-h":!0}),d(Te)!=="svelte-9fh2y4"&&(Te.textContent=Ho),wr=o(e),y=l(e,"DIV",{class:!0});var C=w(y);u(Ce.$$.fragment,C),ws=o(C),Zt=l(C,"P",{"data-svelte-h":!0}),d(Zt)!=="svelte-1s4wckx"&&(Zt.textContent=Bo),Ts=o(C),Q=l(C,"DIV",{class:!0});var jt=w(Q);u(Pe.$$.fragment,jt),Cs=o(jt),zt=l(jt,"P",{"data-svelte-h":!0}),d(zt)!=="svelte-10dqwuv"&&(zt.innerHTML=No),jt.forEach(t),Ps=o(C),Y=l(C,"DIV",{class:!0});var Xt=w(Y);u(Je.$$.fragment,Xt),Js=o(Xt),Vt=l(Xt,"P",{"data-svelte-h":!0}),d(Vt)!=="svelte-1i2d3vx"&&(Vt.innerHTML=Fo),Xt.forEach(t),Is=o(C),V=l(C,"DIV",{class:!0});var S=w(V);u(Ie.$$.fragment,S),Us=o(S),qt=l(S,"P",{"data-svelte-h":!0}),d(qt)!=="svelte-1cj8dcb"&&(qt.textContent=So),ks=o(S),u(A.$$.fragment,S),S.forEach(t),js=o(C),O=l(C,"DIV",{class:!0});var Lt=w(O);u(Ue.$$.fragment,Lt),Xs=o(Lt),Et=l(Lt,"P",{"data-svelte-h":!0}),d(Et)!=="svelte-hsvutq"&&(Et.innerHTML=Wo),Lt.forEach(t),Ls=o(C),J=l(C,"DIV",{class:!0});var I=w(J);u(ke.$$.fragment,I),Zs=o(I),Ht=l(I,"P",{"data-svelte-h":!0}),d(Ht)!=="svelte-1s01p9s"&&(Ht.innerHTML=Go),zs=o(I),Bt=l(I,"P",{"data-svelte-h":!0}),d(Bt)!=="svelte-14s9qj8"&&(Bt.innerHTML=Do),Vs=o(I),Nt=l(I,"UL",{"data-svelte-h":!0}),d(Nt)!=="svelte-1wgd4o3"&&(Nt.innerHTML=Ro),qs=o(I),Ft=l(I,"P",{"data-svelte-h":!0}),d(Ft)!=="svelte-p5jl0d"&&(Ft.textContent=Qo),Es=o(I),St=l(I,"P",{"data-svelte-h":!0}),d(St)!=="svelte-tdqt7p"&&(St.innerHTML=Yo),Hs=o(I),u(K.$$.fragment,I),Bs=o(I),u(ee.$$.fragment,I),Ns=o(I),u(te.$$.fragment,I),Fs=Ra(I,"\nwhich we could then pass as kwargs to `self._merge_kwargs`"),I.forEach(t),Ss=o(C),q=l(C,"DIV",{class:!0});var W=w(q);u(je.$$.fragment,W),Ws=o(W),Wt=l(W,"P",{"data-svelte-h":!0}),d(Wt)!=="svelte-1cwsjho"&&(Wt.textContent=Ao),Gs=o(W),u(re.$$.fragment,W),W.forEach(t),Ds=o(C),E=l(C,"DIV",{class:!0});var G=w(E);u(Xe.$$.fragment,G),Rs=o(G),Gt=l(G,"P",{"data-svelte-h":!0}),d(Gt)!=="svelte-hhsvto"&&(Gt.innerHTML=Oo),Qs=o(G),u(se.$$.fragment,G),G.forEach(t),Ys=o(C),H=l(C,"DIV",{class:!0});var D=w(H);u(Le.$$.fragment,D),As=o(D),Dt=l(D,"P",{"data-svelte-h":!0}),d(Dt)!=="svelte-pom4cf"&&(Dt.innerHTML=Ko),Os=o(D),u(oe.$$.fragment,D),D.forEach(t),Ks=o(C),ae=l(C,"DIV",{class:!0});var ps=w(ae);u(Ze.$$.fragment,ps),eo=o(ps),Rt=l(ps,"P",{"data-svelte-h":!0}),d(Rt)!=="svelte-1ww3wqq"&&(Rt.textContent=ea),ps.forEach(t),to=o(C),ne=l(C,"DIV",{class:!0});var ds=w(ne);u(ze.$$.fragment,ds),ro=o(ds),Qt=l(ds,"P",{"data-svelte-h":!0}),d(Qt)!=="svelte-1g70y32"&&(Qt.textContent=ta),ds.forEach(t),so=o(C),le=l(C,"DIV",{class:!0});var ms=w(le);u(Ve.$$.fragment,ms),oo=o(ms),Yt=l(ms,"P",{"data-svelte-h":!0}),d(Yt)!=="svelte-5ayq1f"&&(Yt.textContent=ra),ms.forEach(t),C.forEach(t),Tr=o(e),u(qe.$$.fragment,e),Cr=o(e),Ee=l(e,"P",{"data-svelte-h":!0}),d(Ee)!=="svelte-1yzva9m"&&(Ee.innerHTML=sa),Pr=o(e),U=l(e,"DIV",{class:!0});var j=w(U);u(He.$$.fragment,j),ao=o(j),At=l(j,"P",{"data-svelte-h":!0}),d(At)!=="svelte-1bsw04k"&&(At.textContent=oa),no=o(j),ie=l(j,"DIV",{class:!0});var fs=w(ie);u(Be.$$.fragment,fs),lo=o(fs),Ot=l(fs,"P",{"data-svelte-h":!0}),d(Ot)!=="svelte-kma7u0"&&(Ot.innerHTML=aa),fs.forEach(t),io=o(j),ce=l(j,"DIV",{class:!0});var us=w(ce);u(Ne.$$.fragment,us),co=o(us),Kt=l(us,"P",{"data-svelte-h":!0}),d(Kt)!=="svelte-pplryq"&&(Kt.textContent=na),us.forEach(t),po=o(j),pe=l(j,"DIV",{class:!0});var hs=w(pe);u(Fe.$$.fragment,hs),mo=o(hs),er=l(hs,"P",{"data-svelte-h":!0}),d(er)!=="svelte-3oqyjr"&&(er.textContent=la),hs.forEach(t),fo=o(j),de=l(j,"DIV",{class:!0});var gs=w(de);u(Se.$$.fragment,gs),uo=o(gs),tr=l(gs,"P",{"data-svelte-h":!0}),d(tr)!=="svelte-im55hf"&&(tr.innerHTML=ia),gs.forEach(t),ho=o(j),me=l(j,"DIV",{class:!0});var _s=w(me);u(We.$$.fragment,_s),go=o(_s),rr=l(_s,"P",{"data-svelte-h":!0}),d(rr)!=="svelte-b4ul09"&&(rr.innerHTML=ca),_s.forEach(t),_o=o(j),fe=l(j,"DIV",{class:!0});var vs=w(fe);u(Ge.$$.fragment,vs),vo=o(vs),sr=l(vs,"P",{"data-svelte-h":!0}),d(sr)!=="svelte-1jevh15"&&(sr.textContent=pa),vs.forEach(t),j.forEach(t),Jr=o(e),L=l(e,"DIV",{class:!0});var ur=w(L);u(De.$$.fragment,ur),$o=o(ur),or=l(ur,"P",{"data-svelte-h":!0}),d(or)!=="svelte-vkt0pi"&&(or.textContent=da),xo=o(ur),ue=l(ur,"DIV",{class:!0});var $s=w(ue);u(Re.$$.fragment,$s),bo=o($s),ar=l($s,"P",{"data-svelte-h":!0}),d(ar)!=="svelte-5ayq1f"&&(ar.textContent=ma),$s.forEach(t),ur.forEach(t),Ir=o(e),Z=l(e,"DIV",{class:!0});var hr=w(Z);u(Qe.$$.fragment,hr),Mo=o(hr),nr=l(hr,"P",{"data-svelte-h":!0}),d(nr)!=="svelte-168wf64"&&(nr.textContent=fa),yo=o(hr),he=l(hr,"DIV",{class:!0});var xs=w(he);u(Ye.$$.fragment,xs),wo=o(xs),lr=l(xs,"P",{"data-svelte-h":!0}),d(lr)!=="svelte-5ayq1f"&&(lr.textContent=ua),xs.forEach(t),hr.forEach(t),Ur=o(e),u(Ae.$$.fragment,e),kr=o(e),Oe=l(e,"P",{"data-svelte-h":!0}),d(Oe)!=="svelte-pf4p60"&&(Oe.innerHTML=ha),jr=o(e),Ke=l(e,"P",{"data-svelte-h":!0}),d(Ke)!=="svelte-17867sm"&&(Ke.textContent=ga),Xr=o(e),et=l(e,"P",{"data-svelte-h":!0}),d(et)!=="svelte-190jb0p"&&(et.textContent=_a),Lr=o(e),tt=l(e,"UL",{"data-svelte-h":!0}),d(tt)!=="svelte-my8qym"&&(tt.innerHTML=va),Zr=o(e),rt=l(e,"P",{"data-svelte-h":!0}),d(rt)!=="svelte-pstky"&&(rt.innerHTML=$a),zr=o(e),F=l(e,"DIV",{class:!0});var bs=w(F);u(st.$$.fragment,bs),To=o(bs),ir=l(bs,"P",{"data-svelte-h":!0}),d(ir)!=="svelte-5lvrve"&&(ir.innerHTML=xa),bs.forEach(t),Vr=o(e),u(ot.$$.fragment,e),qr=o(e),at=l(e,"P",{"data-svelte-h":!0}),d(at)!=="svelte-143feg"&&(at.innerHTML=ba),Er=o(e),nt=l(e,"P",{"data-svelte-h":!0}),d(nt)!=="svelte-1y5f8bi"&&(nt.innerHTML=Ma),Hr=o(e),lt=l(e,"P",{"data-svelte-h":!0}),d(lt)!=="svelte-1n6xg4v"&&(lt.textContent=ya),Br=o(e),it=l(e,"UL",{"data-svelte-h":!0}),d(it)!=="svelte-1e2xq99"&&(it.innerHTML=wa),Nr=o(e),ct=l(e,"P",{"data-svelte-h":!0}),d(ct)!=="svelte-1514ut0"&&(ct.textContent=Ta),Fr=o(e),pt=l(e,"P",{"data-svelte-h":!0}),d(pt)!=="svelte-18t4sjl"&&(pt.innerHTML=Ca),Sr=o(e),u(dt.$$.fragment,e),Wr=o(e),mt=l(e,"P",{"data-svelte-h":!0}),d(mt)!=="svelte-1cqsmed"&&(mt.innerHTML=Pa),Gr=o(e),ft=l(e,"P",{"data-svelte-h":!0}),d(ft)!=="svelte-1hd0jdd"&&(ft.textContent=Ja),Dr=o(e),u(ut.$$.fragment,e),Rr=o(e),ht=l(e,"P",{"data-svelte-h":!0}),d(ht)!=="svelte-utkcp6"&&(ht.textContent=Ia),Qr=o(e),gt=l(e,"UL",{"data-svelte-h":!0}),d(gt)!=="svelte-1qiv3qf"&&(gt.innerHTML=Ua),Yr=o(e),_t=l(e,"P",{"data-svelte-h":!0}),d(_t)!=="svelte-165sa1k"&&(_t.innerHTML=ka),Ar=o(e),X=l(e,"DIV",{class:!0});var N=w(X);u(vt.$$.fragment,N),Co=o(N),cr=l(N,"P",{"data-svelte-h":!0}),d(cr)!=="svelte-173gxyd"&&(cr.textContent=ja),Po=o(N),ge=l(N,"DIV",{class:!0});var Ms=w(ge);u($t.$$.fragment,Ms),Jo=o(Ms),pr=l(Ms,"P",{"data-svelte-h":!0}),d(pr)!=="svelte-wmaktk"&&(pr.textContent=Xa),Ms.forEach(t),Io=o(N),B=l(N,"DIV",{class:!0});var gr=w(B);u(xt.$$.fragment,gr),Uo=o(gr),dr=l(gr,"P",{"data-svelte-h":!0}),d(dr)!=="svelte-11nqnea"&&(dr.innerHTML=La),ko=o(gr),u(_e.$$.fragment,gr),gr.forEach(t),jo=o(N),ve=l(N,"DIV",{class:!0});var ys=w(ve);u(bt.$$.fragment,ys),Xo=o(ys),mr=l(ys,"P",{"data-svelte-h":!0}),d(mr)!=="svelte-d5zv1x"&&(mr.textContent=Za),ys.forEach(t),N.forEach(t),Or=o(e),Mt=l(e,"P",{"data-svelte-h":!0}),d(Mt)!=="svelte-7uap0d"&&(Mt.innerHTML=za),Kr=o(e),z=l(e,"DIV",{class:!0});var _r=w(z);u(yt.$$.fragment,_r),Lo=o(_r),fr=l(_r,"P",{"data-svelte-h":!0}),d(fr)!=="svelte-169nh0g"&&(fr.textContent=Va),Zo=o(_r),u($e.$$.fragment,_r),_r.forEach(t),es=o(e),wt=l(e,"P",{"data-svelte-h":!0}),d(wt)!=="svelte-1dp3thd"&&(wt.textContent=qa),ts=o(e),u(Tt.$$.fragment,e),rs=o(e),Ct=l(e,"P",{"data-svelte-h":!0}),d(Ct)!=="svelte-1tuty7g"&&(Ct.textContent=Ea),ss=o(e),u(Pt.$$.fragment,e),os=o(e),Jt=l(e,"P",{"data-svelte-h":!0}),d(Jt)!=="svelte-1klp1tb"&&(Jt.innerHTML=Ha),as=o(e),u(It.$$.fragment,e),ns=o(e),Ut=l(e,"P",{"data-svelte-h":!0}),d(Ut)!=="svelte-1mzejoo"&&(Ut.innerHTML=Ba),ls=o(e),u(kt.$$.fragment,e),is=o(e),$r=l(e,"P",{}),w($r).forEach(t),this.h()},h(){T(p,"name","hf:doc:metadata"),T(p,"content",nn),T(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(z,"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,p),i(e,b,a),i(e,$,a),i(e,m,a),h(x,e,a),i(e,c,a),i(e,M,a),i(e,xr,a),i(e,Me,a),i(e,br,a),h(ye,e,a),i(e,Mr,a),i(e,we,a),i(e,yr,a),i(e,Te,a),i(e,wr,a),i(e,y,a),h(Ce,y,null),r(y,ws),r(y,Zt),r(y,Ts),r(y,Q),h(Pe,Q,null),r(Q,Cs),r(Q,zt),r(y,Ps),r(y,Y),h(Je,Y,null),r(Y,Js),r(Y,Vt),r(y,Is),r(y,V),h(Ie,V,null),r(V,Us),r(V,qt),r(V,ks),h(A,V,null),r(y,js),r(y,O),h(Ue,O,null),r(O,Xs),r(O,Et),r(y,Ls),r(y,J),h(ke,J,null),r(J,Zs),r(J,Ht),r(J,zs),r(J,Bt),r(J,Vs),r(J,Nt),r(J,qs),r(J,Ft),r(J,Es),r(J,St),r(J,Hs),h(K,J,null),r(J,Bs),h(ee,J,null),r(J,Ns),h(te,J,null),r(J,Fs),r(y,Ss),r(y,q),h(je,q,null),r(q,Ws),r(q,Wt),r(q,Gs),h(re,q,null),r(y,Ds),r(y,E),h(Xe,E,null),r(E,Rs),r(E,Gt),r(E,Qs),h(se,E,null),r(y,Ys),r(y,H),h(Le,H,null),r(H,As),r(H,Dt),r(H,Os),h(oe,H,null),r(y,Ks),r(y,ae),h(Ze,ae,null),r(ae,eo),r(ae,Rt),r(y,to),r(y,ne),h(ze,ne,null),r(ne,ro),r(ne,Qt),r(y,so),r(y,le),h(Ve,le,null),r(le,oo),r(le,Yt),i(e,Tr,a),h(qe,e,a),i(e,Cr,a),i(e,Ee,a),i(e,Pr,a),i(e,U,a),h(He,U,null),r(U,ao),r(U,At),r(U,no),r(U,ie),h(Be,ie,null),r(ie,lo),r(ie,Ot),r(U,io),r(U,ce),h(Ne,ce,null),r(ce,co),r(ce,Kt),r(U,po),r(U,pe),h(Fe,pe,null),r(pe,mo),r(pe,er),r(U,fo),r(U,de),h(Se,de,null),r(de,uo),r(de,tr),r(U,ho),r(U,me),h(We,me,null),r(me,go),r(me,rr),r(U,_o),r(U,fe),h(Ge,fe,null),r(fe,vo),r(fe,sr),i(e,Jr,a),i(e,L,a),h(De,L,null),r(L,$o),r(L,or),r(L,xo),r(L,ue),h(Re,ue,null),r(ue,bo),r(ue,ar),i(e,Ir,a),i(e,Z,a),h(Qe,Z,null),r(Z,Mo),r(Z,nr),r(Z,yo),r(Z,he),h(Ye,he,null),r(he,wo),r(he,lr),i(e,Ur,a),h(Ae,e,a),i(e,kr,a),i(e,Oe,a),i(e,jr,a),i(e,Ke,a),i(e,Xr,a),i(e,et,a),i(e,Lr,a),i(e,tt,a),i(e,Zr,a),i(e,rt,a),i(e,zr,a),i(e,F,a),h(st,F,null),r(F,To),r(F,ir),i(e,Vr,a),h(ot,e,a),i(e,qr,a),i(e,at,a),i(e,Er,a),i(e,nt,a),i(e,Hr,a),i(e,lt,a),i(e,Br,a),i(e,it,a),i(e,Nr,a),i(e,ct,a),i(e,Fr,a),i(e,pt,a),i(e,Sr,a),h(dt,e,a),i(e,Wr,a),i(e,mt,a),i(e,Gr,a),i(e,ft,a),i(e,Dr,a),h(ut,e,a),i(e,Rr,a),i(e,ht,a),i(e,Qr,a),i(e,gt,a),i(e,Yr,a),i(e,_t,a),i(e,Ar,a),i(e,X,a),h(vt,X,null),r(X,Co),r(X,cr),r(X,Po),r(X,ge),h($t,ge,null),r(ge,Jo),r(ge,pr),r(X,Io),r(X,B),h(xt,B,null),r(B,Uo),r(B,dr),r(B,ko),h(_e,B,null),r(X,jo),r(X,ve),h(bt,ve,null),r(ve,Xo),r(ve,mr),i(e,Or,a),i(e,Mt,a),i(e,Kr,a),i(e,z,a),h(yt,z,null),r(z,Lo),r(z,fr),r(z,Zo),h($e,z,null),i(e,es,a),i(e,wt,a),i(e,ts,a),h(Tt,e,a),i(e,rs,a),i(e,Ct,a),i(e,ss,a),h(Pt,e,a),i(e,os,a),i(e,Jt,a),i(e,as,a),h(It,e,a),i(e,ns,a),i(e,Ut,a),i(e,ls,a),h(kt,e,a),i(e,is,a),i(e,$r,a),cs=!0},p(e,[a]){const C={};a&2&&(C.$$scope={dirty:a,ctx:e}),A.$set(C);const jt={};a&2&&(jt.$$scope={dirty:a,ctx:e}),K.$set(jt);const Xt={};a&2&&(Xt.$$scope={dirty:a,ctx:e}),ee.$set(Xt);const S={};a&2&&(S.$$scope={dirty:a,ctx:e}),te.$set(S);const Lt={};a&2&&(Lt.$$scope={dirty:a,ctx:e}),re.$set(Lt);const I={};a&2&&(I.$$scope={dirty:a,ctx:e}),se.$set(I);const W={};a&2&&(W.$$scope={dirty:a,ctx:e}),oe.$set(W);const G={};a&2&&(G.$$scope={dirty:a,ctx:e}),_e.$set(G);const D={};a&2&&(D.$$scope={dirty:a,ctx:e}),$e.$set(D)},i(e){cs||(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(Ue.$$.fragment,e),g(ke.$$.fragment,e),g(K.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(je.$$.fragment,e),g(re.$$.fragment,e),g(Xe.$$.fragment,e),g(se.$$.fragment,e),g(Le.$$.fragment,e),g(oe.$$.fragment,e),g(Ze.$$.fragment,e),g(ze.$$.fragment,e),g(Ve.$$.fragment,e),g(qe.$$.fragment,e),g(He.$$.fragment,e),g(Be.$$.fragment,e),g(Ne.$$.fragment,e),g(Fe.$$.fragment,e),g(Se.$$.fragment,e),g(We.$$.fragment,e),g(Ge.$$.fragment,e),g(De.$$.fragment,e),g(Re.$$.fragment,e),g(Qe.$$.fragment,e),g(Ye.$$.fragment,e),g(Ae.$$.fragment,e),g(st.$$.fragment,e),g(ot.$$.fragment,e),g(dt.$$.fragment,e),g(ut.$$.fragment,e),g(vt.$$.fragment,e),g($t.$$.fragment,e),g(xt.$$.fragment,e),g(_e.$$.fragment,e),g(bt.$$.fragment,e),g(yt.$$.fragment,e),g($e.$$.fragment,e),g(Tt.$$.fragment,e),g(Pt.$$.fragment,e),g(It.$$.fragment,e),g(kt.$$.fragment,e),cs=!0)},o(e){_(x.$$.fragment,e),_(ye.$$.fragment,e),_(Ce.$$.fragment,e),_(Pe.$$.fragment,e),_(Je.$$.fragment,e),_(Ie.$$.fragment,e),_(A.$$.fragment,e),_(Ue.$$.fragment,e),_(ke.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(je.$$.fragment,e),_(re.$$.fragment,e),_(Xe.$$.fragment,e),_(se.$$.fragment,e),_(Le.$$.fragment,e),_(oe.$$.fragment,e),_(Ze.$$.fragment,e),_(ze.$$.fragment,e),_(Ve.$$.fragment,e),_(qe.$$.fragment,e),_(He.$$.fragment,e),_(Be.$$.fragment,e),_(Ne.$$.fragment,e),_(Fe.$$.fragment,e),_(Se.$$.fragment,e),_(We.$$.fragment,e),_(Ge.$$.fragment,e),_(De.$$.fragment,e),_(Re.$$.fragment,e),_(Qe.$$.fragment,e),_(Ye.$$.fragment,e),_(Ae.$$.fragment,e),_(st.$$.fragment,e),_(ot.$$.fragment,e),_(dt.$$.fragment,e),_(ut.$$.fragment,e),_(vt.$$.fragment,e),_($t.$$.fragment,e),_(xt.$$.fragment,e),_(_e.$$.fragment,e),_(bt.$$.fragment,e),_(yt.$$.fragment,e),_($e.$$.fragment,e),_(Tt.$$.fragment,e),_(Pt.$$.fragment,e),_(It.$$.fragment,e),_(kt.$$.fragment,e),cs=!1},d(e){e&&(t(b),t($),t(m),t(c),t(M),t(xr),t(Me),t(br),t(Mr),t(we),t(yr),t(Te),t(wr),t(y),t(Tr),t(Cr),t(Ee),t(Pr),t(U),t(Jr),t(L),t(Ir),t(Z),t(Ur),t(kr),t(Oe),t(jr),t(Ke),t(Xr),t(et),t(Lr),t(tt),t(Zr),t(rt),t(zr),t(F),t(Vr),t(qr),t(at),t(Er),t(nt),t(Hr),t(lt),t(Br),t(it),t(Nr),t(ct),t(Fr),t(pt),t(Sr),t(Wr),t(mt),t(Gr),t(ft),t(Dr),t(Rr),t(ht),t(Qr),t(gt),t(Yr),t(_t),t(Ar),t(X),t(Or),t(Mt),t(Kr),t(z),t(es),t(wt),t(ts),t(rs),t(Ct),t(ss),t(os),t(Jt),t(as),t(ns),t(Ut),t(ls),t(is),t($r)),t(p),v(x,e),v(ye,e),v(Ce),v(Pe),v(Je),v(Ie),v(A),v(Ue),v(ke),v(K),v(ee),v(te),v(je),v(re),v(Xe),v(se),v(Le),v(oe),v(Ze),v(ze),v(Ve),v(qe,e),v(He),v(Be),v(Ne),v(Fe),v(Se),v(We),v(Ge),v(De),v(Re),v(Qe),v(Ye),v(Ae,e),v(st),v(ot,e),v(dt,e),v(ut,e),v(vt),v($t),v(xt),v(_e),v(bt),v(yt),v($e),v(Tt,e),v(Pt,e),v(It,e),v(kt,e)}}}const nn='{"title":"Processors","local":"processors","sections":[{"title":"多模态processors","local":"transformers.ProcessorMixin","sections":[],"depth":2},{"title":"已弃用的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使用","local":"example使用","sections":[],"depth":3}],"depth":2}],"depth":1}';function ln(k){return Fa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class gn extends Sa{constructor(p){super(),Wa(this,p,ln,an,Na,{})}}export{gn as component};
