import{S as cv,i as lv,s as hv,e as r,k as d,w as h,t as o,M as pv,c as a,d as t,m as c,a as s,x as p,h as n,b as l,G as e,g as $,y as m,q as f,o as u,B as _,v as mv,L as iv}from"../../chunks/vendor-hf-doc-builder.js";import{T as av}from"../../chunks/Tip-hf-doc-builder.js";import{D as T}from"../../chunks/Docstring-hf-doc-builder.js";import{C as dv}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Vi}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as sv}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function fv(pe){let y,F,q,E,W;return E=new dv({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMHRva2VuaXplciUyMHRvJTIweW91ciUyMG5hbWVzcGFjZSUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBdG9rZW5pemVyLnB1c2hfdG9faHViKCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjB0b2tlbml6ZXIlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEF0b2tlbml6ZXIucHVzaF90b19odWIoJTIyaHVnZ2luZ2ZhY2UlMkZteS1maW5ldHVuZWQtYmVydCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

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

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

<span class="hljs-comment"># Push the tokenizer to an organization with the name &quot;my-finetuned-bert&quot;.</span>
tokenizer.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`}}),{c(){y=r("p"),F=o("Examples:"),q=d(),h(E.$$.fragment)},l(v){y=a(v,"P",{});var D=s(y);F=n(D,"Examples:"),D.forEach(t),q=c(v),p(E.$$.fragment,v)},m(v,D){$(v,y,D),e(y,F),$(v,q,D),m(E,v,D),W=!0},p:iv,i(v){W||(f(E.$$.fragment,v),W=!0)},o(v){u(E.$$.fragment,v),W=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function uv(pe){let y,F;return{c(){y=r("p"),F=o(`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`)},l(q){y=a(q,"P",{});var E=s(y);F=n(E,`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`),E.forEach(t)},m(q,E){$(q,y,E),e(y,F)},d(q){q&&t(y)}}}function _v(pe){let y,F,q,E,W;return E=new dv({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtY2FzZWQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMHRva2VuaXplciUyMHRvJTIweW91ciUyMG5hbWVzcGFjZSUyMHdpdGglMjB0aGUlMjBuYW1lJTIwJTIybXktZmluZXR1bmVkLWJlcnQlMjIuJTBBdG9rZW5pemVyLnB1c2hfdG9faHViKCUyMm15LWZpbmV0dW5lZC1iZXJ0JTIyKSUwQSUwQSUyMyUyMFB1c2glMjB0aGUlMjB0b2tlbml6ZXIlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtYmVydCUyMi4lMEF0b2tlbml6ZXIucHVzaF90b19odWIoJTIyaHVnZ2luZ2ZhY2UlMkZteS1maW5ldHVuZWQtYmVydCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

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

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

<span class="hljs-comment"># Push the tokenizer to an organization with the name &quot;my-finetuned-bert&quot;.</span>
tokenizer.push_to_hub(<span class="hljs-string">&quot;huggingface/my-finetuned-bert&quot;</span>)`}}),{c(){y=r("p"),F=o("Examples:"),q=d(),h(E.$$.fragment)},l(v){y=a(v,"P",{});var D=s(y);F=n(D,"Examples:"),D.forEach(t),q=c(v),p(E.$$.fragment,v)},m(v,D){$(v,y,D),e(y,F),$(v,q,D),m(E,v,D),W=!0},p:iv,i(v){W||(f(E.$$.fragment,v),W=!0)},o(v){u(E.$$.fragment,v),W=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function gv(pe){let y,F;return{c(){y=r("p"),F=o(`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`)},l(q){y=a(q,"P",{});var E=s(y);F=n(E,`This encodes a dummy input and checks the number of added tokens, and is therefore not efficient. Do not put
this inside your training loop.`),E.forEach(t)},m(q,E){$(q,y,E),e(y,F)},d(q){q&&t(y)}}}function kv(pe){let y,F,q,E,W,v,D,Wn,Gi,Rs,je,ji,Tt,Hi,Zi,Ms,He,On,Ji,Xi,Un,Yi,Vs,O,Qi,So,Ki,ed,Bo,td,od,Wo,nd,rd,Oo,ad,sd,Gs,De,Uo,id,dd,Ro,cd,ld,js,me,Rn,hd,pd,Mn,md,fd,Vn,ud,Hs,I,Mo,_d,gd,Vo,kd,bd,Gn,vd,Td,jn,yd,wd,Hn,zd,xd,Zn,Ed,$d,Jn,Pd,qd,yt,Id,Fd,Zs,Ce,Ze,Xn,wt,Ld,Yn,Dd,Js,g,zt,Cd,Qn,Nd,Ad,xt,Sd,Go,Bd,Wd,Od,Kn,Ud,Rd,er,Md,Vd,tr,Gd,jd,C,fe,or,Hd,Zd,nr,Jd,Xd,rr,Yd,Qd,Kd,U,ar,ec,tc,sr,oc,nc,ir,rc,ac,dr,sc,ic,cr,dc,cc,lc,Q,lr,hc,pc,hr,mc,fc,pr,uc,_c,mr,gc,kc,bc,R,fr,vc,Tc,ur,yc,wc,_r,zc,xc,gr,Ec,$c,jo,Pc,qc,Ic,Je,kr,Fc,Lc,br,Dc,Cc,Nc,K,vr,Ac,Sc,Tr,Bc,Wc,yr,Oc,Uc,wr,Rc,Mc,Vc,ee,zr,Gc,jc,xr,Hc,Zc,Er,Jc,Xc,$r,Yc,Qc,Kc,Xe,Et,el,Pr,tl,ol,Ye,$t,nl,qr,rl,al,ue,Pt,sl,Ir,il,dl,qt,cl,Fr,ll,hl,pl,_e,It,ml,Lr,fl,ul,Ft,_l,Dr,gl,kl,bl,ge,Lt,vl,Dt,Tl,Cr,yl,wl,zl,Qe,xl,Ke,Ct,El,Nr,$l,Pl,et,Nt,ql,Ar,Il,Fl,tt,At,Ll,Sr,Dl,Cl,ke,St,Nl,Br,Al,Sl,ot,Bl,be,Bt,Wl,Wr,Ol,Ul,Ne,Rl,Or,Ml,Vl,Ur,Gl,jl,Hl,ve,Wt,Zl,Rr,Jl,Xl,Mr,Yl,Xs,Ae,nt,Vr,Ot,Ql,Gr,Kl,Ys,te,eh,Ho,th,oh,Ut,nh,rh,Zo,ah,sh,Qs,k,Rt,ih,jr,dh,ch,Mt,lh,Jo,hh,ph,mh,Hr,fh,uh,Zr,_h,gh,Jr,kh,bh,N,Te,Xr,vh,Th,Yr,yh,wh,Qr,zh,xh,Eh,M,Kr,$h,Ph,ea,qh,Ih,ta,Fh,Lh,oa,Dh,Ch,na,Nh,Ah,Sh,oe,ra,Bh,Wh,aa,Oh,Uh,sa,Rh,Mh,ia,Vh,Gh,jh,V,da,Hh,Zh,ca,Jh,Xh,la,Yh,Qh,ha,Kh,ep,Xo,tp,op,np,rt,pa,rp,ap,ma,sp,ip,dp,ne,fa,cp,lp,ua,hp,pp,_a,mp,fp,ga,up,_p,gp,re,ka,kp,bp,ba,vp,Tp,va,yp,wp,Ta,zp,xp,Ep,at,Vt,$p,ya,Pp,qp,st,Gt,Ip,wa,Fp,Lp,ye,jt,Dp,za,Cp,Np,Ht,Ap,xa,Sp,Bp,Wp,we,Zt,Op,Ea,Up,Rp,Jt,Mp,$a,Vp,Gp,jp,ze,Xt,Hp,Yt,Zp,Pa,Jp,Xp,Yp,it,Qp,dt,Qt,Kp,qa,em,tm,ct,Kt,om,Ia,nm,rm,lt,eo,am,Fa,sm,im,xe,to,dm,La,cm,lm,ht,hm,Ee,oo,pm,Da,mm,fm,Ca,um,_m,pt,no,gm,Na,km,Ks,Se,mt,Aa,ro,bm,Sa,vm,ei,w,ao,Tm,ie,ym,so,Ba,wm,zm,xm,Yo,Em,$m,Qo,Pm,qm,Im,Wa,Fm,Lm,G,io,Dm,Oa,Cm,Nm,Ua,Am,Sm,co,Ko,Ra,Bm,Wm,Om,en,Ma,Um,Rm,Mm,Va,Vm,Gm,j,lo,jm,Ga,Hm,Zm,ja,Jm,Xm,ho,tn,Ha,Ym,Qm,Km,on,Za,ef,tf,of,Ja,nf,rf,ft,po,af,Xa,sf,df,$e,mo,cf,Ya,lf,hf,Be,nn,Qa,pf,mf,ff,rn,Ka,uf,_f,gf,an,es,kf,bf,vf,ut,fo,Tf,uo,yf,ts,wf,zf,xf,S,_o,Ef,os,$f,Pf,go,qf,sn,If,Ff,Lf,ko,dn,ns,Df,Cf,Nf,cn,rs,Af,Sf,Bf,as,Wf,Of,bo,ln,ss,Uf,Rf,Mf,hn,is,Vf,Gf,jf,H,vo,Hf,We,Zf,ds,Jf,Xf,cs,Yf,Qf,Kf,ls,eu,tu,To,pn,hs,ou,nu,ru,mn,ps,au,su,iu,ms,du,cu,Z,yo,lu,fs,hu,pu,us,mu,fu,wo,fn,_s,uu,_u,gu,un,gs,ku,bu,vu,ks,Tu,yu,_t,zo,wu,bs,zu,xu,gt,xo,Eu,vs,$u,Pu,B,Eo,qu,Ts,Iu,Fu,ys,Lu,Du,$o,ws,Cu,Nu,zs,Au,Su,xs,Bu,Wu,Po,_n,Es,Ou,Uu,Ru,gn,$s,Mu,Vu,Gu,L,qo,ju,Ps,Hu,Zu,Io,Ju,kn,Xu,Yu,Qu,Fo,bn,qs,Ku,e_,t_,vn,Is,o_,n_,r_,Fs,a_,s_,Lo,Tn,Ls,i_,d_,c_,yn,Ds,l_,h_,p_,Cs,m_,f_,kt,Do,u_,Ns,__,ti;return v=new Vi({}),wt=new Vi({}),zt=new T({props:{name:"class transformers.PreTrainedTokenizer",anchor:"transformers.PreTrainedTokenizer",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.model_max_length",description:`<strong>model_max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum length (in number of tokens) for the inputs to the transformer model. When the tokenizer is
loaded with <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained">from_pretrained()</a>, this will be set to the
value stored for the associated model in <code>max_model_input_sizes</code> (see above). If no value is provided, will
default to VERY_LARGE_INTEGER (<code>int(1e30)</code>).`,name:"model_max_length"},{anchor:"transformers.PreTrainedTokenizer.padding_side",description:`<strong>padding_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have padding applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"padding_side"},{anchor:"transformers.PreTrainedTokenizer.truncation_side",description:`<strong>truncation_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have truncation applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"truncation_side"},{anchor:"transformers.PreTrainedTokenizer.model_input_names",description:`<strong>model_input_names</strong> (<code>List[string]</code>, <em>optional</em>) &#x2014;
The list of inputs accepted by the forward pass of the model (like <code>&quot;token_type_ids&quot;</code> or
<code>&quot;attention_mask&quot;</code>). Default value is picked from the class attribute of the same name.`,name:"model_input_names"},{anchor:"transformers.PreTrainedTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the beginning of a sentence. Will be associated to <code>self.bos_token</code> and
<code>self.bos_token_id</code>.`,name:"bos_token"},{anchor:"transformers.PreTrainedTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the end of a sentence. Will be associated to <code>self.eos_token</code> and
<code>self.eos_token_id</code>.`,name:"eos_token"},{anchor:"transformers.PreTrainedTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing an out-of-vocabulary token. Will be associated to <code>self.unk_token</code> and
<code>self.unk_token_id</code>.`,name:"unk_token"},{anchor:"transformers.PreTrainedTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token separating two different sentences in the same input (used by BERT for instance). Will be
associated to <code>self.sep_token</code> and <code>self.sep_token_id</code>.`,name:"sep_token"},{anchor:"transformers.PreTrainedTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token used to make arrays of tokens the same size for batching purpose. Will then be ignored by
attention mechanisms or loss computation. Will be associated to <code>self.pad_token</code> and <code>self.pad_token_id</code>.`,name:"pad_token"},{anchor:"transformers.PreTrainedTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the class of the input (used by BERT for instance). Will be associated to
<code>self.cls_token</code> and <code>self.cls_token_id</code>.`,name:"cls_token"},{anchor:"transformers.PreTrainedTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing a masked token (used by masked-language modeling pretraining objectives, like
BERT). Will be associated to <code>self.mask_token</code> and <code>self.mask_token_id</code>.`,name:"mask_token"},{anchor:"transformers.PreTrainedTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens. Add them here to ensure they won&#x2019;t be split by the
tokenization process. Will be associated to <code>self.additional_special_tokens</code> and
<code>self.additional_special_tokens_ids</code>.`,name:"additional_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should cleanup the spaces that were added when splitting the input text during the
tokenization process.`,name:"clean_up_tokenization_spaces"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils.py#L333"}}),Et=new T({props:{name:"__call__",anchor:"transformers.PreTrainedTokenizer.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizer.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.PreTrainedTokenizer.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.PreTrainedTokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizer.__call__.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return token type IDs. If left to the default, will return the token type IDs according to
the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"return_token_type_ids"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_overflowing_tokens",description:`<strong>return_overflowing_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return overflowing token sequences. If a pair of sequences of input ids (or a batch
of pairs) is provided with <code>truncation_strategy = longest_first</code> or <code>True</code>, an error is raised instead
of returning overflowing tokens.`,name:"return_overflowing_tokens"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_special_tokens_mask",description:`<strong>return_special_tokens_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return special tokens mask information.`,name:"return_special_tokens_mask"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_offsets_mapping",description:`<strong>return_offsets_mapping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return <code>(char_start, char_end)</code> for each token.</p>
<p>This is only available on fast tokenizers inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>, if using
Python&#x2019;s tokenizer, this method will raise <code>NotImplementedError</code>.`,name:"return_offsets_mapping"},{anchor:"transformers.PreTrainedTokenizer.__call__.return_length",description:`<strong>return_length</strong>  (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the lengths of the encoded inputs.`,name:"return_length"},{anchor:"transformers.PreTrainedTokenizer.__call__.verbose",description:`<strong>verbose</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to print more information and warnings.
**kwargs &#x2014; passed to the <code>self.tokenize()</code> method`,name:"verbose"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L2487",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> \u2014 List of token ids to be fed to a model.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
</li>
<li>
<p><strong>token_type_ids</strong> \u2014 List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>\u201Ctoken_type_ids\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a></p>
</li>
<li>
<p><strong>attention_mask</strong> \u2014 List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>\u201Cattention_mask\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
</li>
<li>
<p><strong>overflowing_tokens</strong> \u2014 List of overflowing tokens sequences (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>num_truncated_tokens</strong> \u2014 Number of tokens truncated (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>special_tokens_mask</strong> \u2014 List of 0s and 1s, with 1 specifying added special tokens and 0 specifying
regular sequence tokens (when <code>add_special_tokens=True</code> and <code>return_special_tokens_mask=True</code>).</p>
</li>
<li>
<p><strong>length</strong> \u2014 The length of the inputs (when <code>return_length=True</code>)</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),$t=new T({props:{name:"batch_decode",anchor:"transformers.PreTrainedTokenizer.batch_decode",parameters:[{name:"sequences",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.batch_decode.sequences",description:`<strong>sequences</strong> (<code>Union[List[int], List[List[int]], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"sequences"},{anchor:"transformers.PreTrainedTokenizer.batch_decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.batch_decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizer.batch_decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L3445",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Pt=new T({props:{name:"decode",anchor:"transformers.PreTrainedTokenizer.decode",parameters:[{name:"token_ids",val:": typing.Union[int, typing.List[int], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.decode.token_ids",description:`<strong>token_ids</strong> (<code>Union[int, List[int], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"token_ids"},{anchor:"transformers.PreTrainedTokenizer.decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizer.decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L3479",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),It=new T({props:{name:"encode",anchor:"transformers.PreTrainedTokenizer.encode",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[int]]"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[int], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.encode.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>) &#x2014;
The first sequence to be encoded. This can be a string, a list of strings (tokenized string using the
<code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.encode.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second sequence to be encoded. This can be a string, a list of strings (tokenized string using
the <code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizer.encode.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizer.encode.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizer.encode.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizer.encode.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizer.encode.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizer.encode.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizer.encode.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizer.encode.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>
<p>**kwargs &#x2014; Passed along to the <code>.tokenize()</code> method.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L2295",returnDescription:`
<p>The tokenized ids of the text.</p>
`,returnType:`
<p><code>List[int]</code>, <code>torch.Tensor</code>, <code>tf.Tensor</code> or <code>np.ndarray</code></p>
`}}),Lt=new T({props:{name:"push_to_hub",anchor:"transformers.PreTrainedTokenizer.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"use_auth_token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '10GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = False"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your tokenizer to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.PreTrainedTokenizer.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.PreTrainedTokenizer.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 tokenizer&quot;</code>.`,name:"commit_message"},{anchor:"transformers.PreTrainedTokenizer.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.PreTrainedTokenizer.push_to_hub.use_auth_token",description:`<strong>use_auth_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:"use_auth_token"},{anchor:"transformers.PreTrainedTokenizer.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;10GB&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>).`,name:"max_shard_size"},{anchor:"transformers.PreTrainedTokenizer.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.PreTrainedTokenizer.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/utils/hub.py#L734"}}),Qe=new sv({props:{anchor:"transformers.PreTrainedTokenizer.push_to_hub.example",$$slots:{default:[fv]},$$scope:{ctx:pe}}}),Ct=new T({props:{name:"convert_ids_to_tokens",anchor:"transformers.PreTrainedTokenizer.convert_ids_to_tokens",parameters:[{name:"ids",val:": typing.Union[int, typing.List[int]]"},{name:"skip_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.convert_ids_to_tokens.ids",description:`<strong>ids</strong> (<code>int</code> or <code>List[int]</code>) &#x2014;
The token id (or token ids) to convert to tokens.`,name:"ids"},{anchor:"transformers.PreTrainedTokenizer.convert_ids_to_tokens.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils.py#L883",returnDescription:`
<p>The decoded token(s).</p>
`,returnType:`
<p><code>str</code> or <code>List[str]</code></p>
`}}),Nt=new T({props:{name:"convert_tokens_to_ids",anchor:"transformers.PreTrainedTokenizer.convert_tokens_to_ids",parameters:[{name:"tokens",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.convert_tokens_to_ids.tokens",description:"<strong>tokens</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; One or several token(s) to convert to token id(s).",name:"tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils.py#L560",returnDescription:`
<p>The token id or list of token ids.</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),At=new T({props:{name:"get_added_vocab",anchor:"transformers.PreTrainedTokenizer.get_added_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils.py#L369",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),St=new T({props:{name:"num_special_tokens_to_add",anchor:"transformers.PreTrainedTokenizer.num_special_tokens_to_add",parameters:[{name:"pair",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.num_special_tokens_to_add.pair",description:`<strong>pair</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the number of added tokens should be computed in the case of a sequence pair or a single
sequence.`,name:"pair"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils.py#L458",returnDescription:`
<p>Number of special tokens added to sequences.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ot=new av({props:{$$slots:{default:[uv]},$$scope:{ctx:pe}}}),Bt=new T({props:{name:"prepare_for_tokenization",anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization",parameters:[{name:"text",val:": str"},{name:"is_split_into_words",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization.text",description:`<strong>text</strong> (<code>str</code>) &#x2014;
The text to prepare.`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.
kwargs &#x2014;
Keyword arguments to use for the tokenization.`,name:"is_split_into_words"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils.py#L821",returnDescription:`
<p>The prepared text and the unused kwargs.</p>
`,returnType:`
<p><code>Tuple[str, Dict[str, Any]]</code></p>
`}}),Wt=new T({props:{name:"tokenize",anchor:"transformers.PreTrainedTokenizer.tokenize",parameters:[{name:"text",val:": str"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizer.tokenize.text",description:`<strong>text</strong> (<code>str</code>) &#x2014;
The sequence to be encoded.`,name:"text"},{anchor:"transformers.PreTrainedTokenizer.tokenize.*kwargs",description:`*<strong>*kwargs</strong> (additional keyword arguments) &#x2014;
Passed along to the model-specific <code>prepare_for_tokenization</code> preprocessing method.`,name:"*kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils.py#L481",returnDescription:`
<p>The list of tokens.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Ot=new Vi({}),Rt=new T({props:{name:"class transformers.PreTrainedTokenizerFast",anchor:"transformers.PreTrainedTokenizerFast",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.model_max_length",description:`<strong>model_max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum length (in number of tokens) for the inputs to the transformer model. When the tokenizer is
loaded with <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained">from_pretrained()</a>, this will be set to the
value stored for the associated model in <code>max_model_input_sizes</code> (see above). If no value is provided, will
default to VERY_LARGE_INTEGER (<code>int(1e30)</code>).`,name:"model_max_length"},{anchor:"transformers.PreTrainedTokenizerFast.padding_side",description:`<strong>padding_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have padding applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"padding_side"},{anchor:"transformers.PreTrainedTokenizerFast.truncation_side",description:`<strong>truncation_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have truncation applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"truncation_side"},{anchor:"transformers.PreTrainedTokenizerFast.model_input_names",description:`<strong>model_input_names</strong> (<code>List[string]</code>, <em>optional</em>) &#x2014;
The list of inputs accepted by the forward pass of the model (like <code>&quot;token_type_ids&quot;</code> or
<code>&quot;attention_mask&quot;</code>). Default value is picked from the class attribute of the same name.`,name:"model_input_names"},{anchor:"transformers.PreTrainedTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the beginning of a sentence. Will be associated to <code>self.bos_token</code> and
<code>self.bos_token_id</code>.`,name:"bos_token"},{anchor:"transformers.PreTrainedTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the end of a sentence. Will be associated to <code>self.eos_token</code> and
<code>self.eos_token_id</code>.`,name:"eos_token"},{anchor:"transformers.PreTrainedTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing an out-of-vocabulary token. Will be associated to <code>self.unk_token</code> and
<code>self.unk_token_id</code>.`,name:"unk_token"},{anchor:"transformers.PreTrainedTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token separating two different sentences in the same input (used by BERT for instance). Will be
associated to <code>self.sep_token</code> and <code>self.sep_token_id</code>.`,name:"sep_token"},{anchor:"transformers.PreTrainedTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token used to make arrays of tokens the same size for batching purpose. Will then be ignored by
attention mechanisms or loss computation. Will be associated to <code>self.pad_token</code> and <code>self.pad_token_id</code>.`,name:"pad_token"},{anchor:"transformers.PreTrainedTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing the class of the input (used by BERT for instance). Will be associated to
<code>self.cls_token</code> and <code>self.cls_token_id</code>.`,name:"cls_token"},{anchor:"transformers.PreTrainedTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A special token representing a masked token (used by masked-language modeling pretraining objectives, like
BERT). Will be associated to <code>self.mask_token</code> and <code>self.mask_token_id</code>.`,name:"mask_token"},{anchor:"transformers.PreTrainedTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (tuple or list of <code>str</code> or <code>tokenizers.AddedToken</code>, <em>optional</em>) &#x2014;
A tuple or a list of additional special tokens. Add them here to ensure they won&#x2019;t be split by the
tokenization process. Will be associated to <code>self.additional_special_tokens</code> and
<code>self.additional_special_tokens_ids</code>.`,name:"additional_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should cleanup the spaces that were added when splitting the input text during the
tokenization process.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizerFast.tokenizer_object",description:`<strong>tokenizer_object</strong> (<code>tokenizers.Tokenizer</code>) &#x2014;
A <code>tokenizers.Tokenizer</code> object from &#x1F917; tokenizers to instantiate from. See <a href="../fast_tokenizers">Using tokenizers from &#x1F917;
tokenizers</a> for more information.`,name:"tokenizer_object"},{anchor:"transformers.PreTrainedTokenizerFast.tokenizer_file",description:`<strong>tokenizer_file</strong> (<code>str</code>) &#x2014;
A path to a local JSON file representing a previously serialized <code>tokenizers.Tokenizer</code> object from &#x1F917;
tokenizers.`,name:"tokenizer_file"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_fast.py#L78"}}),Vt=new T({props:{name:"__call__",anchor:"transformers.PreTrainedTokenizerFast.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return token type IDs. If left to the default, will return the token type IDs according to
the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"return_token_type_ids"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_overflowing_tokens",description:`<strong>return_overflowing_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return overflowing token sequences. If a pair of sequences of input ids (or a batch
of pairs) is provided with <code>truncation_strategy = longest_first</code> or <code>True</code>, an error is raised instead
of returning overflowing tokens.`,name:"return_overflowing_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_special_tokens_mask",description:`<strong>return_special_tokens_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return special tokens mask information.`,name:"return_special_tokens_mask"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_offsets_mapping",description:`<strong>return_offsets_mapping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return <code>(char_start, char_end)</code> for each token.</p>
<p>This is only available on fast tokenizers inheriting from <a href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>, if using
Python&#x2019;s tokenizer, this method will raise <code>NotImplementedError</code>.`,name:"return_offsets_mapping"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.return_length",description:`<strong>return_length</strong>  (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the lengths of the encoded inputs.`,name:"return_length"},{anchor:"transformers.PreTrainedTokenizerFast.__call__.verbose",description:`<strong>verbose</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to print more information and warnings.
**kwargs &#x2014; passed to the <code>self.tokenize()</code> method`,name:"verbose"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L2487",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> \u2014 List of token ids to be fed to a model.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
</li>
<li>
<p><strong>token_type_ids</strong> \u2014 List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>\u201Ctoken_type_ids\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a></p>
</li>
<li>
<p><strong>attention_mask</strong> \u2014 List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>\u201Cattention_mask\u201D</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
</li>
<li>
<p><strong>overflowing_tokens</strong> \u2014 List of overflowing tokens sequences (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>num_truncated_tokens</strong> \u2014 Number of tokens truncated (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>special_tokens_mask</strong> \u2014 List of 0s and 1s, with 1 specifying added special tokens and 0 specifying
regular sequence tokens (when <code>add_special_tokens=True</code> and <code>return_special_tokens_mask=True</code>).</p>
</li>
<li>
<p><strong>length</strong> \u2014 The length of the inputs (when <code>return_length=True</code>)</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Gt=new T({props:{name:"batch_decode",anchor:"transformers.PreTrainedTokenizerFast.batch_decode",parameters:[{name:"sequences",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.sequences",description:`<strong>sequences</strong> (<code>Union[List[int], List[List[int]], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"sequences"},{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizerFast.batch_decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L3445",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),jt=new T({props:{name:"decode",anchor:"transformers.PreTrainedTokenizerFast.decode",parameters:[{name:"token_ids",val:": typing.Union[int, typing.List[int], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.decode.token_ids",description:`<strong>token_ids</strong> (<code>Union[int, List[int], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"token_ids"},{anchor:"transformers.PreTrainedTokenizerFast.decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.PreTrainedTokenizerFast.decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L3479",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Zt=new T({props:{name:"encode",anchor:"transformers.PreTrainedTokenizerFast.encode",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[int]]"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[int], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.encode.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>) &#x2014;
The first sequence to be encoded. This can be a string, a list of strings (tokenized string using the
<code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text"},{anchor:"transformers.PreTrainedTokenizerFast.encode.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second sequence to be encoded. This can be a string, a list of strings (tokenized string using
the <code>tokenize</code> method) or a list of integers (tokenized string ids using the <code>convert_tokens_to_ids</code>
method).`,name:"text_pair"},{anchor:"transformers.PreTrainedTokenizerFast.encode.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.encode.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.PreTrainedTokenizerFast.encode.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.PreTrainedTokenizerFast.encode.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizerFast.encode.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizerFast.encode.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizerFast.encode.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.PreTrainedTokenizerFast.encode.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>
<p>**kwargs &#x2014; Passed along to the <code>.tokenize()</code> method.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L2295",returnDescription:`
<p>The tokenized ids of the text.</p>
`,returnType:`
<p><code>List[int]</code>, <code>torch.Tensor</code>, <code>tf.Tensor</code> or <code>np.ndarray</code></p>
`}}),Xt=new T({props:{name:"push_to_hub",anchor:"transformers.PreTrainedTokenizerFast.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"use_temp_dir",val:": typing.Optional[bool] = None"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"use_auth_token",val:": typing.Union[bool, str, NoneType] = None"},{name:"max_shard_size",val:": typing.Union[int, str, NoneType] = '10GB'"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = False"},{name:"**deprecated_kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your tokenizer to. It should contain your organization name
when pushing to a given organization.`,name:"repo_id"},{anchor:"transformers.PreTrainedTokenizerFast.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.PreTrainedTokenizerFast.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 tokenizer&quot;</code>.`,name:"commit_message"},{anchor:"transformers.PreTrainedTokenizerFast.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.PreTrainedTokenizerFast.push_to_hub.use_auth_token",description:`<strong>use_auth_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:"use_auth_token"},{anchor:"transformers.PreTrainedTokenizerFast.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;10GB&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>).`,name:"max_shard_size"},{anchor:"transformers.PreTrainedTokenizerFast.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.PreTrainedTokenizerFast.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to convert the model weights in safetensors format for safer serialization.`,name:"safe_serialization"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/utils/hub.py#L734"}}),it=new sv({props:{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.example",$$slots:{default:[_v]},$$scope:{ctx:pe}}}),Qt=new T({props:{name:"convert_ids_to_tokens",anchor:"transformers.PreTrainedTokenizerFast.convert_ids_to_tokens",parameters:[{name:"ids",val:": typing.Union[int, typing.List[int]]"},{name:"skip_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.convert_ids_to_tokens.ids",description:`<strong>ids</strong> (<code>int</code> or <code>List[int]</code>) &#x2014;
The token id (or token ids) to convert to tokens.`,name:"ids"},{anchor:"transformers.PreTrainedTokenizerFast.convert_ids_to_tokens.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_fast.py#L290",returnDescription:`
<p>The decoded token(s).</p>
`,returnType:`
<p><code>str</code> or <code>List[str]</code></p>
`}}),Kt=new T({props:{name:"convert_tokens_to_ids",anchor:"transformers.PreTrainedTokenizerFast.convert_tokens_to_ids",parameters:[{name:"tokens",val:": typing.Union[str, typing.List[str]]"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.convert_tokens_to_ids.tokens",description:"<strong>tokens</strong> (<code>str</code> or <code>List[str]</code>) &#x2014; One or several token(s) to convert to token id(s).",name:"tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_fast.py#L235",returnDescription:`
<p>The token id or list of token ids.</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),eo=new T({props:{name:"get_added_vocab",anchor:"transformers.PreTrainedTokenizerFast.get_added_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_fast.py#L156",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),to=new T({props:{name:"num_special_tokens_to_add",anchor:"transformers.PreTrainedTokenizerFast.num_special_tokens_to_add",parameters:[{name:"pair",val:": bool = False"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.num_special_tokens_to_add.pair",description:`<strong>pair</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the number of added tokens should be computed in the case of a sequence pair or a single
sequence.`,name:"pair"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_fast.py#L269",returnDescription:`
<p>Number of special tokens added to sequences.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ht=new av({props:{$$slots:{default:[gv]},$$scope:{ctx:pe}}}),oo=new T({props:{name:"set_truncation_and_padding",anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding",parameters:[{name:"padding_strategy",val:": PaddingStrategy"},{name:"truncation_strategy",val:": TruncationStrategy"},{name:"max_length",val:": int"},{name:"stride",val:": int"},{name:"pad_to_multiple_of",val:": typing.Optional[int]"}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.padding_strategy",description:`<strong>padding_strategy</strong> (<a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>) &#x2014;
The kind of padding that will be applied to the input`,name:"padding_strategy"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.truncation_strategy",description:`<strong>truncation_strategy</strong> (<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>) &#x2014;
The kind of truncation that will be applied to the input`,name:"truncation_strategy"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.max_length",description:`<strong>max_length</strong> (<code>int</code>) &#x2014;
The maximum size of a sequence.`,name:"max_length"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.stride",description:`<strong>stride</strong> (<code>int</code>) &#x2014;
The stride to use when handling overflow.`,name:"stride"},{anchor:"transformers.PreTrainedTokenizerFast.set_truncation_and_padding.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability <code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_fast.py#L319"}}),no=new T({props:{name:"train_new_from_iterator",anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator",parameters:[{name:"text_iterator",val:""},{name:"vocab_size",val:""},{name:"length",val:" = None"},{name:"new_special_tokens",val:" = None"},{name:"special_tokens_map",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.text_iterator",description:`<strong>text_iterator</strong> (generator of <code>List[str]</code>) &#x2014;
The training corpus. Should be a generator of batches of texts, for instance a list of lists of texts
if you have everything in memory.`,name:"text_iterator"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>) &#x2014;
The size of the vocabulary you want for your tokenizer.`,name:"vocab_size"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.length",description:`<strong>length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The total number of sequences in the iterator. This is used to provide meaningful progress tracking`,name:"length"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.new_special_tokens",description:`<strong>new_special_tokens</strong> (list of <code>str</code> or <code>AddedToken</code>, <em>optional</em>) &#x2014;
A list of new special tokens to add to the tokenizer you are training.`,name:"new_special_tokens"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.special_tokens_map",description:`<strong>special_tokens_map</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
If you want to rename some of the special tokens this tokenizer uses, pass along a mapping old special
token name to new special token name in this argument.
kwargs &#x2014;
Additional keyword arguments passed along to the trainer from the &#x1F917; Tokenizers library.`,name:"special_tokens_map"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_fast.py#L607",returnDescription:`
<p>A new tokenizer of the same type as the original one, trained on
<code>text_iterator</code>.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"
>PreTrainedTokenizerFast</a></p>
`}}),ro=new Vi({}),ao=new T({props:{name:"class transformers.BatchEncoding",anchor:"transformers.BatchEncoding",parameters:[{name:"data",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"encoding",val:": typing.Union[tokenizers.Encoding, typing.Sequence[tokenizers.Encoding], NoneType] = None"},{name:"tensor_type",val:": typing.Union[NoneType, str, transformers.utils.generic.TensorType] = None"},{name:"prepend_batch_axis",val:": bool = False"},{name:"n_sequences",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.data",description:`<strong>data</strong> (<code>dict</code>) &#x2014;
Dictionary of lists/arrays/tensors returned by the <code>__call__</code>/<code>encode_plus</code>/<code>batch_encode_plus</code> methods
(&#x2018;input_ids&#x2019;, &#x2018;attention_mask&#x2019;, etc.).`,name:"data"},{anchor:"transformers.BatchEncoding.encoding",description:`<strong>encoding</strong> (<code>tokenizers.Encoding</code> or <code>Sequence[tokenizers.Encoding]</code>, <em>optional</em>) &#x2014;
If the tokenizer is a fast tokenizer which outputs additional information like mapping from word/character
space to token space the <code>tokenizers.Encoding</code> instance or list of instance (for batches) hold this
information.`,name:"encoding"},{anchor:"transformers.BatchEncoding.tensor_type",description:`<strong>tensor_type</strong> (<code>Union[None, str, TensorType]</code>, <em>optional</em>) &#x2014;
You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
initialization.`,name:"tensor_type"},{anchor:"transformers.BatchEncoding.prepend_batch_axis",description:`<strong>prepend_batch_axis</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add a batch axis when converting to tensors (see <code>tensor_type</code> above).`,name:"prepend_batch_axis"},{anchor:"transformers.BatchEncoding.n_sequences",description:`<strong>n_sequences</strong> (<code>Optional[int]</code>, <em>optional</em>) &#x2014;
You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
initialization.`,name:"n_sequences"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L164"}}),io=new T({props:{name:"char_to_token",anchor:"transformers.BatchEncoding.char_to_token",parameters:[{name:"batch_or_char_index",val:": int"},{name:"char_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.char_to_token.batch_or_char_index",description:`<strong>batch_or_char_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the word in the sequence`,name:"batch_or_char_index"},{anchor:"transformers.BatchEncoding.char_to_token.char_index",description:`<strong>char_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the word in the
sequence.`,name:"char_index"},{anchor:"transformers.BatchEncoding.char_to_token.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided character index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L543",returnDescription:`
<p>Index of the token.</p>
`,returnType:`
<p><code>int</code></p>
`}}),lo=new T({props:{name:"char_to_word",anchor:"transformers.BatchEncoding.char_to_word",parameters:[{name:"batch_or_char_index",val:": int"},{name:"char_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.char_to_word.batch_or_char_index",description:`<strong>batch_or_char_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the character in the original string.`,name:"batch_or_char_index"},{anchor:"transformers.BatchEncoding.char_to_word.char_index",description:`<strong>char_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the character in the
original string.`,name:"char_index"},{anchor:"transformers.BatchEncoding.char_to_word.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided character index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L629",returnDescription:`
<p>Index or indices of the associated encoded token(s).</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),po=new T({props:{name:"convert_to_tensors",anchor:"transformers.BatchEncoding.convert_to_tensors",parameters:[{name:"tensor_type",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"prepend_batch_axis",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BatchEncoding.convert_to_tensors.tensor_type",description:`<strong>tensor_type</strong> (<code>str</code> or <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
The type of tensors to use. If <code>str</code>, should be one of the values of the enum <a href="/docs/transformers/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>. If
<code>None</code>, no modification is done.`,name:"tensor_type"},{anchor:"transformers.BatchEncoding.convert_to_tensors.prepend_batch_axis",description:`<strong>prepend_batch_axis</strong> (<code>int</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add the batch dimension during the conversion.`,name:"prepend_batch_axis"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L668"}}),mo=new T({props:{name:"sequence_ids",anchor:"transformers.BatchEncoding.sequence_ids",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.sequence_ids.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L307",returnDescription:`
<p>A list indicating the sequence id corresponding to each token. Special tokens added
by the tokenizer are mapped to <code>None</code> and other tokens are mapped to the index of their corresponding
sequence.</p>
`,returnType:`
<p><code>List[Optional[int]]</code></p>
`}}),fo=new T({props:{name:"to",anchor:"transformers.BatchEncoding.to",parameters:[{name:"device",val:": typing.Union[str, ForwardRef('torch.device')]"}],parametersDescription:[{anchor:"transformers.BatchEncoding.to.device",description:"<strong>device</strong> (<code>str</code> or <code>torch.device</code>) &#x2014; The device to put the tensors on.",name:"device"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L756",returnDescription:`
<p>The same instance after modification.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),_o=new T({props:{name:"token_to_chars",anchor:"transformers.BatchEncoding.token_to_chars",parameters:[{name:"batch_or_token_index",val:": int"},{name:"token_index",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.token_to_chars.batch_or_token_index",description:`<strong>batch_or_token_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the token in the sequence.`,name:"batch_or_token_index"},{anchor:"transformers.BatchEncoding.token_to_chars.token_index",description:`<strong>token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the token or tokens in
the sequence.`,name:"token_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L504",returnDescription:`
<p>Span of characters in the original string, or None, if the token
(e.g. <s>, </s>) doesn\u2019t correspond to any chars in the origin string.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.CharSpan"
>CharSpan</a></p>
`}}),vo=new T({props:{name:"token_to_sequence",anchor:"transformers.BatchEncoding.token_to_sequence",parameters:[{name:"batch_or_token_index",val:": int"},{name:"token_index",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.token_to_sequence.batch_or_token_index",description:`<strong>batch_or_token_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprises one sequence, this can be the index of
the token in the sequence.`,name:"batch_or_token_index"},{anchor:"transformers.BatchEncoding.token_to_sequence.token_index",description:`<strong>token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the token in the
sequence.`,name:"token_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L374",returnDescription:`
<p>Index of the word in the input sequence.</p>
`,returnType:`
<p><code>int</code></p>
`}}),yo=new T({props:{name:"token_to_word",anchor:"transformers.BatchEncoding.token_to_word",parameters:[{name:"batch_or_token_index",val:": int"},{name:"token_index",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.BatchEncoding.token_to_word.batch_or_token_index",description:`<strong>batch_or_token_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the token in the sequence.`,name:"batch_or_token_index"},{anchor:"transformers.BatchEncoding.token_to_word.token_index",description:`<strong>token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the token in the
sequence.`,name:"token_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L413",returnDescription:`
<p>Index of the word in the input sequence.</p>
`,returnType:`
<p><code>int</code></p>
`}}),zo=new T({props:{name:"tokens",anchor:"transformers.BatchEncoding.tokens",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.tokens.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L289",returnDescription:`
<p>The list of tokens at that index.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),xo=new T({props:{name:"word_ids",anchor:"transformers.BatchEncoding.word_ids",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.word_ids.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L355",returnDescription:`
<p>A list indicating the word corresponding to each token. Special tokens added by the
tokenizer are mapped to <code>None</code> and other tokens are mapped to the index of their corresponding word
(several tokens will be mapped to the same word index if they are parts of that word).</p>
`,returnType:`
<p><code>List[Optional[int]]</code></p>
`}}),Eo=new T({props:{name:"word_to_chars",anchor:"transformers.BatchEncoding.word_to_chars",parameters:[{name:"batch_or_word_index",val:": int"},{name:"word_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.word_to_chars.batch_or_word_index",description:`<strong>batch_or_word_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprise one sequence, this can be the index of
the word in the sequence`,name:"batch_or_word_index"},{anchor:"transformers.BatchEncoding.word_to_chars.word_index",description:`<strong>word_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the word in the
sequence.`,name:"word_index"},{anchor:"transformers.BatchEncoding.word_to_chars.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided word index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L584",returnDescription:`
<p>Span(s) of the associated character or characters in the string. CharSpan
are NamedTuple with:</p>
<ul>
<li>start: index of the first character associated to the token in the original string</li>
<li>end: index of the character following the last character associated to the token in the original
string</li>
</ul>
`,returnType:`
<p><code>CharSpan</code> or <code>List[CharSpan]</code></p>
`}}),qo=new T({props:{name:"word_to_tokens",anchor:"transformers.BatchEncoding.word_to_tokens",parameters:[{name:"batch_or_word_index",val:": int"},{name:"word_index",val:": typing.Optional[int] = None"},{name:"sequence_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.word_to_tokens.batch_or_word_index",description:`<strong>batch_or_word_index</strong> (<code>int</code>) &#x2014;
Index of the sequence in the batch. If the batch only comprises one sequence, this can be the index of
the word in the sequence.`,name:"batch_or_word_index"},{anchor:"transformers.BatchEncoding.word_to_tokens.word_index",description:`<strong>word_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If a batch index is provided in <em>batch_or_token_index</em>, this can be the index of the word in the
sequence.`,name:"word_index"},{anchor:"transformers.BatchEncoding.word_to_tokens.sequence_index",description:`<strong>sequence_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If pair of sequences are encoded in the batch this can be used to specify which sequence in the pair (0
or 1) the provided word index belongs to.`,name:"sequence_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L451",returnDescription:`
<p>Span of tokens in the encoded sequence. Returns
<code>None</code> if no tokens correspond to the word. This can happen especially when the token is a special token
that has been used to format the tokenization. For example when we add a class token at the very beginning
of the tokenization.</p>
`,returnType:`
<p>(<a
  href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.TokenSpan"
>TokenSpan</a>, <em>optional</em>)</p>
`}}),Do=new T({props:{name:"words",anchor:"transformers.BatchEncoding.words",parameters:[{name:"batch_index",val:": int = 0"}],parametersDescription:[{anchor:"transformers.BatchEncoding.words.batch_index",description:"<strong>batch_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The index to access in the batch.",name:"batch_index"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/tokenization_utils_base.py#L331",returnDescription:`
<p>A list indicating the word corresponding to each token. Special tokens added by the
tokenizer are mapped to <code>None</code> and other tokens are mapped to the index of their corresponding word
(several tokens will be mapped to the same word index if they are parts of that word).</p>
`,returnType:`
<p><code>List[Optional[int]]</code></p>
`}}),{c(){y=r("meta"),F=d(),q=r("h1"),E=r("a"),W=r("span"),h(v.$$.fragment),D=d(),Wn=r("span"),Gi=o("Tokenizer"),Rs=d(),je=r("p"),ji=o(`A tokenizer is in charge of preparing the inputs for a model. The library contains tokenizers for all the models. Most
of the tokenizers are available in two flavors: a full python implementation and a \u201CFast\u201D implementation based on the
Rust library `),Tt=r("a"),Hi=o("\u{1F917} Tokenizers"),Zi=o(". The \u201CFast\u201D implementations allows:"),Ms=d(),He=r("ol"),On=r("li"),Ji=o("a significant speed-up in particular when doing batched tokenization and"),Xi=d(),Un=r("li"),Yi=o(`additional methods to map between the original string (character and words) and the token space (e.g. getting the
index of the token comprising a given character or the span of characters corresponding to a given token).`),Vs=d(),O=r("p"),Qi=o("The base classes "),So=r("a"),Ki=o("PreTrainedTokenizer"),ed=o(" and "),Bo=r("a"),td=o("PreTrainedTokenizerFast"),od=o(`
implement the common methods for encoding string inputs in model inputs (see below) and instantiating/saving python and
\u201CFast\u201D tokenizers either from a local file or directory or from a pretrained tokenizer provided by the library
(downloaded from HuggingFace\u2019s AWS S3 repository). They both rely on
`),Wo=r("a"),nd=o("PreTrainedTokenizerBase"),rd=o(` that contains the common methods, and
`),Oo=r("a"),ad=o("SpecialTokensMixin"),sd=o("."),Gs=d(),De=r("p"),Uo=r("a"),id=o("PreTrainedTokenizer"),dd=o(" and "),Ro=r("a"),cd=o("PreTrainedTokenizerFast"),ld=o(` thus implement the main
methods for using all the tokenizers:`),js=d(),me=r("ul"),Rn=r("li"),hd=o(`Tokenizing (splitting strings in sub-word token strings), converting tokens strings to ids and back, and
encoding/decoding (i.e., tokenizing and converting to integers).`),pd=d(),Mn=r("li"),md=o("Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),fd=d(),Vn=r("li"),ud=o(`Managing special tokens (like mask, beginning-of-sentence, etc.): adding them, assigning them to attributes in the
tokenizer for easy access and making sure they are not split during tokenization.`),Hs=d(),I=r("p"),Mo=r("a"),_d=o("BatchEncoding"),gd=o(` holds the output of the
`),Vo=r("a"),kd=o("PreTrainedTokenizerBase"),bd=o("\u2019s encoding methods ("),Gn=r("code"),vd=o("__call__"),Td=o(`,
`),jn=r("code"),yd=o("encode_plus"),wd=o(" and "),Hn=r("code"),zd=o("batch_encode_plus"),xd=o(`) and is derived from a Python dictionary. When the tokenizer is a pure python
tokenizer, this class behaves just like a standard python dictionary and holds the various model inputs computed by
these methods (`),Zn=r("code"),Ed=o("input_ids"),$d=o(", "),Jn=r("code"),Pd=o("attention_mask"),qd=o(`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=r("a"),Id=o("tokenizers library"),Fd=o(`), this class provides in addition
several advanced alignment methods which can be used to map between the original string (character and words) and the
token space (e.g., getting the index of the token comprising a given character or the span of characters corresponding
to a given token).`),Zs=d(),Ce=r("h2"),Ze=r("a"),Xn=r("span"),h(wt.$$.fragment),Ld=d(),Yn=r("span"),Dd=o("PreTrainedTokenizer"),Js=d(),g=r("div"),h(zt.$$.fragment),Cd=d(),Qn=r("p"),Nd=o("Base class for all slow tokenizers."),Ad=d(),xt=r("p"),Sd=o("Inherits from "),Go=r("a"),Bd=o("PreTrainedTokenizerBase"),Wd=o("."),Od=d(),Kn=r("p"),Ud=o(`Handle all the shared methods for tokenization and special tokens as well as methods downloading/caching/loading
pretrained tokenizers as well as adding tokens to the vocabulary.`),Rd=d(),er=r("p"),Md=o(`This class also contain the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),Vd=d(),tr=r("p"),Gd=o("Class attributes (overridden by derived classes)"),jd=d(),C=r("ul"),fe=r("li"),or=r("strong"),Hd=o("vocab_files_names"),Zd=o(" ("),nr=r("code"),Jd=o("Dict[str, str]"),Xd=o(") \u2014 A dictionary with, as keys, the "),rr=r("code"),Yd=o("__init__"),Qd=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Kd=d(),U=r("li"),ar=r("strong"),ec=o("pretrained_vocab_files_map"),tc=o(" ("),sr=r("code"),oc=o("Dict[str, Dict[str, str]]"),nc=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ir=r("code"),rc=o("__init__"),ac=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),dr=r("code"),sc=o("short-cut-names"),ic=o(" of the pretrained models with, as associated values, the "),cr=r("code"),dc=o("url"),cc=o(` to the
associated pretrained vocabulary file.`),lc=d(),Q=r("li"),lr=r("strong"),hc=o("max_model_input_sizes"),pc=o(" ("),hr=r("code"),mc=o("Dict[str, Optional[int]]"),fc=o(") \u2014 A dictionary with, as keys, the "),pr=r("code"),uc=o("short-cut-names"),_c=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),mr=r("code"),gc=o("None"),kc=o(" if the model has no maximum input size."),bc=d(),R=r("li"),fr=r("strong"),vc=o("pretrained_init_configuration"),Tc=o(" ("),ur=r("code"),yc=o("Dict[str, Dict[str, Any]]"),wc=o(`) \u2014 A dictionary with, as keys, the
`),_r=r("code"),zc=o("short-cut-names"),xc=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),gr=r("code"),Ec=o("__init__"),$c=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),jo=r("a"),Pc=o("from_pretrained()"),qc=o(" method."),Ic=d(),Je=r("li"),kr=r("strong"),Fc=o("model_input_names"),Lc=o(" ("),br=r("code"),Dc=o("List[str]"),Cc=o(") \u2014 A list of inputs expected in the forward pass of the model."),Nc=d(),K=r("li"),vr=r("strong"),Ac=o("padding_side"),Sc=o(" ("),Tr=r("code"),Bc=o("str"),Wc=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),yr=r("code"),Oc=o("'right'"),Uc=o(" or "),wr=r("code"),Rc=o("'left'"),Mc=o("."),Vc=d(),ee=r("li"),zr=r("strong"),Gc=o("truncation_side"),jc=o(" ("),xr=r("code"),Hc=o("str"),Zc=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),Er=r("code"),Jc=o("'right'"),Xc=o(" or "),$r=r("code"),Yc=o("'left'"),Qc=o("."),Kc=d(),Xe=r("div"),h(Et.$$.fragment),el=d(),Pr=r("p"),tl=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),ol=d(),Ye=r("div"),h($t.$$.fragment),nl=d(),qr=r("p"),rl=o("Convert a list of lists of token ids into a list of strings by calling decode."),al=d(),ue=r("div"),h(Pt.$$.fragment),sl=d(),Ir=r("p"),il=o(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),dl=d(),qt=r("p"),cl=o("Similar to doing "),Fr=r("code"),ll=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),hl=o("."),pl=d(),_e=r("div"),h(It.$$.fragment),ml=d(),Lr=r("p"),fl=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),ul=d(),Ft=r("p"),_l=o("Same as doing "),Dr=r("code"),gl=o("self.convert_tokens_to_ids(self.tokenize(text))"),kl=o("."),bl=d(),ge=r("div"),h(Lt.$$.fragment),vl=d(),Dt=r("p"),Tl=o(`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Cr=r("code"),yl=o("repo_path_or_name"),wl=o("."),zl=d(),h(Qe.$$.fragment),xl=d(),Ke=r("div"),h(Ct.$$.fragment),El=d(),Nr=r("p"),$l=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Pl=d(),et=r("div"),h(Nt.$$.fragment),ql=d(),Ar=r("p"),Il=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Fl=d(),tt=r("div"),h(At.$$.fragment),Ll=d(),Sr=r("p"),Dl=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),Cl=d(),ke=r("div"),h(St.$$.fragment),Nl=d(),Br=r("p"),Al=o("Returns the number of added tokens when encoding a sequence with special tokens."),Sl=d(),h(ot.$$.fragment),Bl=d(),be=r("div"),h(Bt.$$.fragment),Wl=d(),Wr=r("p"),Ol=o("Performs any necessary transformations before tokenization."),Ul=d(),Ne=r("p"),Rl=o("This method should pop the arguments from kwargs and return the remaining "),Or=r("code"),Ml=o("kwargs"),Vl=o(` as well. We test the
`),Ur=r("code"),Gl=o("kwargs"),jl=o(" at the end of the encoding process to be sure all the arguments have been used."),Hl=d(),ve=r("div"),h(Wt.$$.fragment),Zl=d(),Rr=r("p"),Jl=o("Converts a string in a sequence of tokens, using the tokenizer."),Xl=d(),Mr=r("p"),Yl=o(`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),Xs=d(),Ae=r("h2"),nt=r("a"),Vr=r("span"),h(Ot.$$.fragment),Ql=d(),Gr=r("span"),Kl=o("PreTrainedTokenizerFast"),Ys=d(),te=r("p"),eh=o("The "),Ho=r("a"),th=o("PreTrainedTokenizerFast"),oh=o(" depend on the "),Ut=r("a"),nh=o("tokenizers"),rh=o(` library. The tokenizers obtained from the \u{1F917} tokenizers library can be
loaded very simply into \u{1F917} transformers. Take a look at the `),Zo=r("a"),ah=o("Using tokenizers from \u{1F917} tokenizers"),sh=o(" page to understand how this is done."),Qs=d(),k=r("div"),h(Rt.$$.fragment),ih=d(),jr=r("p"),dh=o("Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),ch=d(),Mt=r("p"),lh=o("Inherits from "),Jo=r("a"),hh=o("PreTrainedTokenizerBase"),ph=o("."),mh=d(),Hr=r("p"),fh=o(`Handles all the shared methods for tokenization and special tokens, as well as methods for
downloading/caching/loading pretrained tokenizers, as well as adding tokens to the vocabulary.`),uh=d(),Zr=r("p"),_h=o(`This class also contains the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),gh=d(),Jr=r("p"),kh=o("Class attributes (overridden by derived classes)"),bh=d(),N=r("ul"),Te=r("li"),Xr=r("strong"),vh=o("vocab_files_names"),Th=o(" ("),Yr=r("code"),yh=o("Dict[str, str]"),wh=o(") \u2014 A dictionary with, as keys, the "),Qr=r("code"),zh=o("__init__"),xh=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Eh=d(),M=r("li"),Kr=r("strong"),$h=o("pretrained_vocab_files_map"),Ph=o(" ("),ea=r("code"),qh=o("Dict[str, Dict[str, str]]"),Ih=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ta=r("code"),Fh=o("__init__"),Lh=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),oa=r("code"),Dh=o("short-cut-names"),Ch=o(" of the pretrained models with, as associated values, the "),na=r("code"),Nh=o("url"),Ah=o(` to the
associated pretrained vocabulary file.`),Sh=d(),oe=r("li"),ra=r("strong"),Bh=o("max_model_input_sizes"),Wh=o(" ("),aa=r("code"),Oh=o("Dict[str, Optional[int]]"),Uh=o(") \u2014 A dictionary with, as keys, the "),sa=r("code"),Rh=o("short-cut-names"),Mh=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),ia=r("code"),Vh=o("None"),Gh=o(" if the model has no maximum input size."),jh=d(),V=r("li"),da=r("strong"),Hh=o("pretrained_init_configuration"),Zh=o(" ("),ca=r("code"),Jh=o("Dict[str, Dict[str, Any]]"),Xh=o(`) \u2014 A dictionary with, as keys, the
`),la=r("code"),Yh=o("short-cut-names"),Qh=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ha=r("code"),Kh=o("__init__"),ep=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Xo=r("a"),tp=o("from_pretrained()"),op=o(" method."),np=d(),rt=r("li"),pa=r("strong"),rp=o("model_input_names"),ap=o(" ("),ma=r("code"),sp=o("List[str]"),ip=o(") \u2014 A list of inputs expected in the forward pass of the model."),dp=d(),ne=r("li"),fa=r("strong"),cp=o("padding_side"),lp=o(" ("),ua=r("code"),hp=o("str"),pp=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),_a=r("code"),mp=o("'right'"),fp=o(" or "),ga=r("code"),up=o("'left'"),_p=o("."),gp=d(),re=r("li"),ka=r("strong"),kp=o("truncation_side"),bp=o(" ("),ba=r("code"),vp=o("str"),Tp=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),va=r("code"),yp=o("'right'"),wp=o(" or "),Ta=r("code"),zp=o("'left'"),xp=o("."),Ep=d(),at=r("div"),h(Vt.$$.fragment),$p=d(),ya=r("p"),Pp=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),qp=d(),st=r("div"),h(Gt.$$.fragment),Ip=d(),wa=r("p"),Fp=o("Convert a list of lists of token ids into a list of strings by calling decode."),Lp=d(),ye=r("div"),h(jt.$$.fragment),Dp=d(),za=r("p"),Cp=o(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Np=d(),Ht=r("p"),Ap=o("Similar to doing "),xa=r("code"),Sp=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Bp=o("."),Wp=d(),we=r("div"),h(Zt.$$.fragment),Op=d(),Ea=r("p"),Up=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Rp=d(),Jt=r("p"),Mp=o("Same as doing "),$a=r("code"),Vp=o("self.convert_tokens_to_ids(self.tokenize(text))"),Gp=o("."),jp=d(),ze=r("div"),h(Xt.$$.fragment),Hp=d(),Yt=r("p"),Zp=o(`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Pa=r("code"),Jp=o("repo_path_or_name"),Xp=o("."),Yp=d(),h(it.$$.fragment),Qp=d(),dt=r("div"),h(Qt.$$.fragment),Kp=d(),qa=r("p"),em=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),tm=d(),ct=r("div"),h(Kt.$$.fragment),om=d(),Ia=r("p"),nm=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),rm=d(),lt=r("div"),h(eo.$$.fragment),am=d(),Fa=r("p"),sm=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),im=d(),xe=r("div"),h(to.$$.fragment),dm=d(),La=r("p"),cm=o("Returns the number of added tokens when encoding a sequence with special tokens."),lm=d(),h(ht.$$.fragment),hm=d(),Ee=r("div"),h(oo.$$.fragment),pm=d(),Da=r("p"),mm=o(`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),fm=d(),Ca=r("p"),um=o(`The provided tokenizer has no padding / truncation strategy before the managed section. If your tokenizer set a
padding / truncation strategy before, then it will be reset to no padding / truncation when exiting the managed
section.`),_m=d(),pt=r("div"),h(no.$$.fragment),gm=d(),Na=r("p"),km=o(`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Ks=d(),Se=r("h2"),mt=r("a"),Aa=r("span"),h(ro.$$.fragment),bm=d(),Sa=r("span"),vm=o("BatchEncoding"),ei=d(),w=r("div"),h(ao.$$.fragment),Tm=d(),ie=r("p"),ym=o("Holds the output of the "),so=r("a"),Ba=r("strong"),wm=o("call"),zm=o("()"),xm=o(`,
`),Yo=r("a"),Em=o("encode_plus()"),$m=o(` and
`),Qo=r("a"),Pm=o("batch_encode_plus()"),qm=o(" methods (tokens, attention_masks, etc)."),Im=d(),Wa=r("p"),Fm=o(`This class is derived from a python dictionary and can be used as a dictionary. In addition, this class exposes
utility methods to map from word/character space to token space.`),Lm=d(),G=r("div"),h(io.$$.fragment),Dm=d(),Oa=r("p"),Cm=o(`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),Nm=d(),Ua=r("p"),Am=o("Can be called as:"),Sm=d(),co=r("ul"),Ko=r("li"),Ra=r("code"),Bm=o("self.char_to_token(char_index)"),Wm=o(" if batch size is 1"),Om=d(),en=r("li"),Ma=r("code"),Um=o("self.char_to_token(batch_index, char_index)"),Rm=o(" if batch size is greater or equal to 1"),Mm=d(),Va=r("p"),Vm=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),Gm=d(),j=r("div"),h(lo.$$.fragment),jm=d(),Ga=r("p"),Hm=o(`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),Zm=d(),ja=r("p"),Jm=o("Can be called as:"),Xm=d(),ho=r("ul"),tn=r("li"),Ha=r("code"),Ym=o("self.char_to_word(char_index)"),Qm=o(" if batch size is 1"),Km=d(),on=r("li"),Za=r("code"),ef=o("self.char_to_word(batch_index, char_index)"),tf=o(" if batch size is greater than 1"),of=d(),Ja=r("p"),nf=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),rf=d(),ft=r("div"),h(po.$$.fragment),af=d(),Xa=r("p"),sf=o("Convert the inner content to tensors."),df=d(),$e=r("div"),h(mo.$$.fragment),cf=d(),Ya=r("p"),lf=o("Return a list mapping the tokens to the id of their original sentences:"),hf=d(),Be=r("ul"),nn=r("li"),Qa=r("code"),pf=o("None"),mf=o(" for special tokens added around or between sequences,"),ff=d(),rn=r("li"),Ka=r("code"),uf=o("0"),_f=o(" for tokens corresponding to words in the first sequence,"),gf=d(),an=r("li"),es=r("code"),kf=o("1"),bf=o(` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),vf=d(),ut=r("div"),h(fo.$$.fragment),Tf=d(),uo=r("p"),yf=o("Send all values to device by calling "),ts=r("code"),wf=o("v.to(device)"),zf=o(" (PyTorch only)."),xf=d(),S=r("div"),h(_o.$$.fragment),Ef=d(),os=r("p"),$f=o("Get the character span corresponding to an encoded token in a sequence of the batch."),Pf=d(),go=r("p"),qf=o("Character spans are returned as a "),sn=r("a"),If=o("CharSpan"),Ff=o(" with:"),Lf=d(),ko=r("ul"),dn=r("li"),ns=r("strong"),Df=o("start"),Cf=o(" \u2014 Index of the first character in the original string associated to the token."),Nf=d(),cn=r("li"),rs=r("strong"),Af=o("end"),Sf=o(` \u2014 Index of the character following the last character in the original string associated to the
token.`),Bf=d(),as=r("p"),Wf=o("Can be called as:"),Of=d(),bo=r("ul"),ln=r("li"),ss=r("code"),Uf=o("self.token_to_chars(token_index)"),Rf=o(" if batch size is 1"),Mf=d(),hn=r("li"),is=r("code"),Vf=o("self.token_to_chars(batch_index, token_index)"),Gf=o(" if batch size is greater or equal to 1"),jf=d(),H=r("div"),h(vo.$$.fragment),Hf=d(),We=r("p"),Zf=o("Get the index of the sequence represented by the given token. In the general use case, this method returns "),ds=r("code"),Jf=o("0"),Xf=o(`
for a single sequence or the first sequence of a pair, and `),cs=r("code"),Yf=o("1"),Qf=o(" for the second sequence of a pair"),Kf=d(),ls=r("p"),eu=o("Can be called as:"),tu=d(),To=r("ul"),pn=r("li"),hs=r("code"),ou=o("self.token_to_sequence(token_index)"),nu=o(" if batch size is 1"),ru=d(),mn=r("li"),ps=r("code"),au=o("self.token_to_sequence(batch_index, token_index)"),su=o(" if batch size is greater than 1"),iu=d(),ms=r("p"),du=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),cu=d(),Z=r("div"),h(yo.$$.fragment),lu=d(),fs=r("p"),hu=o("Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),pu=d(),us=r("p"),mu=o("Can be called as:"),fu=d(),wo=r("ul"),fn=r("li"),_s=r("code"),uu=o("self.token_to_word(token_index)"),_u=o(" if batch size is 1"),gu=d(),un=r("li"),gs=r("code"),ku=o("self.token_to_word(batch_index, token_index)"),bu=o(" if batch size is greater than 1"),vu=d(),ks=r("p"),Tu=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),yu=d(),_t=r("div"),h(zo.$$.fragment),wu=d(),bs=r("p"),zu=o(`Return the list of tokens (sub-parts of the input strings after word/subword splitting and before conversion to
integer indices) at a given batch index (only works for the output of a fast tokenizer).`),xu=d(),gt=r("div"),h(xo.$$.fragment),Eu=d(),vs=r("p"),$u=o("Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Pu=d(),B=r("div"),h(Eo.$$.fragment),qu=d(),Ts=r("p"),Iu=o("Get the character span in the original string corresponding to given word in a sequence of the batch."),Fu=d(),ys=r("p"),Lu=o("Character spans are returned as a CharSpan NamedTuple with:"),Du=d(),$o=r("ul"),ws=r("li"),Cu=o("start: index of the first character in the original string"),Nu=d(),zs=r("li"),Au=o("end: index of the character following the last character in the original string"),Su=d(),xs=r("p"),Bu=o("Can be called as:"),Wu=d(),Po=r("ul"),_n=r("li"),Es=r("code"),Ou=o("self.word_to_chars(word_index)"),Uu=o(" if batch size is 1"),Ru=d(),gn=r("li"),$s=r("code"),Mu=o("self.word_to_chars(batch_index, word_index)"),Vu=o(" if batch size is greater or equal to 1"),Gu=d(),L=r("div"),h(qo.$$.fragment),ju=d(),Ps=r("p"),Hu=o("Get the encoded token span corresponding to a word in a sequence of the batch."),Zu=d(),Io=r("p"),Ju=o("Token spans are returned as a "),kn=r("a"),Xu=o("TokenSpan"),Yu=o(" with:"),Qu=d(),Fo=r("ul"),bn=r("li"),qs=r("strong"),Ku=o("start"),e_=o(" \u2014 Index of the first token."),t_=d(),vn=r("li"),Is=r("strong"),o_=o("end"),n_=o(" \u2014 Index of the token following the last token."),r_=d(),Fs=r("p"),a_=o("Can be called as:"),s_=d(),Lo=r("ul"),Tn=r("li"),Ls=r("code"),i_=o("self.word_to_tokens(word_index, sequence_index: int = 0)"),d_=o(" if batch size is 1"),c_=d(),yn=r("li"),Ds=r("code"),l_=o("self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),h_=o(` if batch size is greater or equal to
1`),p_=d(),Cs=r("p"),m_=o(`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),f_=d(),kt=r("div"),h(Do.$$.fragment),u_=d(),Ns=r("p"),__=o("Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),this.h()},l(i){const b=pv('[data-svelte="svelte-1phssyn"]',document.head);y=a(b,"META",{name:!0,content:!0}),b.forEach(t),F=c(i),q=a(i,"H1",{class:!0});var Co=s(q);E=a(Co,"A",{id:!0,class:!0,href:!0});var As=s(E);W=a(As,"SPAN",{});var Ss=s(W);p(v.$$.fragment,Ss),Ss.forEach(t),As.forEach(t),D=c(Co),Wn=a(Co,"SPAN",{});var Bs=s(Wn);Gi=n(Bs,"Tokenizer"),Bs.forEach(t),Co.forEach(t),Rs=c(i),je=a(i,"P",{});var oi=s(je);ji=n(oi,`A tokenizer is in charge of preparing the inputs for a model. The library contains tokenizers for all the models. Most
of the tokenizers are available in two flavors: a full python implementation and a \u201CFast\u201D implementation based on the
Rust library `),Tt=a(oi,"A",{href:!0,rel:!0});var W_=s(Tt);Hi=n(W_,"\u{1F917} Tokenizers"),W_.forEach(t),Zi=n(oi,". The \u201CFast\u201D implementations allows:"),oi.forEach(t),Ms=c(i),He=a(i,"OL",{});var ni=s(He);On=a(ni,"LI",{});var O_=s(On);Ji=n(O_,"a significant speed-up in particular when doing batched tokenization and"),O_.forEach(t),Xi=c(ni),Un=a(ni,"LI",{});var U_=s(Un);Yi=n(U_,`additional methods to map between the original string (character and words) and the token space (e.g. getting the
index of the token comprising a given character or the span of characters corresponding to a given token).`),U_.forEach(t),ni.forEach(t),Vs=c(i),O=a(i,"P",{});var Pe=s(O);Qi=n(Pe,"The base classes "),So=a(Pe,"A",{href:!0});var R_=s(So);Ki=n(R_,"PreTrainedTokenizer"),R_.forEach(t),ed=n(Pe," and "),Bo=a(Pe,"A",{href:!0});var M_=s(Bo);td=n(M_,"PreTrainedTokenizerFast"),M_.forEach(t),od=n(Pe,`
implement the common methods for encoding string inputs in model inputs (see below) and instantiating/saving python and
\u201CFast\u201D tokenizers either from a local file or directory or from a pretrained tokenizer provided by the library
(downloaded from HuggingFace\u2019s AWS S3 repository). They both rely on
`),Wo=a(Pe,"A",{href:!0});var V_=s(Wo);nd=n(V_,"PreTrainedTokenizerBase"),V_.forEach(t),rd=n(Pe,` that contains the common methods, and
`),Oo=a(Pe,"A",{href:!0});var G_=s(Oo);ad=n(G_,"SpecialTokensMixin"),G_.forEach(t),sd=n(Pe,"."),Pe.forEach(t),Gs=c(i),De=a(i,"P",{});var Ws=s(De);Uo=a(Ws,"A",{href:!0});var j_=s(Uo);id=n(j_,"PreTrainedTokenizer"),j_.forEach(t),dd=n(Ws," and "),Ro=a(Ws,"A",{href:!0});var H_=s(Ro);cd=n(H_,"PreTrainedTokenizerFast"),H_.forEach(t),ld=n(Ws,` thus implement the main
methods for using all the tokenizers:`),Ws.forEach(t),js=c(i),me=a(i,"UL",{});var wn=s(me);Rn=a(wn,"LI",{});var Z_=s(Rn);hd=n(Z_,`Tokenizing (splitting strings in sub-word token strings), converting tokens strings to ids and back, and
encoding/decoding (i.e., tokenizing and converting to integers).`),Z_.forEach(t),pd=c(wn),Mn=a(wn,"LI",{});var J_=s(Mn);md=n(J_,"Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),J_.forEach(t),fd=c(wn),Vn=a(wn,"LI",{});var X_=s(Vn);ud=n(X_,`Managing special tokens (like mask, beginning-of-sentence, etc.): adding them, assigning them to attributes in the
tokenizer for easy access and making sure they are not split during tokenization.`),X_.forEach(t),wn.forEach(t),Hs=c(i),I=a(i,"P",{});var A=s(I);Mo=a(A,"A",{href:!0});var Y_=s(Mo);_d=n(Y_,"BatchEncoding"),Y_.forEach(t),gd=n(A,` holds the output of the
`),Vo=a(A,"A",{href:!0});var Q_=s(Vo);kd=n(Q_,"PreTrainedTokenizerBase"),Q_.forEach(t),bd=n(A,"\u2019s encoding methods ("),Gn=a(A,"CODE",{});var K_=s(Gn);vd=n(K_,"__call__"),K_.forEach(t),Td=n(A,`,
`),jn=a(A,"CODE",{});var eg=s(jn);yd=n(eg,"encode_plus"),eg.forEach(t),wd=n(A," and "),Hn=a(A,"CODE",{});var tg=s(Hn);zd=n(tg,"batch_encode_plus"),tg.forEach(t),xd=n(A,`) and is derived from a Python dictionary. When the tokenizer is a pure python
tokenizer, this class behaves just like a standard python dictionary and holds the various model inputs computed by
these methods (`),Zn=a(A,"CODE",{});var og=s(Zn);Ed=n(og,"input_ids"),og.forEach(t),$d=n(A,", "),Jn=a(A,"CODE",{});var ng=s(Jn);Pd=n(ng,"attention_mask"),ng.forEach(t),qd=n(A,`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=a(A,"A",{href:!0,rel:!0});var rg=s(yt);Id=n(rg,"tokenizers library"),rg.forEach(t),Fd=n(A,`), this class provides in addition
several advanced alignment methods which can be used to map between the original string (character and words) and the
token space (e.g., getting the index of the token comprising a given character or the span of characters corresponding
to a given token).`),A.forEach(t),Zs=c(i),Ce=a(i,"H2",{class:!0});var ri=s(Ce);Ze=a(ri,"A",{id:!0,class:!0,href:!0});var ag=s(Ze);Xn=a(ag,"SPAN",{});var sg=s(Xn);p(wt.$$.fragment,sg),sg.forEach(t),ag.forEach(t),Ld=c(ri),Yn=a(ri,"SPAN",{});var ig=s(Yn);Dd=n(ig,"PreTrainedTokenizer"),ig.forEach(t),ri.forEach(t),Js=c(i),g=a(i,"DIV",{class:!0});var z=s(g);p(zt.$$.fragment,z),Cd=c(z),Qn=a(z,"P",{});var dg=s(Qn);Nd=n(dg,"Base class for all slow tokenizers."),dg.forEach(t),Ad=c(z),xt=a(z,"P",{});var ai=s(xt);Sd=n(ai,"Inherits from "),Go=a(ai,"A",{href:!0});var cg=s(Go);Bd=n(cg,"PreTrainedTokenizerBase"),cg.forEach(t),Wd=n(ai,"."),ai.forEach(t),Od=c(z),Kn=a(z,"P",{});var lg=s(Kn);Ud=n(lg,`Handle all the shared methods for tokenization and special tokens as well as methods downloading/caching/loading
pretrained tokenizers as well as adding tokens to the vocabulary.`),lg.forEach(t),Rd=c(z),er=a(z,"P",{});var hg=s(er);Md=n(hg,`This class also contain the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),hg.forEach(t),Vd=c(z),tr=a(z,"P",{});var pg=s(tr);Gd=n(pg,"Class attributes (overridden by derived classes)"),pg.forEach(t),jd=c(z),C=a(z,"UL",{});var J=s(C);fe=a(J,"LI",{});var No=s(fe);or=a(No,"STRONG",{});var mg=s(or);Hd=n(mg,"vocab_files_names"),mg.forEach(t),Zd=n(No," ("),nr=a(No,"CODE",{});var fg=s(nr);Jd=n(fg,"Dict[str, str]"),fg.forEach(t),Xd=n(No,") \u2014 A dictionary with, as keys, the "),rr=a(No,"CODE",{});var ug=s(rr);Yd=n(ug,"__init__"),ug.forEach(t),Qd=n(No,` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),No.forEach(t),Kd=c(J),U=a(J,"LI",{});var de=s(U);ar=a(de,"STRONG",{});var _g=s(ar);ec=n(_g,"pretrained_vocab_files_map"),_g.forEach(t),tc=n(de," ("),sr=a(de,"CODE",{});var gg=s(sr);oc=n(gg,"Dict[str, Dict[str, str]]"),gg.forEach(t),nc=n(de,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ir=a(de,"CODE",{});var kg=s(ir);rc=n(kg,"__init__"),kg.forEach(t),ac=n(de,` keyword name of each vocabulary file required by the model, the
low-level being the `),dr=a(de,"CODE",{});var bg=s(dr);sc=n(bg,"short-cut-names"),bg.forEach(t),ic=n(de," of the pretrained models with, as associated values, the "),cr=a(de,"CODE",{});var vg=s(cr);dc=n(vg,"url"),vg.forEach(t),cc=n(de,` to the
associated pretrained vocabulary file.`),de.forEach(t),lc=c(J),Q=a(J,"LI",{});var Oe=s(Q);lr=a(Oe,"STRONG",{});var Tg=s(lr);hc=n(Tg,"max_model_input_sizes"),Tg.forEach(t),pc=n(Oe," ("),hr=a(Oe,"CODE",{});var yg=s(hr);mc=n(yg,"Dict[str, Optional[int]]"),yg.forEach(t),fc=n(Oe,") \u2014 A dictionary with, as keys, the "),pr=a(Oe,"CODE",{});var wg=s(pr);uc=n(wg,"short-cut-names"),wg.forEach(t),_c=n(Oe,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),mr=a(Oe,"CODE",{});var zg=s(mr);gc=n(zg,"None"),zg.forEach(t),kc=n(Oe," if the model has no maximum input size."),Oe.forEach(t),bc=c(J),R=a(J,"LI",{});var ce=s(R);fr=a(ce,"STRONG",{});var xg=s(fr);vc=n(xg,"pretrained_init_configuration"),xg.forEach(t),Tc=n(ce," ("),ur=a(ce,"CODE",{});var Eg=s(ur);yc=n(Eg,"Dict[str, Dict[str, Any]]"),Eg.forEach(t),wc=n(ce,`) \u2014 A dictionary with, as keys, the
`),_r=a(ce,"CODE",{});var $g=s(_r);zc=n($g,"short-cut-names"),$g.forEach(t),xc=n(ce,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),gr=a(ce,"CODE",{});var Pg=s(gr);Ec=n(Pg,"__init__"),Pg.forEach(t),$c=n(ce,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),jo=a(ce,"A",{href:!0});var qg=s(jo);Pc=n(qg,"from_pretrained()"),qg.forEach(t),qc=n(ce," method."),ce.forEach(t),Ic=c(J),Je=a(J,"LI",{});var Os=s(Je);kr=a(Os,"STRONG",{});var Ig=s(kr);Fc=n(Ig,"model_input_names"),Ig.forEach(t),Lc=n(Os," ("),br=a(Os,"CODE",{});var Fg=s(br);Dc=n(Fg,"List[str]"),Fg.forEach(t),Cc=n(Os,") \u2014 A list of inputs expected in the forward pass of the model."),Os.forEach(t),Nc=c(J),K=a(J,"LI",{});var Ue=s(K);vr=a(Ue,"STRONG",{});var Lg=s(vr);Ac=n(Lg,"padding_side"),Lg.forEach(t),Sc=n(Ue," ("),Tr=a(Ue,"CODE",{});var Dg=s(Tr);Bc=n(Dg,"str"),Dg.forEach(t),Wc=n(Ue,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),yr=a(Ue,"CODE",{});var Cg=s(yr);Oc=n(Cg,"'right'"),Cg.forEach(t),Uc=n(Ue," or "),wr=a(Ue,"CODE",{});var Ng=s(wr);Rc=n(Ng,"'left'"),Ng.forEach(t),Mc=n(Ue,"."),Ue.forEach(t),Vc=c(J),ee=a(J,"LI",{});var Re=s(ee);zr=a(Re,"STRONG",{});var Ag=s(zr);Gc=n(Ag,"truncation_side"),Ag.forEach(t),jc=n(Re," ("),xr=a(Re,"CODE",{});var Sg=s(xr);Hc=n(Sg,"str"),Sg.forEach(t),Zc=n(Re,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),Er=a(Re,"CODE",{});var Bg=s(Er);Jc=n(Bg,"'right'"),Bg.forEach(t),Xc=n(Re," or "),$r=a(Re,"CODE",{});var Wg=s($r);Yc=n(Wg,"'left'"),Wg.forEach(t),Qc=n(Re,"."),Re.forEach(t),J.forEach(t),Kc=c(z),Xe=a(z,"DIV",{class:!0});var si=s(Xe);p(Et.$$.fragment,si),el=c(si),Pr=a(si,"P",{});var Og=s(Pr);tl=n(Og,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Og.forEach(t),si.forEach(t),ol=c(z),Ye=a(z,"DIV",{class:!0});var ii=s(Ye);p($t.$$.fragment,ii),nl=c(ii),qr=a(ii,"P",{});var Ug=s(qr);rl=n(Ug,"Convert a list of lists of token ids into a list of strings by calling decode."),Ug.forEach(t),ii.forEach(t),al=c(z),ue=a(z,"DIV",{class:!0});var zn=s(ue);p(Pt.$$.fragment,zn),sl=c(zn),Ir=a(zn,"P",{});var Rg=s(Ir);il=n(Rg,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Rg.forEach(t),dl=c(zn),qt=a(zn,"P",{});var di=s(qt);cl=n(di,"Similar to doing "),Fr=a(di,"CODE",{});var Mg=s(Fr);ll=n(Mg,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Mg.forEach(t),hl=n(di,"."),di.forEach(t),zn.forEach(t),pl=c(z),_e=a(z,"DIV",{class:!0});var xn=s(_e);p(It.$$.fragment,xn),ml=c(xn),Lr=a(xn,"P",{});var Vg=s(Lr);fl=n(Vg,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Vg.forEach(t),ul=c(xn),Ft=a(xn,"P",{});var ci=s(Ft);_l=n(ci,"Same as doing "),Dr=a(ci,"CODE",{});var Gg=s(Dr);gl=n(Gg,"self.convert_tokens_to_ids(self.tokenize(text))"),Gg.forEach(t),kl=n(ci,"."),ci.forEach(t),xn.forEach(t),bl=c(z),ge=a(z,"DIV",{class:!0});var En=s(ge);p(Lt.$$.fragment,En),vl=c(En),Dt=a(En,"P",{});var li=s(Dt);Tl=n(li,`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Cr=a(li,"CODE",{});var jg=s(Cr);yl=n(jg,"repo_path_or_name"),jg.forEach(t),wl=n(li,"."),li.forEach(t),zl=c(En),p(Qe.$$.fragment,En),En.forEach(t),xl=c(z),Ke=a(z,"DIV",{class:!0});var hi=s(Ke);p(Ct.$$.fragment,hi),El=c(hi),Nr=a(hi,"P",{});var Hg=s(Nr);$l=n(Hg,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Hg.forEach(t),hi.forEach(t),Pl=c(z),et=a(z,"DIV",{class:!0});var pi=s(et);p(Nt.$$.fragment,pi),ql=c(pi),Ar=a(pi,"P",{});var Zg=s(Ar);Il=n(Zg,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Zg.forEach(t),pi.forEach(t),Fl=c(z),tt=a(z,"DIV",{class:!0});var mi=s(tt);p(At.$$.fragment,mi),Ll=c(mi),Sr=a(mi,"P",{});var Jg=s(Sr);Dl=n(Jg,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Jg.forEach(t),mi.forEach(t),Cl=c(z),ke=a(z,"DIV",{class:!0});var $n=s(ke);p(St.$$.fragment,$n),Nl=c($n),Br=a($n,"P",{});var Xg=s(Br);Al=n(Xg,"Returns the number of added tokens when encoding a sequence with special tokens."),Xg.forEach(t),Sl=c($n),p(ot.$$.fragment,$n),$n.forEach(t),Bl=c(z),be=a(z,"DIV",{class:!0});var Pn=s(be);p(Bt.$$.fragment,Pn),Wl=c(Pn),Wr=a(Pn,"P",{});var Yg=s(Wr);Ol=n(Yg,"Performs any necessary transformations before tokenization."),Yg.forEach(t),Ul=c(Pn),Ne=a(Pn,"P",{});var qn=s(Ne);Rl=n(qn,"This method should pop the arguments from kwargs and return the remaining "),Or=a(qn,"CODE",{});var Qg=s(Or);Ml=n(Qg,"kwargs"),Qg.forEach(t),Vl=n(qn,` as well. We test the
`),Ur=a(qn,"CODE",{});var Kg=s(Ur);Gl=n(Kg,"kwargs"),Kg.forEach(t),jl=n(qn," at the end of the encoding process to be sure all the arguments have been used."),qn.forEach(t),Pn.forEach(t),Hl=c(z),ve=a(z,"DIV",{class:!0});var In=s(ve);p(Wt.$$.fragment,In),Zl=c(In),Rr=a(In,"P",{});var ek=s(Rr);Jl=n(ek,"Converts a string in a sequence of tokens, using the tokenizer."),ek.forEach(t),Xl=c(In),Mr=a(In,"P",{});var tk=s(Mr);Yl=n(tk,`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),tk.forEach(t),In.forEach(t),z.forEach(t),Xs=c(i),Ae=a(i,"H2",{class:!0});var fi=s(Ae);nt=a(fi,"A",{id:!0,class:!0,href:!0});var ok=s(nt);Vr=a(ok,"SPAN",{});var nk=s(Vr);p(Ot.$$.fragment,nk),nk.forEach(t),ok.forEach(t),Ql=c(fi),Gr=a(fi,"SPAN",{});var rk=s(Gr);Kl=n(rk,"PreTrainedTokenizerFast"),rk.forEach(t),fi.forEach(t),Ys=c(i),te=a(i,"P",{});var bt=s(te);eh=n(bt,"The "),Ho=a(bt,"A",{href:!0});var ak=s(Ho);th=n(ak,"PreTrainedTokenizerFast"),ak.forEach(t),oh=n(bt," depend on the "),Ut=a(bt,"A",{href:!0,rel:!0});var sk=s(Ut);nh=n(sk,"tokenizers"),sk.forEach(t),rh=n(bt,` library. The tokenizers obtained from the \u{1F917} tokenizers library can be
loaded very simply into \u{1F917} transformers. Take a look at the `),Zo=a(bt,"A",{href:!0});var ik=s(Zo);ah=n(ik,"Using tokenizers from \u{1F917} tokenizers"),ik.forEach(t),sh=n(bt," page to understand how this is done."),bt.forEach(t),Qs=c(i),k=a(i,"DIV",{class:!0});var x=s(k);p(Rt.$$.fragment,x),ih=c(x),jr=a(x,"P",{});var dk=s(jr);dh=n(dk,"Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),dk.forEach(t),ch=c(x),Mt=a(x,"P",{});var ui=s(Mt);lh=n(ui,"Inherits from "),Jo=a(ui,"A",{href:!0});var ck=s(Jo);hh=n(ck,"PreTrainedTokenizerBase"),ck.forEach(t),ph=n(ui,"."),ui.forEach(t),mh=c(x),Hr=a(x,"P",{});var lk=s(Hr);fh=n(lk,`Handles all the shared methods for tokenization and special tokens, as well as methods for
downloading/caching/loading pretrained tokenizers, as well as adding tokens to the vocabulary.`),lk.forEach(t),uh=c(x),Zr=a(x,"P",{});var hk=s(Zr);_h=n(hk,`This class also contains the added tokens in a unified way on top of all tokenizers so we don\u2019t have to handle the
specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece\u2026).`),hk.forEach(t),gh=c(x),Jr=a(x,"P",{});var pk=s(Jr);kh=n(pk,"Class attributes (overridden by derived classes)"),pk.forEach(t),bh=c(x),N=a(x,"UL",{});var X=s(N);Te=a(X,"LI",{});var Ao=s(Te);Xr=a(Ao,"STRONG",{});var mk=s(Xr);vh=n(mk,"vocab_files_names"),mk.forEach(t),Th=n(Ao," ("),Yr=a(Ao,"CODE",{});var fk=s(Yr);yh=n(fk,"Dict[str, str]"),fk.forEach(t),wh=n(Ao,") \u2014 A dictionary with, as keys, the "),Qr=a(Ao,"CODE",{});var uk=s(Qr);zh=n(uk,"__init__"),uk.forEach(t),xh=n(Ao,` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Ao.forEach(t),Eh=c(X),M=a(X,"LI",{});var le=s(M);Kr=a(le,"STRONG",{});var _k=s(Kr);$h=n(_k,"pretrained_vocab_files_map"),_k.forEach(t),Ph=n(le," ("),ea=a(le,"CODE",{});var gk=s(ea);qh=n(gk,"Dict[str, Dict[str, str]]"),gk.forEach(t),Ih=n(le,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),ta=a(le,"CODE",{});var kk=s(ta);Fh=n(kk,"__init__"),kk.forEach(t),Lh=n(le,` keyword name of each vocabulary file required by the model, the
low-level being the `),oa=a(le,"CODE",{});var bk=s(oa);Dh=n(bk,"short-cut-names"),bk.forEach(t),Ch=n(le," of the pretrained models with, as associated values, the "),na=a(le,"CODE",{});var vk=s(na);Nh=n(vk,"url"),vk.forEach(t),Ah=n(le,` to the
associated pretrained vocabulary file.`),le.forEach(t),Sh=c(X),oe=a(X,"LI",{});var Me=s(oe);ra=a(Me,"STRONG",{});var Tk=s(ra);Bh=n(Tk,"max_model_input_sizes"),Tk.forEach(t),Wh=n(Me," ("),aa=a(Me,"CODE",{});var yk=s(aa);Oh=n(yk,"Dict[str, Optional[int]]"),yk.forEach(t),Uh=n(Me,") \u2014 A dictionary with, as keys, the "),sa=a(Me,"CODE",{});var wk=s(sa);Rh=n(wk,"short-cut-names"),wk.forEach(t),Mh=n(Me,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),ia=a(Me,"CODE",{});var zk=s(ia);Vh=n(zk,"None"),zk.forEach(t),Gh=n(Me," if the model has no maximum input size."),Me.forEach(t),jh=c(X),V=a(X,"LI",{});var he=s(V);da=a(he,"STRONG",{});var xk=s(da);Hh=n(xk,"pretrained_init_configuration"),xk.forEach(t),Zh=n(he," ("),ca=a(he,"CODE",{});var Ek=s(ca);Jh=n(Ek,"Dict[str, Dict[str, Any]]"),Ek.forEach(t),Xh=n(he,`) \u2014 A dictionary with, as keys, the
`),la=a(he,"CODE",{});var $k=s(la);Yh=n($k,"short-cut-names"),$k.forEach(t),Qh=n(he,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ha=a(he,"CODE",{});var Pk=s(ha);Kh=n(Pk,"__init__"),Pk.forEach(t),ep=n(he,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Xo=a(he,"A",{href:!0});var qk=s(Xo);tp=n(qk,"from_pretrained()"),qk.forEach(t),op=n(he," method."),he.forEach(t),np=c(X),rt=a(X,"LI",{});var Us=s(rt);pa=a(Us,"STRONG",{});var Ik=s(pa);rp=n(Ik,"model_input_names"),Ik.forEach(t),ap=n(Us," ("),ma=a(Us,"CODE",{});var Fk=s(ma);sp=n(Fk,"List[str]"),Fk.forEach(t),ip=n(Us,") \u2014 A list of inputs expected in the forward pass of the model."),Us.forEach(t),dp=c(X),ne=a(X,"LI",{});var Ve=s(ne);fa=a(Ve,"STRONG",{});var Lk=s(fa);cp=n(Lk,"padding_side"),Lk.forEach(t),lp=n(Ve," ("),ua=a(Ve,"CODE",{});var Dk=s(ua);hp=n(Dk,"str"),Dk.forEach(t),pp=n(Ve,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),_a=a(Ve,"CODE",{});var Ck=s(_a);mp=n(Ck,"'right'"),Ck.forEach(t),fp=n(Ve," or "),ga=a(Ve,"CODE",{});var Nk=s(ga);up=n(Nk,"'left'"),Nk.forEach(t),_p=n(Ve,"."),Ve.forEach(t),gp=c(X),re=a(X,"LI",{});var Ge=s(re);ka=a(Ge,"STRONG",{});var Ak=s(ka);kp=n(Ak,"truncation_side"),Ak.forEach(t),bp=n(Ge," ("),ba=a(Ge,"CODE",{});var Sk=s(ba);vp=n(Sk,"str"),Sk.forEach(t),Tp=n(Ge,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),va=a(Ge,"CODE",{});var Bk=s(va);yp=n(Bk,"'right'"),Bk.forEach(t),wp=n(Ge," or "),Ta=a(Ge,"CODE",{});var Wk=s(Ta);zp=n(Wk,"'left'"),Wk.forEach(t),xp=n(Ge,"."),Ge.forEach(t),X.forEach(t),Ep=c(x),at=a(x,"DIV",{class:!0});var _i=s(at);p(Vt.$$.fragment,_i),$p=c(_i),ya=a(_i,"P",{});var Ok=s(ya);Pp=n(Ok,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Ok.forEach(t),_i.forEach(t),qp=c(x),st=a(x,"DIV",{class:!0});var gi=s(st);p(Gt.$$.fragment,gi),Ip=c(gi),wa=a(gi,"P",{});var Uk=s(wa);Fp=n(Uk,"Convert a list of lists of token ids into a list of strings by calling decode."),Uk.forEach(t),gi.forEach(t),Lp=c(x),ye=a(x,"DIV",{class:!0});var Fn=s(ye);p(jt.$$.fragment,Fn),Dp=c(Fn),za=a(Fn,"P",{});var Rk=s(za);Cp=n(Rk,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Rk.forEach(t),Np=c(Fn),Ht=a(Fn,"P",{});var ki=s(Ht);Ap=n(ki,"Similar to doing "),xa=a(ki,"CODE",{});var Mk=s(xa);Sp=n(Mk,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Mk.forEach(t),Bp=n(ki,"."),ki.forEach(t),Fn.forEach(t),Wp=c(x),we=a(x,"DIV",{class:!0});var Ln=s(we);p(Zt.$$.fragment,Ln),Op=c(Ln),Ea=a(Ln,"P",{});var Vk=s(Ea);Up=n(Vk,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Vk.forEach(t),Rp=c(Ln),Jt=a(Ln,"P",{});var bi=s(Jt);Mp=n(bi,"Same as doing "),$a=a(bi,"CODE",{});var Gk=s($a);Vp=n(Gk,"self.convert_tokens_to_ids(self.tokenize(text))"),Gk.forEach(t),Gp=n(bi,"."),bi.forEach(t),Ln.forEach(t),jp=c(x),ze=a(x,"DIV",{class:!0});var Dn=s(ze);p(Xt.$$.fragment,Dn),Hp=c(Dn),Yt=a(Dn,"P",{});var vi=s(Yt);Zp=n(vi,`Upload the tokenizer files to the \u{1F917} Model Hub while synchronizing a local clone of the repo in
`),Pa=a(vi,"CODE",{});var jk=s(Pa);Jp=n(jk,"repo_path_or_name"),jk.forEach(t),Xp=n(vi,"."),vi.forEach(t),Yp=c(Dn),p(it.$$.fragment,Dn),Dn.forEach(t),Qp=c(x),dt=a(x,"DIV",{class:!0});var Ti=s(dt);p(Qt.$$.fragment,Ti),Kp=c(Ti),qa=a(Ti,"P",{});var Hk=s(qa);em=n(Hk,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Hk.forEach(t),Ti.forEach(t),tm=c(x),ct=a(x,"DIV",{class:!0});var yi=s(ct);p(Kt.$$.fragment,yi),om=c(yi),Ia=a(yi,"P",{});var Zk=s(Ia);nm=n(Zk,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Zk.forEach(t),yi.forEach(t),rm=c(x),lt=a(x,"DIV",{class:!0});var wi=s(lt);p(eo.$$.fragment,wi),am=c(wi),Fa=a(wi,"P",{});var Jk=s(Fa);sm=n(Jk,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Jk.forEach(t),wi.forEach(t),im=c(x),xe=a(x,"DIV",{class:!0});var Cn=s(xe);p(to.$$.fragment,Cn),dm=c(Cn),La=a(Cn,"P",{});var Xk=s(La);cm=n(Xk,"Returns the number of added tokens when encoding a sequence with special tokens."),Xk.forEach(t),lm=c(Cn),p(ht.$$.fragment,Cn),Cn.forEach(t),hm=c(x),Ee=a(x,"DIV",{class:!0});var Nn=s(Ee);p(oo.$$.fragment,Nn),pm=c(Nn),Da=a(Nn,"P",{});var Yk=s(Da);mm=n(Yk,`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),Yk.forEach(t),fm=c(Nn),Ca=a(Nn,"P",{});var Qk=s(Ca);um=n(Qk,`The provided tokenizer has no padding / truncation strategy before the managed section. If your tokenizer set a
padding / truncation strategy before, then it will be reset to no padding / truncation when exiting the managed
section.`),Qk.forEach(t),Nn.forEach(t),_m=c(x),pt=a(x,"DIV",{class:!0});var zi=s(pt);p(no.$$.fragment,zi),gm=c(zi),Na=a(zi,"P",{});var Kk=s(Na);km=n(Kk,`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Kk.forEach(t),zi.forEach(t),x.forEach(t),Ks=c(i),Se=a(i,"H2",{class:!0});var xi=s(Se);mt=a(xi,"A",{id:!0,class:!0,href:!0});var eb=s(mt);Aa=a(eb,"SPAN",{});var tb=s(Aa);p(ro.$$.fragment,tb),tb.forEach(t),eb.forEach(t),bm=c(xi),Sa=a(xi,"SPAN",{});var ob=s(Sa);vm=n(ob,"BatchEncoding"),ob.forEach(t),xi.forEach(t),ei=c(i),w=a(i,"DIV",{class:!0});var P=s(w);p(ao.$$.fragment,P),Tm=c(P),ie=a(P,"P",{});var vt=s(ie);ym=n(vt,"Holds the output of the "),so=a(vt,"A",{href:!0});var g_=s(so);Ba=a(g_,"STRONG",{});var nb=s(Ba);wm=n(nb,"call"),nb.forEach(t),zm=n(g_,"()"),g_.forEach(t),xm=n(vt,`,
`),Yo=a(vt,"A",{href:!0});var rb=s(Yo);Em=n(rb,"encode_plus()"),rb.forEach(t),$m=n(vt,` and
`),Qo=a(vt,"A",{href:!0});var ab=s(Qo);Pm=n(ab,"batch_encode_plus()"),ab.forEach(t),qm=n(vt," methods (tokens, attention_masks, etc)."),vt.forEach(t),Im=c(P),Wa=a(P,"P",{});var sb=s(Wa);Fm=n(sb,`This class is derived from a python dictionary and can be used as a dictionary. In addition, this class exposes
utility methods to map from word/character space to token space.`),sb.forEach(t),Lm=c(P),G=a(P,"DIV",{class:!0});var qe=s(G);p(io.$$.fragment,qe),Dm=c(qe),Oa=a(qe,"P",{});var ib=s(Oa);Cm=n(ib,`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),ib.forEach(t),Nm=c(qe),Ua=a(qe,"P",{});var db=s(Ua);Am=n(db,"Can be called as:"),db.forEach(t),Sm=c(qe),co=a(qe,"UL",{});var Ei=s(co);Ko=a(Ei,"LI",{});var k_=s(Ko);Ra=a(k_,"CODE",{});var cb=s(Ra);Bm=n(cb,"self.char_to_token(char_index)"),cb.forEach(t),Wm=n(k_," if batch size is 1"),k_.forEach(t),Om=c(Ei),en=a(Ei,"LI",{});var b_=s(en);Ma=a(b_,"CODE",{});var lb=s(Ma);Um=n(lb,"self.char_to_token(batch_index, char_index)"),lb.forEach(t),Rm=n(b_," if batch size is greater or equal to 1"),b_.forEach(t),Ei.forEach(t),Mm=c(qe),Va=a(qe,"P",{});var hb=s(Va);Vm=n(hb,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),hb.forEach(t),qe.forEach(t),Gm=c(P),j=a(P,"DIV",{class:!0});var Ie=s(j);p(lo.$$.fragment,Ie),jm=c(Ie),Ga=a(Ie,"P",{});var pb=s(Ga);Hm=n(pb,`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),pb.forEach(t),Zm=c(Ie),ja=a(Ie,"P",{});var mb=s(ja);Jm=n(mb,"Can be called as:"),mb.forEach(t),Xm=c(Ie),ho=a(Ie,"UL",{});var $i=s(ho);tn=a($i,"LI",{});var v_=s(tn);Ha=a(v_,"CODE",{});var fb=s(Ha);Ym=n(fb,"self.char_to_word(char_index)"),fb.forEach(t),Qm=n(v_," if batch size is 1"),v_.forEach(t),Km=c($i),on=a($i,"LI",{});var T_=s(on);Za=a(T_,"CODE",{});var ub=s(Za);ef=n(ub,"self.char_to_word(batch_index, char_index)"),ub.forEach(t),tf=n(T_," if batch size is greater than 1"),T_.forEach(t),$i.forEach(t),of=c(Ie),Ja=a(Ie,"P",{});var _b=s(Ja);nf=n(_b,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),_b.forEach(t),Ie.forEach(t),rf=c(P),ft=a(P,"DIV",{class:!0});var Pi=s(ft);p(po.$$.fragment,Pi),af=c(Pi),Xa=a(Pi,"P",{});var gb=s(Xa);sf=n(gb,"Convert the inner content to tensors."),gb.forEach(t),Pi.forEach(t),df=c(P),$e=a(P,"DIV",{class:!0});var An=s($e);p(mo.$$.fragment,An),cf=c(An),Ya=a(An,"P",{});var kb=s(Ya);lf=n(kb,"Return a list mapping the tokens to the id of their original sentences:"),kb.forEach(t),hf=c(An),Be=a(An,"UL",{});var Sn=s(Be);nn=a(Sn,"LI",{});var y_=s(nn);Qa=a(y_,"CODE",{});var bb=s(Qa);pf=n(bb,"None"),bb.forEach(t),mf=n(y_," for special tokens added around or between sequences,"),y_.forEach(t),ff=c(Sn),rn=a(Sn,"LI",{});var w_=s(rn);Ka=a(w_,"CODE",{});var vb=s(Ka);uf=n(vb,"0"),vb.forEach(t),_f=n(w_," for tokens corresponding to words in the first sequence,"),w_.forEach(t),gf=c(Sn),an=a(Sn,"LI",{});var z_=s(an);es=a(z_,"CODE",{});var Tb=s(es);kf=n(Tb,"1"),Tb.forEach(t),bf=n(z_,` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),z_.forEach(t),Sn.forEach(t),An.forEach(t),vf=c(P),ut=a(P,"DIV",{class:!0});var qi=s(ut);p(fo.$$.fragment,qi),Tf=c(qi),uo=a(qi,"P",{});var Ii=s(uo);yf=n(Ii,"Send all values to device by calling "),ts=a(Ii,"CODE",{});var yb=s(ts);wf=n(yb,"v.to(device)"),yb.forEach(t),zf=n(Ii," (PyTorch only)."),Ii.forEach(t),qi.forEach(t),xf=c(P),S=a(P,"DIV",{class:!0});var ae=s(S);p(_o.$$.fragment,ae),Ef=c(ae),os=a(ae,"P",{});var wb=s(os);$f=n(wb,"Get the character span corresponding to an encoded token in a sequence of the batch."),wb.forEach(t),Pf=c(ae),go=a(ae,"P",{});var Fi=s(go);qf=n(Fi,"Character spans are returned as a "),sn=a(Fi,"A",{href:!0});var zb=s(sn);If=n(zb,"CharSpan"),zb.forEach(t),Ff=n(Fi," with:"),Fi.forEach(t),Lf=c(ae),ko=a(ae,"UL",{});var Li=s(ko);dn=a(Li,"LI",{});var x_=s(dn);ns=a(x_,"STRONG",{});var xb=s(ns);Df=n(xb,"start"),xb.forEach(t),Cf=n(x_," \u2014 Index of the first character in the original string associated to the token."),x_.forEach(t),Nf=c(Li),cn=a(Li,"LI",{});var E_=s(cn);rs=a(E_,"STRONG",{});var Eb=s(rs);Af=n(Eb,"end"),Eb.forEach(t),Sf=n(E_,` \u2014 Index of the character following the last character in the original string associated to the
token.`),E_.forEach(t),Li.forEach(t),Bf=c(ae),as=a(ae,"P",{});var $b=s(as);Wf=n($b,"Can be called as:"),$b.forEach(t),Of=c(ae),bo=a(ae,"UL",{});var Di=s(bo);ln=a(Di,"LI",{});var $_=s(ln);ss=a($_,"CODE",{});var Pb=s(ss);Uf=n(Pb,"self.token_to_chars(token_index)"),Pb.forEach(t),Rf=n($_," if batch size is 1"),$_.forEach(t),Mf=c(Di),hn=a(Di,"LI",{});var P_=s(hn);is=a(P_,"CODE",{});var qb=s(is);Vf=n(qb,"self.token_to_chars(batch_index, token_index)"),qb.forEach(t),Gf=n(P_," if batch size is greater or equal to 1"),P_.forEach(t),Di.forEach(t),ae.forEach(t),jf=c(P),H=a(P,"DIV",{class:!0});var Fe=s(H);p(vo.$$.fragment,Fe),Hf=c(Fe),We=a(Fe,"P",{});var Bn=s(We);Zf=n(Bn,"Get the index of the sequence represented by the given token. In the general use case, this method returns "),ds=a(Bn,"CODE",{});var Ib=s(ds);Jf=n(Ib,"0"),Ib.forEach(t),Xf=n(Bn,`
for a single sequence or the first sequence of a pair, and `),cs=a(Bn,"CODE",{});var Fb=s(cs);Yf=n(Fb,"1"),Fb.forEach(t),Qf=n(Bn," for the second sequence of a pair"),Bn.forEach(t),Kf=c(Fe),ls=a(Fe,"P",{});var Lb=s(ls);eu=n(Lb,"Can be called as:"),Lb.forEach(t),tu=c(Fe),To=a(Fe,"UL",{});var Ci=s(To);pn=a(Ci,"LI",{});var q_=s(pn);hs=a(q_,"CODE",{});var Db=s(hs);ou=n(Db,"self.token_to_sequence(token_index)"),Db.forEach(t),nu=n(q_," if batch size is 1"),q_.forEach(t),ru=c(Ci),mn=a(Ci,"LI",{});var I_=s(mn);ps=a(I_,"CODE",{});var Cb=s(ps);au=n(Cb,"self.token_to_sequence(batch_index, token_index)"),Cb.forEach(t),su=n(I_," if batch size is greater than 1"),I_.forEach(t),Ci.forEach(t),iu=c(Fe),ms=a(Fe,"P",{});var Nb=s(ms);du=n(Nb,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),Nb.forEach(t),Fe.forEach(t),cu=c(P),Z=a(P,"DIV",{class:!0});var Le=s(Z);p(yo.$$.fragment,Le),lu=c(Le),fs=a(Le,"P",{});var Ab=s(fs);hu=n(Ab,"Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),Ab.forEach(t),pu=c(Le),us=a(Le,"P",{});var Sb=s(us);mu=n(Sb,"Can be called as:"),Sb.forEach(t),fu=c(Le),wo=a(Le,"UL",{});var Ni=s(wo);fn=a(Ni,"LI",{});var F_=s(fn);_s=a(F_,"CODE",{});var Bb=s(_s);uu=n(Bb,"self.token_to_word(token_index)"),Bb.forEach(t),_u=n(F_," if batch size is 1"),F_.forEach(t),gu=c(Ni),un=a(Ni,"LI",{});var L_=s(un);gs=a(L_,"CODE",{});var Wb=s(gs);ku=n(Wb,"self.token_to_word(batch_index, token_index)"),Wb.forEach(t),bu=n(L_," if batch size is greater than 1"),L_.forEach(t),Ni.forEach(t),vu=c(Le),ks=a(Le,"P",{});var Ob=s(ks);Tu=n(Ob,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e.,
words are defined by the user). In this case it allows to easily associate encoded tokens with provided
tokenized words.`),Ob.forEach(t),Le.forEach(t),yu=c(P),_t=a(P,"DIV",{class:!0});var Ai=s(_t);p(zo.$$.fragment,Ai),wu=c(Ai),bs=a(Ai,"P",{});var Ub=s(bs);zu=n(Ub,`Return the list of tokens (sub-parts of the input strings after word/subword splitting and before conversion to
integer indices) at a given batch index (only works for the output of a fast tokenizer).`),Ub.forEach(t),Ai.forEach(t),xu=c(P),gt=a(P,"DIV",{class:!0});var Si=s(gt);p(xo.$$.fragment,Si),Eu=c(Si),vs=a(Si,"P",{});var Rb=s(vs);$u=n(Rb,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Rb.forEach(t),Si.forEach(t),Pu=c(P),B=a(P,"DIV",{class:!0});var se=s(B);p(Eo.$$.fragment,se),qu=c(se),Ts=a(se,"P",{});var Mb=s(Ts);Iu=n(Mb,"Get the character span in the original string corresponding to given word in a sequence of the batch."),Mb.forEach(t),Fu=c(se),ys=a(se,"P",{});var Vb=s(ys);Lu=n(Vb,"Character spans are returned as a CharSpan NamedTuple with:"),Vb.forEach(t),Du=c(se),$o=a(se,"UL",{});var Bi=s($o);ws=a(Bi,"LI",{});var Gb=s(ws);Cu=n(Gb,"start: index of the first character in the original string"),Gb.forEach(t),Nu=c(Bi),zs=a(Bi,"LI",{});var jb=s(zs);Au=n(jb,"end: index of the character following the last character in the original string"),jb.forEach(t),Bi.forEach(t),Su=c(se),xs=a(se,"P",{});var Hb=s(xs);Bu=n(Hb,"Can be called as:"),Hb.forEach(t),Wu=c(se),Po=a(se,"UL",{});var Wi=s(Po);_n=a(Wi,"LI",{});var D_=s(_n);Es=a(D_,"CODE",{});var Zb=s(Es);Ou=n(Zb,"self.word_to_chars(word_index)"),Zb.forEach(t),Uu=n(D_," if batch size is 1"),D_.forEach(t),Ru=c(Wi),gn=a(Wi,"LI",{});var C_=s(gn);$s=a(C_,"CODE",{});var Jb=s($s);Mu=n(Jb,"self.word_to_chars(batch_index, word_index)"),Jb.forEach(t),Vu=n(C_," if batch size is greater or equal to 1"),C_.forEach(t),Wi.forEach(t),se.forEach(t),Gu=c(P),L=a(P,"DIV",{class:!0});var Y=s(L);p(qo.$$.fragment,Y),ju=c(Y),Ps=a(Y,"P",{});var Xb=s(Ps);Hu=n(Xb,"Get the encoded token span corresponding to a word in a sequence of the batch."),Xb.forEach(t),Zu=c(Y),Io=a(Y,"P",{});var Oi=s(Io);Ju=n(Oi,"Token spans are returned as a "),kn=a(Oi,"A",{href:!0});var Yb=s(kn);Xu=n(Yb,"TokenSpan"),Yb.forEach(t),Yu=n(Oi," with:"),Oi.forEach(t),Qu=c(Y),Fo=a(Y,"UL",{});var Ui=s(Fo);bn=a(Ui,"LI",{});var N_=s(bn);qs=a(N_,"STRONG",{});var Qb=s(qs);Ku=n(Qb,"start"),Qb.forEach(t),e_=n(N_," \u2014 Index of the first token."),N_.forEach(t),t_=c(Ui),vn=a(Ui,"LI",{});var A_=s(vn);Is=a(A_,"STRONG",{});var Kb=s(Is);o_=n(Kb,"end"),Kb.forEach(t),n_=n(A_," \u2014 Index of the token following the last token."),A_.forEach(t),Ui.forEach(t),r_=c(Y),Fs=a(Y,"P",{});var ev=s(Fs);a_=n(ev,"Can be called as:"),ev.forEach(t),s_=c(Y),Lo=a(Y,"UL",{});var Ri=s(Lo);Tn=a(Ri,"LI",{});var S_=s(Tn);Ls=a(S_,"CODE",{});var tv=s(Ls);i_=n(tv,"self.word_to_tokens(word_index, sequence_index: int = 0)"),tv.forEach(t),d_=n(S_," if batch size is 1"),S_.forEach(t),c_=c(Ri),yn=a(Ri,"LI",{});var B_=s(yn);Ds=a(B_,"CODE",{});var ov=s(Ds);l_=n(ov,"self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),ov.forEach(t),h_=n(B_,` if batch size is greater or equal to
1`),B_.forEach(t),Ri.forEach(t),p_=c(Y),Cs=a(Y,"P",{});var nv=s(Cs);m_=n(nv,`This method is particularly suited when the input sequences are provided as pre-tokenized sequences (i.e. words
are defined by the user). In this case it allows to easily associate encoded tokens with provided tokenized
words.`),nv.forEach(t),Y.forEach(t),f_=c(P),kt=a(P,"DIV",{class:!0});var Mi=s(kt);p(Do.$$.fragment,Mi),u_=c(Mi),Ns=a(Mi,"P",{});var rv=s(Ns);__=n(rv,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),rv.forEach(t),Mi.forEach(t),P.forEach(t),this.h()},h(){l(y,"name","hf:doc:metadata"),l(y,"content",JSON.stringify(bv)),l(E,"id","tokenizer"),l(E,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(E,"href","#tokenizer"),l(q,"class","relative group"),l(Tt,"href","https://github.com/huggingface/tokenizers"),l(Tt,"rel","nofollow"),l(So,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Bo,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Wo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Oo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.SpecialTokensMixin"),l(Uo,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Ro,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Mo,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.BatchEncoding"),l(Vo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(yt,"href","https://github.com/huggingface/tokenizers"),l(yt,"rel","nofollow"),l(Ze,"id","transformers.PreTrainedTokenizer"),l(Ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ze,"href","#transformers.PreTrainedTokenizer"),l(Ce,"class","relative group"),l(Go,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(jo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained"),l(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(nt,"id","transformers.PreTrainedTokenizerFast"),l(nt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(nt,"href","#transformers.PreTrainedTokenizerFast"),l(Ae,"class","relative group"),l(Ho,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Ut,"href","https://huggingface.co/docs/tokenizers"),l(Ut,"rel","nofollow"),l(Zo,"href","../fast_tokenizers"),l(Jo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Xo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained"),l(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(mt,"id","transformers.BatchEncoding"),l(mt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(mt,"href","#transformers.BatchEncoding"),l(Se,"class","relative group"),l(so,"href","/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__"),l(Yo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode_plus"),l(Qo,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_encode_plus"),l(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(sn,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.CharSpan"),l(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(kn,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.TokenSpan"),l(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,b){e(document.head,y),$(i,F,b),$(i,q,b),e(q,E),e(E,W),m(v,W,null),e(q,D),e(q,Wn),e(Wn,Gi),$(i,Rs,b),$(i,je,b),e(je,ji),e(je,Tt),e(Tt,Hi),e(je,Zi),$(i,Ms,b),$(i,He,b),e(He,On),e(On,Ji),e(He,Xi),e(He,Un),e(Un,Yi),$(i,Vs,b),$(i,O,b),e(O,Qi),e(O,So),e(So,Ki),e(O,ed),e(O,Bo),e(Bo,td),e(O,od),e(O,Wo),e(Wo,nd),e(O,rd),e(O,Oo),e(Oo,ad),e(O,sd),$(i,Gs,b),$(i,De,b),e(De,Uo),e(Uo,id),e(De,dd),e(De,Ro),e(Ro,cd),e(De,ld),$(i,js,b),$(i,me,b),e(me,Rn),e(Rn,hd),e(me,pd),e(me,Mn),e(Mn,md),e(me,fd),e(me,Vn),e(Vn,ud),$(i,Hs,b),$(i,I,b),e(I,Mo),e(Mo,_d),e(I,gd),e(I,Vo),e(Vo,kd),e(I,bd),e(I,Gn),e(Gn,vd),e(I,Td),e(I,jn),e(jn,yd),e(I,wd),e(I,Hn),e(Hn,zd),e(I,xd),e(I,Zn),e(Zn,Ed),e(I,$d),e(I,Jn),e(Jn,Pd),e(I,qd),e(I,yt),e(yt,Id),e(I,Fd),$(i,Zs,b),$(i,Ce,b),e(Ce,Ze),e(Ze,Xn),m(wt,Xn,null),e(Ce,Ld),e(Ce,Yn),e(Yn,Dd),$(i,Js,b),$(i,g,b),m(zt,g,null),e(g,Cd),e(g,Qn),e(Qn,Nd),e(g,Ad),e(g,xt),e(xt,Sd),e(xt,Go),e(Go,Bd),e(xt,Wd),e(g,Od),e(g,Kn),e(Kn,Ud),e(g,Rd),e(g,er),e(er,Md),e(g,Vd),e(g,tr),e(tr,Gd),e(g,jd),e(g,C),e(C,fe),e(fe,or),e(or,Hd),e(fe,Zd),e(fe,nr),e(nr,Jd),e(fe,Xd),e(fe,rr),e(rr,Yd),e(fe,Qd),e(C,Kd),e(C,U),e(U,ar),e(ar,ec),e(U,tc),e(U,sr),e(sr,oc),e(U,nc),e(U,ir),e(ir,rc),e(U,ac),e(U,dr),e(dr,sc),e(U,ic),e(U,cr),e(cr,dc),e(U,cc),e(C,lc),e(C,Q),e(Q,lr),e(lr,hc),e(Q,pc),e(Q,hr),e(hr,mc),e(Q,fc),e(Q,pr),e(pr,uc),e(Q,_c),e(Q,mr),e(mr,gc),e(Q,kc),e(C,bc),e(C,R),e(R,fr),e(fr,vc),e(R,Tc),e(R,ur),e(ur,yc),e(R,wc),e(R,_r),e(_r,zc),e(R,xc),e(R,gr),e(gr,Ec),e(R,$c),e(R,jo),e(jo,Pc),e(R,qc),e(C,Ic),e(C,Je),e(Je,kr),e(kr,Fc),e(Je,Lc),e(Je,br),e(br,Dc),e(Je,Cc),e(C,Nc),e(C,K),e(K,vr),e(vr,Ac),e(K,Sc),e(K,Tr),e(Tr,Bc),e(K,Wc),e(K,yr),e(yr,Oc),e(K,Uc),e(K,wr),e(wr,Rc),e(K,Mc),e(C,Vc),e(C,ee),e(ee,zr),e(zr,Gc),e(ee,jc),e(ee,xr),e(xr,Hc),e(ee,Zc),e(ee,Er),e(Er,Jc),e(ee,Xc),e(ee,$r),e($r,Yc),e(ee,Qc),e(g,Kc),e(g,Xe),m(Et,Xe,null),e(Xe,el),e(Xe,Pr),e(Pr,tl),e(g,ol),e(g,Ye),m($t,Ye,null),e(Ye,nl),e(Ye,qr),e(qr,rl),e(g,al),e(g,ue),m(Pt,ue,null),e(ue,sl),e(ue,Ir),e(Ir,il),e(ue,dl),e(ue,qt),e(qt,cl),e(qt,Fr),e(Fr,ll),e(qt,hl),e(g,pl),e(g,_e),m(It,_e,null),e(_e,ml),e(_e,Lr),e(Lr,fl),e(_e,ul),e(_e,Ft),e(Ft,_l),e(Ft,Dr),e(Dr,gl),e(Ft,kl),e(g,bl),e(g,ge),m(Lt,ge,null),e(ge,vl),e(ge,Dt),e(Dt,Tl),e(Dt,Cr),e(Cr,yl),e(Dt,wl),e(ge,zl),m(Qe,ge,null),e(g,xl),e(g,Ke),m(Ct,Ke,null),e(Ke,El),e(Ke,Nr),e(Nr,$l),e(g,Pl),e(g,et),m(Nt,et,null),e(et,ql),e(et,Ar),e(Ar,Il),e(g,Fl),e(g,tt),m(At,tt,null),e(tt,Ll),e(tt,Sr),e(Sr,Dl),e(g,Cl),e(g,ke),m(St,ke,null),e(ke,Nl),e(ke,Br),e(Br,Al),e(ke,Sl),m(ot,ke,null),e(g,Bl),e(g,be),m(Bt,be,null),e(be,Wl),e(be,Wr),e(Wr,Ol),e(be,Ul),e(be,Ne),e(Ne,Rl),e(Ne,Or),e(Or,Ml),e(Ne,Vl),e(Ne,Ur),e(Ur,Gl),e(Ne,jl),e(g,Hl),e(g,ve),m(Wt,ve,null),e(ve,Zl),e(ve,Rr),e(Rr,Jl),e(ve,Xl),e(ve,Mr),e(Mr,Yl),$(i,Xs,b),$(i,Ae,b),e(Ae,nt),e(nt,Vr),m(Ot,Vr,null),e(Ae,Ql),e(Ae,Gr),e(Gr,Kl),$(i,Ys,b),$(i,te,b),e(te,eh),e(te,Ho),e(Ho,th),e(te,oh),e(te,Ut),e(Ut,nh),e(te,rh),e(te,Zo),e(Zo,ah),e(te,sh),$(i,Qs,b),$(i,k,b),m(Rt,k,null),e(k,ih),e(k,jr),e(jr,dh),e(k,ch),e(k,Mt),e(Mt,lh),e(Mt,Jo),e(Jo,hh),e(Mt,ph),e(k,mh),e(k,Hr),e(Hr,fh),e(k,uh),e(k,Zr),e(Zr,_h),e(k,gh),e(k,Jr),e(Jr,kh),e(k,bh),e(k,N),e(N,Te),e(Te,Xr),e(Xr,vh),e(Te,Th),e(Te,Yr),e(Yr,yh),e(Te,wh),e(Te,Qr),e(Qr,zh),e(Te,xh),e(N,Eh),e(N,M),e(M,Kr),e(Kr,$h),e(M,Ph),e(M,ea),e(ea,qh),e(M,Ih),e(M,ta),e(ta,Fh),e(M,Lh),e(M,oa),e(oa,Dh),e(M,Ch),e(M,na),e(na,Nh),e(M,Ah),e(N,Sh),e(N,oe),e(oe,ra),e(ra,Bh),e(oe,Wh),e(oe,aa),e(aa,Oh),e(oe,Uh),e(oe,sa),e(sa,Rh),e(oe,Mh),e(oe,ia),e(ia,Vh),e(oe,Gh),e(N,jh),e(N,V),e(V,da),e(da,Hh),e(V,Zh),e(V,ca),e(ca,Jh),e(V,Xh),e(V,la),e(la,Yh),e(V,Qh),e(V,ha),e(ha,Kh),e(V,ep),e(V,Xo),e(Xo,tp),e(V,op),e(N,np),e(N,rt),e(rt,pa),e(pa,rp),e(rt,ap),e(rt,ma),e(ma,sp),e(rt,ip),e(N,dp),e(N,ne),e(ne,fa),e(fa,cp),e(ne,lp),e(ne,ua),e(ua,hp),e(ne,pp),e(ne,_a),e(_a,mp),e(ne,fp),e(ne,ga),e(ga,up),e(ne,_p),e(N,gp),e(N,re),e(re,ka),e(ka,kp),e(re,bp),e(re,ba),e(ba,vp),e(re,Tp),e(re,va),e(va,yp),e(re,wp),e(re,Ta),e(Ta,zp),e(re,xp),e(k,Ep),e(k,at),m(Vt,at,null),e(at,$p),e(at,ya),e(ya,Pp),e(k,qp),e(k,st),m(Gt,st,null),e(st,Ip),e(st,wa),e(wa,Fp),e(k,Lp),e(k,ye),m(jt,ye,null),e(ye,Dp),e(ye,za),e(za,Cp),e(ye,Np),e(ye,Ht),e(Ht,Ap),e(Ht,xa),e(xa,Sp),e(Ht,Bp),e(k,Wp),e(k,we),m(Zt,we,null),e(we,Op),e(we,Ea),e(Ea,Up),e(we,Rp),e(we,Jt),e(Jt,Mp),e(Jt,$a),e($a,Vp),e(Jt,Gp),e(k,jp),e(k,ze),m(Xt,ze,null),e(ze,Hp),e(ze,Yt),e(Yt,Zp),e(Yt,Pa),e(Pa,Jp),e(Yt,Xp),e(ze,Yp),m(it,ze,null),e(k,Qp),e(k,dt),m(Qt,dt,null),e(dt,Kp),e(dt,qa),e(qa,em),e(k,tm),e(k,ct),m(Kt,ct,null),e(ct,om),e(ct,Ia),e(Ia,nm),e(k,rm),e(k,lt),m(eo,lt,null),e(lt,am),e(lt,Fa),e(Fa,sm),e(k,im),e(k,xe),m(to,xe,null),e(xe,dm),e(xe,La),e(La,cm),e(xe,lm),m(ht,xe,null),e(k,hm),e(k,Ee),m(oo,Ee,null),e(Ee,pm),e(Ee,Da),e(Da,mm),e(Ee,fm),e(Ee,Ca),e(Ca,um),e(k,_m),e(k,pt),m(no,pt,null),e(pt,gm),e(pt,Na),e(Na,km),$(i,Ks,b),$(i,Se,b),e(Se,mt),e(mt,Aa),m(ro,Aa,null),e(Se,bm),e(Se,Sa),e(Sa,vm),$(i,ei,b),$(i,w,b),m(ao,w,null),e(w,Tm),e(w,ie),e(ie,ym),e(ie,so),e(so,Ba),e(Ba,wm),e(so,zm),e(ie,xm),e(ie,Yo),e(Yo,Em),e(ie,$m),e(ie,Qo),e(Qo,Pm),e(ie,qm),e(w,Im),e(w,Wa),e(Wa,Fm),e(w,Lm),e(w,G),m(io,G,null),e(G,Dm),e(G,Oa),e(Oa,Cm),e(G,Nm),e(G,Ua),e(Ua,Am),e(G,Sm),e(G,co),e(co,Ko),e(Ko,Ra),e(Ra,Bm),e(Ko,Wm),e(co,Om),e(co,en),e(en,Ma),e(Ma,Um),e(en,Rm),e(G,Mm),e(G,Va),e(Va,Vm),e(w,Gm),e(w,j),m(lo,j,null),e(j,jm),e(j,Ga),e(Ga,Hm),e(j,Zm),e(j,ja),e(ja,Jm),e(j,Xm),e(j,ho),e(ho,tn),e(tn,Ha),e(Ha,Ym),e(tn,Qm),e(ho,Km),e(ho,on),e(on,Za),e(Za,ef),e(on,tf),e(j,of),e(j,Ja),e(Ja,nf),e(w,rf),e(w,ft),m(po,ft,null),e(ft,af),e(ft,Xa),e(Xa,sf),e(w,df),e(w,$e),m(mo,$e,null),e($e,cf),e($e,Ya),e(Ya,lf),e($e,hf),e($e,Be),e(Be,nn),e(nn,Qa),e(Qa,pf),e(nn,mf),e(Be,ff),e(Be,rn),e(rn,Ka),e(Ka,uf),e(rn,_f),e(Be,gf),e(Be,an),e(an,es),e(es,kf),e(an,bf),e(w,vf),e(w,ut),m(fo,ut,null),e(ut,Tf),e(ut,uo),e(uo,yf),e(uo,ts),e(ts,wf),e(uo,zf),e(w,xf),e(w,S),m(_o,S,null),e(S,Ef),e(S,os),e(os,$f),e(S,Pf),e(S,go),e(go,qf),e(go,sn),e(sn,If),e(go,Ff),e(S,Lf),e(S,ko),e(ko,dn),e(dn,ns),e(ns,Df),e(dn,Cf),e(ko,Nf),e(ko,cn),e(cn,rs),e(rs,Af),e(cn,Sf),e(S,Bf),e(S,as),e(as,Wf),e(S,Of),e(S,bo),e(bo,ln),e(ln,ss),e(ss,Uf),e(ln,Rf),e(bo,Mf),e(bo,hn),e(hn,is),e(is,Vf),e(hn,Gf),e(w,jf),e(w,H),m(vo,H,null),e(H,Hf),e(H,We),e(We,Zf),e(We,ds),e(ds,Jf),e(We,Xf),e(We,cs),e(cs,Yf),e(We,Qf),e(H,Kf),e(H,ls),e(ls,eu),e(H,tu),e(H,To),e(To,pn),e(pn,hs),e(hs,ou),e(pn,nu),e(To,ru),e(To,mn),e(mn,ps),e(ps,au),e(mn,su),e(H,iu),e(H,ms),e(ms,du),e(w,cu),e(w,Z),m(yo,Z,null),e(Z,lu),e(Z,fs),e(fs,hu),e(Z,pu),e(Z,us),e(us,mu),e(Z,fu),e(Z,wo),e(wo,fn),e(fn,_s),e(_s,uu),e(fn,_u),e(wo,gu),e(wo,un),e(un,gs),e(gs,ku),e(un,bu),e(Z,vu),e(Z,ks),e(ks,Tu),e(w,yu),e(w,_t),m(zo,_t,null),e(_t,wu),e(_t,bs),e(bs,zu),e(w,xu),e(w,gt),m(xo,gt,null),e(gt,Eu),e(gt,vs),e(vs,$u),e(w,Pu),e(w,B),m(Eo,B,null),e(B,qu),e(B,Ts),e(Ts,Iu),e(B,Fu),e(B,ys),e(ys,Lu),e(B,Du),e(B,$o),e($o,ws),e(ws,Cu),e($o,Nu),e($o,zs),e(zs,Au),e(B,Su),e(B,xs),e(xs,Bu),e(B,Wu),e(B,Po),e(Po,_n),e(_n,Es),e(Es,Ou),e(_n,Uu),e(Po,Ru),e(Po,gn),e(gn,$s),e($s,Mu),e(gn,Vu),e(w,Gu),e(w,L),m(qo,L,null),e(L,ju),e(L,Ps),e(Ps,Hu),e(L,Zu),e(L,Io),e(Io,Ju),e(Io,kn),e(kn,Xu),e(Io,Yu),e(L,Qu),e(L,Fo),e(Fo,bn),e(bn,qs),e(qs,Ku),e(bn,e_),e(Fo,t_),e(Fo,vn),e(vn,Is),e(Is,o_),e(vn,n_),e(L,r_),e(L,Fs),e(Fs,a_),e(L,s_),e(L,Lo),e(Lo,Tn),e(Tn,Ls),e(Ls,i_),e(Tn,d_),e(Lo,c_),e(Lo,yn),e(yn,Ds),e(Ds,l_),e(yn,h_),e(L,p_),e(L,Cs),e(Cs,m_),e(w,f_),e(w,kt),m(Do,kt,null),e(kt,u_),e(kt,Ns),e(Ns,__),ti=!0},p(i,[b]){const Co={};b&2&&(Co.$$scope={dirty:b,ctx:i}),Qe.$set(Co);const As={};b&2&&(As.$$scope={dirty:b,ctx:i}),ot.$set(As);const Ss={};b&2&&(Ss.$$scope={dirty:b,ctx:i}),it.$set(Ss);const Bs={};b&2&&(Bs.$$scope={dirty:b,ctx:i}),ht.$set(Bs)},i(i){ti||(f(v.$$.fragment,i),f(wt.$$.fragment,i),f(zt.$$.fragment,i),f(Et.$$.fragment,i),f($t.$$.fragment,i),f(Pt.$$.fragment,i),f(It.$$.fragment,i),f(Lt.$$.fragment,i),f(Qe.$$.fragment,i),f(Ct.$$.fragment,i),f(Nt.$$.fragment,i),f(At.$$.fragment,i),f(St.$$.fragment,i),f(ot.$$.fragment,i),f(Bt.$$.fragment,i),f(Wt.$$.fragment,i),f(Ot.$$.fragment,i),f(Rt.$$.fragment,i),f(Vt.$$.fragment,i),f(Gt.$$.fragment,i),f(jt.$$.fragment,i),f(Zt.$$.fragment,i),f(Xt.$$.fragment,i),f(it.$$.fragment,i),f(Qt.$$.fragment,i),f(Kt.$$.fragment,i),f(eo.$$.fragment,i),f(to.$$.fragment,i),f(ht.$$.fragment,i),f(oo.$$.fragment,i),f(no.$$.fragment,i),f(ro.$$.fragment,i),f(ao.$$.fragment,i),f(io.$$.fragment,i),f(lo.$$.fragment,i),f(po.$$.fragment,i),f(mo.$$.fragment,i),f(fo.$$.fragment,i),f(_o.$$.fragment,i),f(vo.$$.fragment,i),f(yo.$$.fragment,i),f(zo.$$.fragment,i),f(xo.$$.fragment,i),f(Eo.$$.fragment,i),f(qo.$$.fragment,i),f(Do.$$.fragment,i),ti=!0)},o(i){u(v.$$.fragment,i),u(wt.$$.fragment,i),u(zt.$$.fragment,i),u(Et.$$.fragment,i),u($t.$$.fragment,i),u(Pt.$$.fragment,i),u(It.$$.fragment,i),u(Lt.$$.fragment,i),u(Qe.$$.fragment,i),u(Ct.$$.fragment,i),u(Nt.$$.fragment,i),u(At.$$.fragment,i),u(St.$$.fragment,i),u(ot.$$.fragment,i),u(Bt.$$.fragment,i),u(Wt.$$.fragment,i),u(Ot.$$.fragment,i),u(Rt.$$.fragment,i),u(Vt.$$.fragment,i),u(Gt.$$.fragment,i),u(jt.$$.fragment,i),u(Zt.$$.fragment,i),u(Xt.$$.fragment,i),u(it.$$.fragment,i),u(Qt.$$.fragment,i),u(Kt.$$.fragment,i),u(eo.$$.fragment,i),u(to.$$.fragment,i),u(ht.$$.fragment,i),u(oo.$$.fragment,i),u(no.$$.fragment,i),u(ro.$$.fragment,i),u(ao.$$.fragment,i),u(io.$$.fragment,i),u(lo.$$.fragment,i),u(po.$$.fragment,i),u(mo.$$.fragment,i),u(fo.$$.fragment,i),u(_o.$$.fragment,i),u(vo.$$.fragment,i),u(yo.$$.fragment,i),u(zo.$$.fragment,i),u(xo.$$.fragment,i),u(Eo.$$.fragment,i),u(qo.$$.fragment,i),u(Do.$$.fragment,i),ti=!1},d(i){t(y),i&&t(F),i&&t(q),_(v),i&&t(Rs),i&&t(je),i&&t(Ms),i&&t(He),i&&t(Vs),i&&t(O),i&&t(Gs),i&&t(De),i&&t(js),i&&t(me),i&&t(Hs),i&&t(I),i&&t(Zs),i&&t(Ce),_(wt),i&&t(Js),i&&t(g),_(zt),_(Et),_($t),_(Pt),_(It),_(Lt),_(Qe),_(Ct),_(Nt),_(At),_(St),_(ot),_(Bt),_(Wt),i&&t(Xs),i&&t(Ae),_(Ot),i&&t(Ys),i&&t(te),i&&t(Qs),i&&t(k),_(Rt),_(Vt),_(Gt),_(jt),_(Zt),_(Xt),_(it),_(Qt),_(Kt),_(eo),_(to),_(ht),_(oo),_(no),i&&t(Ks),i&&t(Se),_(ro),i&&t(ei),i&&t(w),_(ao),_(io),_(lo),_(po),_(mo),_(fo),_(_o),_(vo),_(yo),_(zo),_(xo),_(Eo),_(qo),_(Do)}}}const bv={local:"tokenizer",sections:[{local:"transformers.PreTrainedTokenizer",title:"PreTrainedTokenizer"},{local:"transformers.PreTrainedTokenizerFast",title:"PreTrainedTokenizerFast"},{local:"transformers.BatchEncoding",title:"BatchEncoding"}],title:"Tokenizer"};function vv(pe){return mv(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $v extends cv{constructor(y){super();lv(this,y,vv,kv,hv,{})}}export{$v as default,bv as metadata};
