import{S as tv,i as ov,s as nv,e as r,k as d,w as h,t as o,M as rv,c as s,d as t,m as c,a,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 sv,L as Kb}from"../../chunks/vendor-hf-doc-builder.js";import{T as Yb}from"../../chunks/Tip-hf-doc-builder.js";import{D as T}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ev}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Oi}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qb}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function av(pe){let y,F,q,E,S;return E=new ev({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=s(v,"P",{});var D=a(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),S=!0},p:Kb,i(v){S||(f(E.$$.fragment,v),S=!0)},o(v){u(E.$$.fragment,v),S=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function iv(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=s(q,"P",{});var E=a(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 dv(pe){let y,F,q,E,S;return E=new ev({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=s(v,"P",{});var D=a(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),S=!0},p:Kb,i(v){S||(f(E.$$.fragment,v),S=!0)},o(v){u(E.$$.fragment,v),S=!1},d(v){v&&t(y),v&&t(q),_(E,v)}}}function cv(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=s(q,"P",{});var E=a(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 lv(pe){let y,F,q,E,S,v,D,Bn,Ui,Oa,je,Ri,Tt,Mi,Vi,Ua,He,Wn,Gi,ji,Sn,Hi,Ra,O,Zi,Co,Ji,Xi,Ao,Yi,Qi,Bo,Ki,ed,Wo,td,od,Ma,De,So,nd,rd,Oo,sd,ad,Va,me,On,id,dd,Un,cd,ld,Rn,hd,Ga,I,Uo,pd,md,Ro,fd,ud,Mn,_d,gd,Vn,kd,bd,Gn,vd,Td,jn,yd,wd,Hn,zd,xd,yt,Ed,$d,ja,Ne,Ze,Zn,wt,Pd,Jn,qd,Ha,g,zt,Id,Xn,Fd,Ld,xt,Dd,Mo,Nd,Cd,Ad,Yn,Bd,Wd,Qn,Sd,Od,Kn,Ud,Rd,N,fe,er,Md,Vd,tr,Gd,jd,or,Hd,Zd,Jd,U,nr,Xd,Yd,rr,Qd,Kd,sr,ec,tc,ar,oc,nc,ir,rc,sc,ac,Q,dr,ic,dc,cr,cc,lc,lr,hc,pc,hr,mc,fc,uc,R,pr,_c,gc,mr,kc,bc,fr,vc,Tc,ur,yc,wc,Vo,zc,xc,Ec,Je,_r,$c,Pc,gr,qc,Ic,Fc,K,kr,Lc,Dc,br,Nc,Cc,vr,Ac,Bc,Tr,Wc,Sc,Oc,ee,yr,Uc,Rc,wr,Mc,Vc,zr,Gc,jc,xr,Hc,Zc,Jc,Xe,Et,Xc,Er,Yc,Qc,Ye,$t,Kc,$r,el,tl,ue,Pt,ol,Pr,nl,rl,qt,sl,qr,al,il,dl,_e,It,cl,Ir,ll,hl,Ft,pl,Fr,ml,fl,ul,ge,Lt,_l,Lr,gl,kl,Qe,bl,Ke,Dt,vl,Dr,Tl,yl,et,Nt,wl,Nr,zl,xl,tt,Ct,El,Cr,$l,Pl,ke,At,ql,Ar,Il,Fl,ot,Ll,be,Bt,Dl,Br,Nl,Cl,Ce,Al,Wr,Bl,Wl,Sr,Sl,Ol,Ul,ve,Wt,Rl,Or,Ml,Vl,Ur,Gl,Za,Ae,nt,Rr,St,jl,Mr,Hl,Ja,te,Zl,Go,Jl,Xl,Ot,Yl,Ql,jo,Kl,eh,Xa,k,Ut,th,Vr,oh,nh,Rt,rh,Ho,sh,ah,ih,Gr,dh,ch,jr,lh,hh,Hr,ph,mh,C,Te,Zr,fh,uh,Jr,_h,gh,Xr,kh,bh,vh,M,Yr,Th,yh,Qr,wh,zh,Kr,xh,Eh,es,$h,Ph,ts,qh,Ih,Fh,oe,os,Lh,Dh,ns,Nh,Ch,rs,Ah,Bh,ss,Wh,Sh,Oh,V,as,Uh,Rh,is,Mh,Vh,ds,Gh,jh,cs,Hh,Zh,Zo,Jh,Xh,Yh,rt,ls,Qh,Kh,hs,ep,tp,op,ne,ps,np,rp,ms,sp,ap,fs,ip,dp,us,cp,lp,hp,re,_s,pp,mp,gs,fp,up,ks,_p,gp,bs,kp,bp,vp,st,Mt,Tp,vs,yp,wp,at,Vt,zp,Ts,xp,Ep,ye,Gt,$p,ys,Pp,qp,jt,Ip,ws,Fp,Lp,Dp,we,Ht,Np,zs,Cp,Ap,Zt,Bp,xs,Wp,Sp,Op,ze,Jt,Up,Es,Rp,Mp,it,Vp,dt,Xt,Gp,$s,jp,Hp,ct,Yt,Zp,Ps,Jp,Xp,lt,Qt,Yp,qs,Qp,Kp,xe,Kt,em,Is,tm,om,ht,nm,Ee,eo,rm,Fs,sm,am,Ls,im,dm,pt,to,cm,Ds,lm,Ya,Be,mt,Ns,oo,hm,Cs,pm,Qa,w,no,mm,ie,fm,ro,As,um,_m,gm,Jo,km,bm,Xo,vm,Tm,ym,Bs,wm,zm,G,so,xm,Ws,Em,$m,Ss,Pm,qm,ao,Yo,Os,Im,Fm,Lm,Qo,Us,Dm,Nm,Cm,Rs,Am,Bm,j,io,Wm,Ms,Sm,Om,Vs,Um,Rm,co,Ko,Gs,Mm,Vm,Gm,en,js,jm,Hm,Zm,Hs,Jm,Xm,ft,lo,Ym,Zs,Qm,Km,$e,ho,ef,Js,tf,of,We,tn,Xs,nf,rf,sf,on,Ys,af,df,cf,nn,Qs,lf,hf,pf,ut,po,mf,mo,ff,Ks,uf,_f,gf,B,fo,kf,ea,bf,vf,uo,Tf,rn,yf,wf,zf,_o,sn,ta,xf,Ef,$f,an,oa,Pf,qf,If,na,Ff,Lf,go,dn,ra,Df,Nf,Cf,cn,sa,Af,Bf,Wf,H,ko,Sf,Se,Of,aa,Uf,Rf,ia,Mf,Vf,Gf,da,jf,Hf,bo,ln,ca,Zf,Jf,Xf,hn,la,Yf,Qf,Kf,ha,eu,tu,Z,vo,ou,pa,nu,ru,ma,su,au,To,pn,fa,iu,du,cu,mn,ua,lu,hu,pu,_a,mu,fu,_t,yo,uu,ga,_u,gu,gt,wo,ku,ka,bu,vu,W,zo,Tu,ba,yu,wu,va,zu,xu,xo,Ta,Eu,$u,ya,Pu,qu,wa,Iu,Fu,Eo,fn,za,Lu,Du,Nu,un,xa,Cu,Au,Bu,L,$o,Wu,Ea,Su,Ou,Po,Uu,_n,Ru,Mu,Vu,qo,gn,$a,Gu,ju,Hu,kn,Pa,Zu,Ju,Xu,qa,Yu,Qu,Io,bn,Ia,Ku,e_,t_,vn,Fa,o_,n_,r_,La,s_,a_,kt,Fo,i_,Da,d_,Ka;return v=new Oi({}),wt=new Oi({}),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.33.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"},{anchor:"transformers.PreTrainedTokenizer.split_special_tokens",description:`<strong>split_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the special tokens should be split during the tokenization process. The default behavior is
to not split special tokens. This means that if <code>&lt;s&gt;</code> is the <code>bos_token</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;) = [&apos;&lt;s&gt;</code>]. Otherwise, if <code>split_special_tokens=True</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;)</code> will be give <code>[&apos;&lt;&apos;, &apos;s&apos;, &apos;&gt;&apos;]</code>. This argument is only supported for <code>slow</code> tokenizers for the moment.`,name:"split_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.33.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.33.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.33.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.33.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.33.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.33.0/src/transformers/tokenization_utils_base.py#L2528",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/tokenization_utils_base.py#L3486",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.33.0/src/transformers/tokenization_utils_base.py#L3520",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.33.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.33.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.33.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.33.0/src/transformers/tokenization_utils_base.py#L2336",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:"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:"revision",val:": str = None"},{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.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.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"},{anchor:"transformers.PreTrainedTokenizer.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/utils/hub.py#L786"}}),Qe=new Qb({props:{anchor:"transformers.PreTrainedTokenizer.push_to_hub.example",$$slots:{default:[av]},$$scope:{ctx:pe}}}),Dt=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.33.0/src/transformers/tokenization_utils.py#L890",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.33.0/src/transformers/tokenization_utils.py#L567",returnDescription:`
<p>The token id or list of token ids.</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),Ct=new T({props:{name:"get_added_vocab",anchor:"transformers.PreTrainedTokenizer.get_added_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/tokenization_utils.py#L369",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),At=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.33.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 Yb({props:{$$slots:{default:[iv]},$$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.`,name:"is_split_into_words"},{anchor:"transformers.PreTrainedTokenizer.prepare_for_tokenization.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Keyword arguments to use for the tokenization.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/tokenization_utils.py#L828",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.33.0/src/transformers/tokenization_utils.py#L481",returnDescription:`
<p>The list of tokens.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),St=new Oi({}),Ut=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.33.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.split_special_tokens",description:`<strong>split_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the special tokens should be split during the tokenization process. The default behavior is
to not split special tokens. This means that if <code>&lt;s&gt;</code> is the <code>bos_token</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;) = [&apos;&lt;s&gt;</code>]. Otherwise, if <code>split_special_tokens=True</code>, then <code>tokenizer.tokenize(&quot;&lt;s&gt;&quot;)</code> will be give <code>[&apos;&lt;&apos;, &apos;s&apos;, &apos;&gt;&apos;]</code>. This argument is only supported for <code>slow</code> tokenizers for the moment.`,name:"split_special_tokens"},{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.33.0/src/transformers/tokenization_utils_fast.py#L78"}}),Mt=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.33.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.33.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.33.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.33.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.33.0/src/transformers/tokenization_utils_base.py#L2528",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Vt=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.33.0/src/transformers/tokenization_utils_base.py#L3486",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Gt=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.33.0/src/transformers/tokenization_utils_base.py#L3520",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Ht=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.33.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.33.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.33.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.33.0/src/transformers/tokenization_utils_base.py#L2336",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>
`}}),Jt=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:"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:"revision",val:": str = None"},{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.token",description:`<strong>token</strong> (<code>bool</code> or <code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>). Will default to <code>True</code> if <code>repo_url</code>
is not specified.`,name:"token"},{anchor:"transformers.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"},{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Branch to push the uploaded files to.`,name:"revision"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/utils/hub.py#L786"}}),it=new Qb({props:{anchor:"transformers.PreTrainedTokenizerFast.push_to_hub.example",$$slots:{default:[dv]},$$scope:{ctx:pe}}}),Xt=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.33.0/src/transformers/tokenization_utils_fast.py#L317",returnDescription:`
<p>The decoded token(s).</p>
`,returnType:`
<p><code>str</code> or <code>List[str]</code></p>
`}}),Yt=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.33.0/src/transformers/tokenization_utils_fast.py#L262",returnDescription:`
<p>The token id or list of token ids.</p>
`,returnType:`
<p><code>int</code> or <code>List[int]</code></p>
`}}),Qt=new T({props:{name:"get_added_vocab",anchor:"transformers.PreTrainedTokenizerFast.get_added_vocab",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/tokenization_utils_fast.py#L183",returnDescription:`
<p>The added tokens.</p>
`,returnType:`
<p><code>Dict[str, int]</code></p>
`}}),Kt=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.33.0/src/transformers/tokenization_utils_fast.py#L296",returnDescription:`
<p>Number of special tokens added to sequences.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ht=new Yb({props:{$$slots:{default:[cv]},$$scope:{ctx:pe}}}),eo=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.33.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.33.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.33.0/src/transformers/tokenization_utils_fast.py#L346"}}),to=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.`,name:"special_tokens_map"},{anchor:"transformers.PreTrainedTokenizerFast.train_new_from_iterator.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the trainer from the &#x1F917; Tokenizers library.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/tokenization_utils_fast.py#L634",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.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"
>PreTrainedTokenizerFast</a></p>
`}}),oo=new Oi({}),no=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.33.0/src/transformers/tokenization_utils_base.py#L164"}}),so=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.33.0/src/transformers/tokenization_utils_base.py#L543",returnDescription:`
<p>Index of the token.</p>
`,returnType:`
<p><code>int</code></p>
`}}),io=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.33.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>
`}}),lo=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.33.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.33.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.33.0/src/transformers/tokenization_utils_base.py#L668"}}),ho=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.33.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>
`}}),po=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.33.0/src/transformers/tokenization_utils_base.py#L761",returnDescription:`
<p>The same instance after modification.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),fo=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.33.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.33.0/en/internal/tokenization_utils#transformers.CharSpan"
>CharSpan</a></p>
`}}),ko=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.33.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>
`}}),vo=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.33.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>
`}}),yo=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.33.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>
`}}),wo=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.33.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>
`}}),zo=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.33.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>
`}}),$o=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.33.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.33.0/en/internal/tokenization_utils#transformers.TokenSpan"
>TokenSpan</a>, <em>optional</em>)</p>
`}}),Fo=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.33.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"),S=r("span"),h(v.$$.fragment),D=d(),Bn=r("span"),Ui=o("Tokenizer"),Oa=d(),je=r("p"),Ri=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"),Mi=o("\u{1F917} Tokenizers"),Vi=o(". The \u201CFast\u201D implementations allows:"),Ua=d(),He=r("ol"),Wn=r("li"),Gi=o("a significant speed-up in particular when doing batched tokenization and"),ji=d(),Sn=r("li"),Hi=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).`),Ra=d(),O=r("p"),Zi=o("The base classes "),Co=r("a"),Ji=o("PreTrainedTokenizer"),Xi=o(" and "),Ao=r("a"),Yi=o("PreTrainedTokenizerFast"),Qi=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
`),Bo=r("a"),Ki=o("PreTrainedTokenizerBase"),ed=o(` that contains the common methods, and
`),Wo=r("a"),td=o("SpecialTokensMixin"),od=o("."),Ma=d(),De=r("p"),So=r("a"),nd=o("PreTrainedTokenizer"),rd=o(" and "),Oo=r("a"),sd=o("PreTrainedTokenizerFast"),ad=o(` thus implement the main
methods for using all the tokenizers:`),Va=d(),me=r("ul"),On=r("li"),id=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).`),dd=d(),Un=r("li"),cd=o("Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),ld=d(),Rn=r("li"),hd=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.`),Ga=d(),I=r("p"),Uo=r("a"),pd=o("BatchEncoding"),md=o(` holds the output of the
`),Ro=r("a"),fd=o("PreTrainedTokenizerBase"),ud=o("\u2019s encoding methods ("),Mn=r("code"),_d=o("__call__"),gd=o(`,
`),Vn=r("code"),kd=o("encode_plus"),bd=o(" and "),Gn=r("code"),vd=o("batch_encode_plus"),Td=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 (`),jn=r("code"),yd=o("input_ids"),wd=o(", "),Hn=r("code"),zd=o("attention_mask"),xd=o(`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=r("a"),Ed=o("tokenizers library"),$d=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).`),ja=d(),Ne=r("h2"),Ze=r("a"),Zn=r("span"),h(wt.$$.fragment),Pd=d(),Jn=r("span"),qd=o("PreTrainedTokenizer"),Ha=d(),g=r("div"),h(zt.$$.fragment),Id=d(),Xn=r("p"),Fd=o("Base class for all slow tokenizers."),Ld=d(),xt=r("p"),Dd=o("Inherits from "),Mo=r("a"),Nd=o("PreTrainedTokenizerBase"),Cd=o("."),Ad=d(),Yn=r("p"),Bd=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.`),Wd=d(),Qn=r("p"),Sd=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).`),Od=d(),Kn=r("p"),Ud=o("Class attributes (overridden by derived classes)"),Rd=d(),N=r("ul"),fe=r("li"),er=r("strong"),Md=o("vocab_files_names"),Vd=o(" ("),tr=r("code"),Gd=o("Dict[str, str]"),jd=o(") \u2014 A dictionary with, as keys, the "),or=r("code"),Hd=o("__init__"),Zd=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Jd=d(),U=r("li"),nr=r("strong"),Xd=o("pretrained_vocab_files_map"),Yd=o(" ("),rr=r("code"),Qd=o("Dict[str, Dict[str, str]]"),Kd=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),sr=r("code"),ec=o("__init__"),tc=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),ar=r("code"),oc=o("short-cut-names"),nc=o(" of the pretrained models with, as associated values, the "),ir=r("code"),rc=o("url"),sc=o(` to the
associated pretrained vocabulary file.`),ac=d(),Q=r("li"),dr=r("strong"),ic=o("max_model_input_sizes"),dc=o(" ("),cr=r("code"),cc=o("Dict[str, Optional[int]]"),lc=o(") \u2014 A dictionary with, as keys, the "),lr=r("code"),hc=o("short-cut-names"),pc=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),hr=r("code"),mc=o("None"),fc=o(" if the model has no maximum input size."),uc=d(),R=r("li"),pr=r("strong"),_c=o("pretrained_init_configuration"),gc=o(" ("),mr=r("code"),kc=o("Dict[str, Dict[str, Any]]"),bc=o(`) \u2014 A dictionary with, as keys, the
`),fr=r("code"),vc=o("short-cut-names"),Tc=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ur=r("code"),yc=o("__init__"),wc=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Vo=r("a"),zc=o("from_pretrained()"),xc=o(" method."),Ec=d(),Je=r("li"),_r=r("strong"),$c=o("model_input_names"),Pc=o(" ("),gr=r("code"),qc=o("List[str]"),Ic=o(") \u2014 A list of inputs expected in the forward pass of the model."),Fc=d(),K=r("li"),kr=r("strong"),Lc=o("padding_side"),Dc=o(" ("),br=r("code"),Nc=o("str"),Cc=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),vr=r("code"),Ac=o("'right'"),Bc=o(" or "),Tr=r("code"),Wc=o("'left'"),Sc=o("."),Oc=d(),ee=r("li"),yr=r("strong"),Uc=o("truncation_side"),Rc=o(" ("),wr=r("code"),Mc=o("str"),Vc=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),zr=r("code"),Gc=o("'right'"),jc=o(" or "),xr=r("code"),Hc=o("'left'"),Zc=o("."),Jc=d(),Xe=r("div"),h(Et.$$.fragment),Xc=d(),Er=r("p"),Yc=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Qc=d(),Ye=r("div"),h($t.$$.fragment),Kc=d(),$r=r("p"),el=o("Convert a list of lists of token ids into a list of strings by calling decode."),tl=d(),ue=r("div"),h(Pt.$$.fragment),ol=d(),Pr=r("p"),nl=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.`),rl=d(),qt=r("p"),sl=o("Similar to doing "),qr=r("code"),al=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),il=o("."),dl=d(),_e=r("div"),h(It.$$.fragment),cl=d(),Ir=r("p"),ll=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),hl=d(),Ft=r("p"),pl=o("Same as doing "),Fr=r("code"),ml=o("self.convert_tokens_to_ids(self.tokenize(text))"),fl=o("."),ul=d(),ge=r("div"),h(Lt.$$.fragment),_l=d(),Lr=r("p"),gl=o("Upload the tokenizer files to the \u{1F917} Model Hub."),kl=d(),h(Qe.$$.fragment),bl=d(),Ke=r("div"),h(Dt.$$.fragment),vl=d(),Dr=r("p"),Tl=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),yl=d(),et=r("div"),h(Nt.$$.fragment),wl=d(),Nr=r("p"),zl=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),xl=d(),tt=r("div"),h(Ct.$$.fragment),El=d(),Cr=r("p"),$l=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),Pl=d(),ke=r("div"),h(At.$$.fragment),ql=d(),Ar=r("p"),Il=o("Returns the number of added tokens when encoding a sequence with special tokens."),Fl=d(),h(ot.$$.fragment),Ll=d(),be=r("div"),h(Bt.$$.fragment),Dl=d(),Br=r("p"),Nl=o("Performs any necessary transformations before tokenization."),Cl=d(),Ce=r("p"),Al=o("This method should pop the arguments from kwargs and return the remaining "),Wr=r("code"),Bl=o("kwargs"),Wl=o(` as well. We test the
`),Sr=r("code"),Sl=o("kwargs"),Ol=o(" at the end of the encoding process to be sure all the arguments have been used."),Ul=d(),ve=r("div"),h(Wt.$$.fragment),Rl=d(),Or=r("p"),Ml=o("Converts a string in a sequence of tokens, using the tokenizer."),Vl=d(),Ur=r("p"),Gl=o(`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),Za=d(),Ae=r("h2"),nt=r("a"),Rr=r("span"),h(St.$$.fragment),jl=d(),Mr=r("span"),Hl=o("PreTrainedTokenizerFast"),Ja=d(),te=r("p"),Zl=o("The "),Go=r("a"),Jl=o("PreTrainedTokenizerFast"),Xl=o(" depend on the "),Ot=r("a"),Yl=o("tokenizers"),Ql=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 `),jo=r("a"),Kl=o("Using tokenizers from \u{1F917} tokenizers"),eh=o(" page to understand how this is done."),Xa=d(),k=r("div"),h(Ut.$$.fragment),th=d(),Vr=r("p"),oh=o("Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),nh=d(),Rt=r("p"),rh=o("Inherits from "),Ho=r("a"),sh=o("PreTrainedTokenizerBase"),ah=o("."),ih=d(),Gr=r("p"),dh=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.`),ch=d(),jr=r("p"),lh=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).`),hh=d(),Hr=r("p"),ph=o("Class attributes (overridden by derived classes)"),mh=d(),C=r("ul"),Te=r("li"),Zr=r("strong"),fh=o("vocab_files_names"),uh=o(" ("),Jr=r("code"),_h=o("Dict[str, str]"),gh=o(") \u2014 A dictionary with, as keys, the "),Xr=r("code"),kh=o("__init__"),bh=o(` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),vh=d(),M=r("li"),Yr=r("strong"),Th=o("pretrained_vocab_files_map"),yh=o(" ("),Qr=r("code"),wh=o("Dict[str, Dict[str, str]]"),zh=o(`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),Kr=r("code"),xh=o("__init__"),Eh=o(` keyword name of each vocabulary file required by the model, the
low-level being the `),es=r("code"),$h=o("short-cut-names"),Ph=o(" of the pretrained models with, as associated values, the "),ts=r("code"),qh=o("url"),Ih=o(` to the
associated pretrained vocabulary file.`),Fh=d(),oe=r("li"),os=r("strong"),Lh=o("max_model_input_sizes"),Dh=o(" ("),ns=r("code"),Nh=o("Dict[str, Optional[int]]"),Ch=o(") \u2014 A dictionary with, as keys, the "),rs=r("code"),Ah=o("short-cut-names"),Bh=o(`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),ss=r("code"),Wh=o("None"),Sh=o(" if the model has no maximum input size."),Oh=d(),V=r("li"),as=r("strong"),Uh=o("pretrained_init_configuration"),Rh=o(" ("),is=r("code"),Mh=o("Dict[str, Dict[str, Any]]"),Vh=o(`) \u2014 A dictionary with, as keys, the
`),ds=r("code"),Gh=o("short-cut-names"),jh=o(` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),cs=r("code"),Hh=o("__init__"),Zh=o(` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Zo=r("a"),Jh=o("from_pretrained()"),Xh=o(" method."),Yh=d(),rt=r("li"),ls=r("strong"),Qh=o("model_input_names"),Kh=o(" ("),hs=r("code"),ep=o("List[str]"),tp=o(") \u2014 A list of inputs expected in the forward pass of the model."),op=d(),ne=r("li"),ps=r("strong"),np=o("padding_side"),rp=o(" ("),ms=r("code"),sp=o("str"),ap=o(`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),fs=r("code"),ip=o("'right'"),dp=o(" or "),us=r("code"),cp=o("'left'"),lp=o("."),hp=d(),re=r("li"),_s=r("strong"),pp=o("truncation_side"),mp=o(" ("),gs=r("code"),fp=o("str"),up=o(`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),ks=r("code"),_p=o("'right'"),gp=o(" or "),bs=r("code"),kp=o("'left'"),bp=o("."),vp=d(),st=r("div"),h(Mt.$$.fragment),Tp=d(),vs=r("p"),yp=o(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),wp=d(),at=r("div"),h(Vt.$$.fragment),zp=d(),Ts=r("p"),xp=o("Convert a list of lists of token ids into a list of strings by calling decode."),Ep=d(),ye=r("div"),h(Gt.$$.fragment),$p=d(),ys=r("p"),Pp=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.`),qp=d(),jt=r("p"),Ip=o("Similar to doing "),ws=r("code"),Fp=o("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Lp=o("."),Dp=d(),we=r("div"),h(Ht.$$.fragment),Np=d(),zs=r("p"),Cp=o("Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Ap=d(),Zt=r("p"),Bp=o("Same as doing "),xs=r("code"),Wp=o("self.convert_tokens_to_ids(self.tokenize(text))"),Sp=o("."),Op=d(),ze=r("div"),h(Jt.$$.fragment),Up=d(),Es=r("p"),Rp=o("Upload the tokenizer files to the \u{1F917} Model Hub."),Mp=d(),h(it.$$.fragment),Vp=d(),dt=r("div"),h(Xt.$$.fragment),Gp=d(),$s=r("p"),jp=o(`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Hp=d(),ct=r("div"),h(Yt.$$.fragment),Zp=d(),Ps=r("p"),Jp=o(`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Xp=d(),lt=r("div"),h(Qt.$$.fragment),Yp=d(),qs=r("p"),Qp=o("Returns the added tokens in the vocabulary as a dictionary of token to index."),Kp=d(),xe=r("div"),h(Kt.$$.fragment),em=d(),Is=r("p"),tm=o("Returns the number of added tokens when encoding a sequence with special tokens."),om=d(),h(ht.$$.fragment),nm=d(),Ee=r("div"),h(eo.$$.fragment),rm=d(),Fs=r("p"),sm=o(`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),am=d(),Ls=r("p"),im=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.`),dm=d(),pt=r("div"),h(to.$$.fragment),cm=d(),Ds=r("p"),lm=o(`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Ya=d(),Be=r("h2"),mt=r("a"),Ns=r("span"),h(oo.$$.fragment),hm=d(),Cs=r("span"),pm=o("BatchEncoding"),Qa=d(),w=r("div"),h(no.$$.fragment),mm=d(),ie=r("p"),fm=o("Holds the output of the "),ro=r("a"),As=r("strong"),um=o("call"),_m=o("()"),gm=o(`,
`),Jo=r("a"),km=o("encode_plus()"),bm=o(` and
`),Xo=r("a"),vm=o("batch_encode_plus()"),Tm=o(" methods (tokens, attention_masks, etc)."),ym=d(),Bs=r("p"),wm=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.`),zm=d(),G=r("div"),h(so.$$.fragment),xm=d(),Ws=r("p"),Em=o(`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),$m=d(),Ss=r("p"),Pm=o("Can be called as:"),qm=d(),ao=r("ul"),Yo=r("li"),Os=r("code"),Im=o("self.char_to_token(char_index)"),Fm=o(" if batch size is 1"),Lm=d(),Qo=r("li"),Us=r("code"),Dm=o("self.char_to_token(batch_index, char_index)"),Nm=o(" if batch size is greater or equal to 1"),Cm=d(),Rs=r("p"),Am=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.`),Bm=d(),j=r("div"),h(io.$$.fragment),Wm=d(),Ms=r("p"),Sm=o(`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),Om=d(),Vs=r("p"),Um=o("Can be called as:"),Rm=d(),co=r("ul"),Ko=r("li"),Gs=r("code"),Mm=o("self.char_to_word(char_index)"),Vm=o(" if batch size is 1"),Gm=d(),en=r("li"),js=r("code"),jm=o("self.char_to_word(batch_index, char_index)"),Hm=o(" if batch size is greater than 1"),Zm=d(),Hs=r("p"),Jm=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.`),Xm=d(),ft=r("div"),h(lo.$$.fragment),Ym=d(),Zs=r("p"),Qm=o("Convert the inner content to tensors."),Km=d(),$e=r("div"),h(ho.$$.fragment),ef=d(),Js=r("p"),tf=o("Return a list mapping the tokens to the id of their original sentences:"),of=d(),We=r("ul"),tn=r("li"),Xs=r("code"),nf=o("None"),rf=o(" for special tokens added around or between sequences,"),sf=d(),on=r("li"),Ys=r("code"),af=o("0"),df=o(" for tokens corresponding to words in the first sequence,"),cf=d(),nn=r("li"),Qs=r("code"),lf=o("1"),hf=o(` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),pf=d(),ut=r("div"),h(po.$$.fragment),mf=d(),mo=r("p"),ff=o("Send all values to device by calling "),Ks=r("code"),uf=o("v.to(device)"),_f=o(" (PyTorch only)."),gf=d(),B=r("div"),h(fo.$$.fragment),kf=d(),ea=r("p"),bf=o("Get the character span corresponding to an encoded token in a sequence of the batch."),vf=d(),uo=r("p"),Tf=o("Character spans are returned as a "),rn=r("a"),yf=o("CharSpan"),wf=o(" with:"),zf=d(),_o=r("ul"),sn=r("li"),ta=r("strong"),xf=o("start"),Ef=o(" \u2014 Index of the first character in the original string associated to the token."),$f=d(),an=r("li"),oa=r("strong"),Pf=o("end"),qf=o(` \u2014 Index of the character following the last character in the original string associated to the
token.`),If=d(),na=r("p"),Ff=o("Can be called as:"),Lf=d(),go=r("ul"),dn=r("li"),ra=r("code"),Df=o("self.token_to_chars(token_index)"),Nf=o(" if batch size is 1"),Cf=d(),cn=r("li"),sa=r("code"),Af=o("self.token_to_chars(batch_index, token_index)"),Bf=o(" if batch size is greater or equal to 1"),Wf=d(),H=r("div"),h(ko.$$.fragment),Sf=d(),Se=r("p"),Of=o("Get the index of the sequence represented by the given token. In the general use case, this method returns "),aa=r("code"),Uf=o("0"),Rf=o(`
for a single sequence or the first sequence of a pair, and `),ia=r("code"),Mf=o("1"),Vf=o(" for the second sequence of a pair"),Gf=d(),da=r("p"),jf=o("Can be called as:"),Hf=d(),bo=r("ul"),ln=r("li"),ca=r("code"),Zf=o("self.token_to_sequence(token_index)"),Jf=o(" if batch size is 1"),Xf=d(),hn=r("li"),la=r("code"),Yf=o("self.token_to_sequence(batch_index, token_index)"),Qf=o(" if batch size is greater than 1"),Kf=d(),ha=r("p"),eu=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.`),tu=d(),Z=r("div"),h(vo.$$.fragment),ou=d(),pa=r("p"),nu=o("Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),ru=d(),ma=r("p"),su=o("Can be called as:"),au=d(),To=r("ul"),pn=r("li"),fa=r("code"),iu=o("self.token_to_word(token_index)"),du=o(" if batch size is 1"),cu=d(),mn=r("li"),ua=r("code"),lu=o("self.token_to_word(batch_index, token_index)"),hu=o(" if batch size is greater than 1"),pu=d(),_a=r("p"),mu=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.`),fu=d(),_t=r("div"),h(yo.$$.fragment),uu=d(),ga=r("p"),_u=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).`),gu=d(),gt=r("div"),h(wo.$$.fragment),ku=d(),ka=r("p"),bu=o("Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),vu=d(),W=r("div"),h(zo.$$.fragment),Tu=d(),ba=r("p"),yu=o("Get the character span in the original string corresponding to given word in a sequence of the batch."),wu=d(),va=r("p"),zu=o("Character spans are returned as a CharSpan NamedTuple with:"),xu=d(),xo=r("ul"),Ta=r("li"),Eu=o("start: index of the first character in the original string"),$u=d(),ya=r("li"),Pu=o("end: index of the character following the last character in the original string"),qu=d(),wa=r("p"),Iu=o("Can be called as:"),Fu=d(),Eo=r("ul"),fn=r("li"),za=r("code"),Lu=o("self.word_to_chars(word_index)"),Du=o(" if batch size is 1"),Nu=d(),un=r("li"),xa=r("code"),Cu=o("self.word_to_chars(batch_index, word_index)"),Au=o(" if batch size is greater or equal to 1"),Bu=d(),L=r("div"),h($o.$$.fragment),Wu=d(),Ea=r("p"),Su=o("Get the encoded token span corresponding to a word in a sequence of the batch."),Ou=d(),Po=r("p"),Uu=o("Token spans are returned as a "),_n=r("a"),Ru=o("TokenSpan"),Mu=o(" with:"),Vu=d(),qo=r("ul"),gn=r("li"),$a=r("strong"),Gu=o("start"),ju=o(" \u2014 Index of the first token."),Hu=d(),kn=r("li"),Pa=r("strong"),Zu=o("end"),Ju=o(" \u2014 Index of the token following the last token."),Xu=d(),qa=r("p"),Yu=o("Can be called as:"),Qu=d(),Io=r("ul"),bn=r("li"),Ia=r("code"),Ku=o("self.word_to_tokens(word_index, sequence_index: int = 0)"),e_=o(" if batch size is 1"),t_=d(),vn=r("li"),Fa=r("code"),o_=o("self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),n_=o(` if batch size is greater or equal to
1`),r_=d(),La=r("p"),s_=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.`),a_=d(),kt=r("div"),h(Fo.$$.fragment),i_=d(),Da=r("p"),d_=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=rv('[data-svelte="svelte-1phssyn"]',document.head);y=s(b,"META",{name:!0,content:!0}),b.forEach(t),F=c(i),q=s(i,"H1",{class:!0});var Lo=a(q);E=s(Lo,"A",{id:!0,class:!0,href:!0});var Na=a(E);S=s(Na,"SPAN",{});var Ca=a(S);p(v.$$.fragment,Ca),Ca.forEach(t),Na.forEach(t),D=c(Lo),Bn=s(Lo,"SPAN",{});var Aa=a(Bn);Ui=n(Aa,"Tokenizer"),Aa.forEach(t),Lo.forEach(t),Oa=c(i),je=s(i,"P",{});var ei=a(je);Ri=n(ei,`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=s(ei,"A",{href:!0,rel:!0});var F_=a(Tt);Mi=n(F_,"\u{1F917} Tokenizers"),F_.forEach(t),Vi=n(ei,". The \u201CFast\u201D implementations allows:"),ei.forEach(t),Ua=c(i),He=s(i,"OL",{});var ti=a(He);Wn=s(ti,"LI",{});var L_=a(Wn);Gi=n(L_,"a significant speed-up in particular when doing batched tokenization and"),L_.forEach(t),ji=c(ti),Sn=s(ti,"LI",{});var D_=a(Sn);Hi=n(D_,`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).`),D_.forEach(t),ti.forEach(t),Ra=c(i),O=s(i,"P",{});var Pe=a(O);Zi=n(Pe,"The base classes "),Co=s(Pe,"A",{href:!0});var N_=a(Co);Ji=n(N_,"PreTrainedTokenizer"),N_.forEach(t),Xi=n(Pe," and "),Ao=s(Pe,"A",{href:!0});var C_=a(Ao);Yi=n(C_,"PreTrainedTokenizerFast"),C_.forEach(t),Qi=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
`),Bo=s(Pe,"A",{href:!0});var A_=a(Bo);Ki=n(A_,"PreTrainedTokenizerBase"),A_.forEach(t),ed=n(Pe,` that contains the common methods, and
`),Wo=s(Pe,"A",{href:!0});var B_=a(Wo);td=n(B_,"SpecialTokensMixin"),B_.forEach(t),od=n(Pe,"."),Pe.forEach(t),Ma=c(i),De=s(i,"P",{});var Ba=a(De);So=s(Ba,"A",{href:!0});var W_=a(So);nd=n(W_,"PreTrainedTokenizer"),W_.forEach(t),rd=n(Ba," and "),Oo=s(Ba,"A",{href:!0});var S_=a(Oo);sd=n(S_,"PreTrainedTokenizerFast"),S_.forEach(t),ad=n(Ba,` thus implement the main
methods for using all the tokenizers:`),Ba.forEach(t),Va=c(i),me=s(i,"UL",{});var Tn=a(me);On=s(Tn,"LI",{});var O_=a(On);id=n(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).`),O_.forEach(t),dd=c(Tn),Un=s(Tn,"LI",{});var U_=a(Un);cd=n(U_,"Adding new tokens to the vocabulary in a way that is independent of the underlying structure (BPE, SentencePiece\u2026)."),U_.forEach(t),ld=c(Tn),Rn=s(Tn,"LI",{});var R_=a(Rn);hd=n(R_,`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.`),R_.forEach(t),Tn.forEach(t),Ga=c(i),I=s(i,"P",{});var A=a(I);Uo=s(A,"A",{href:!0});var M_=a(Uo);pd=n(M_,"BatchEncoding"),M_.forEach(t),md=n(A,` holds the output of the
`),Ro=s(A,"A",{href:!0});var V_=a(Ro);fd=n(V_,"PreTrainedTokenizerBase"),V_.forEach(t),ud=n(A,"\u2019s encoding methods ("),Mn=s(A,"CODE",{});var G_=a(Mn);_d=n(G_,"__call__"),G_.forEach(t),gd=n(A,`,
`),Vn=s(A,"CODE",{});var j_=a(Vn);kd=n(j_,"encode_plus"),j_.forEach(t),bd=n(A," and "),Gn=s(A,"CODE",{});var H_=a(Gn);vd=n(H_,"batch_encode_plus"),H_.forEach(t),Td=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 (`),jn=s(A,"CODE",{});var Z_=a(jn);yd=n(Z_,"input_ids"),Z_.forEach(t),wd=n(A,", "),Hn=s(A,"CODE",{});var J_=a(Hn);zd=n(J_,"attention_mask"),J_.forEach(t),xd=n(A,`\u2026). When the tokenizer is a \u201CFast\u201D tokenizer (i.e., backed by
HuggingFace `),yt=s(A,"A",{href:!0,rel:!0});var X_=a(yt);Ed=n(X_,"tokenizers library"),X_.forEach(t),$d=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),ja=c(i),Ne=s(i,"H2",{class:!0});var oi=a(Ne);Ze=s(oi,"A",{id:!0,class:!0,href:!0});var Y_=a(Ze);Zn=s(Y_,"SPAN",{});var Q_=a(Zn);p(wt.$$.fragment,Q_),Q_.forEach(t),Y_.forEach(t),Pd=c(oi),Jn=s(oi,"SPAN",{});var K_=a(Jn);qd=n(K_,"PreTrainedTokenizer"),K_.forEach(t),oi.forEach(t),Ha=c(i),g=s(i,"DIV",{class:!0});var z=a(g);p(zt.$$.fragment,z),Id=c(z),Xn=s(z,"P",{});var eg=a(Xn);Fd=n(eg,"Base class for all slow tokenizers."),eg.forEach(t),Ld=c(z),xt=s(z,"P",{});var ni=a(xt);Dd=n(ni,"Inherits from "),Mo=s(ni,"A",{href:!0});var tg=a(Mo);Nd=n(tg,"PreTrainedTokenizerBase"),tg.forEach(t),Cd=n(ni,"."),ni.forEach(t),Ad=c(z),Yn=s(z,"P",{});var og=a(Yn);Bd=n(og,`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.`),og.forEach(t),Wd=c(z),Qn=s(z,"P",{});var ng=a(Qn);Sd=n(ng,`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).`),ng.forEach(t),Od=c(z),Kn=s(z,"P",{});var rg=a(Kn);Ud=n(rg,"Class attributes (overridden by derived classes)"),rg.forEach(t),Rd=c(z),N=s(z,"UL",{});var J=a(N);fe=s(J,"LI",{});var Do=a(fe);er=s(Do,"STRONG",{});var sg=a(er);Md=n(sg,"vocab_files_names"),sg.forEach(t),Vd=n(Do," ("),tr=s(Do,"CODE",{});var ag=a(tr);Gd=n(ag,"Dict[str, str]"),ag.forEach(t),jd=n(Do,") \u2014 A dictionary with, as keys, the "),or=s(Do,"CODE",{});var ig=a(or);Hd=n(ig,"__init__"),ig.forEach(t),Zd=n(Do,` keyword name of each
vocabulary file required by the model, and as associated values, the filename for saving the associated file
(string).`),Do.forEach(t),Jd=c(J),U=s(J,"LI",{});var de=a(U);nr=s(de,"STRONG",{});var dg=a(nr);Xd=n(dg,"pretrained_vocab_files_map"),dg.forEach(t),Yd=n(de," ("),rr=s(de,"CODE",{});var cg=a(rr);Qd=n(cg,"Dict[str, Dict[str, str]]"),cg.forEach(t),Kd=n(de,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),sr=s(de,"CODE",{});var lg=a(sr);ec=n(lg,"__init__"),lg.forEach(t),tc=n(de,` keyword name of each vocabulary file required by the model, the
low-level being the `),ar=s(de,"CODE",{});var hg=a(ar);oc=n(hg,"short-cut-names"),hg.forEach(t),nc=n(de," of the pretrained models with, as associated values, the "),ir=s(de,"CODE",{});var pg=a(ir);rc=n(pg,"url"),pg.forEach(t),sc=n(de,` to the
associated pretrained vocabulary file.`),de.forEach(t),ac=c(J),Q=s(J,"LI",{});var Oe=a(Q);dr=s(Oe,"STRONG",{});var mg=a(dr);ic=n(mg,"max_model_input_sizes"),mg.forEach(t),dc=n(Oe," ("),cr=s(Oe,"CODE",{});var fg=a(cr);cc=n(fg,"Dict[str, Optional[int]]"),fg.forEach(t),lc=n(Oe,") \u2014 A dictionary with, as keys, the "),lr=s(Oe,"CODE",{});var ug=a(lr);hc=n(ug,"short-cut-names"),ug.forEach(t),pc=n(Oe,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),hr=s(Oe,"CODE",{});var _g=a(hr);mc=n(_g,"None"),_g.forEach(t),fc=n(Oe," if the model has no maximum input size."),Oe.forEach(t),uc=c(J),R=s(J,"LI",{});var ce=a(R);pr=s(ce,"STRONG",{});var gg=a(pr);_c=n(gg,"pretrained_init_configuration"),gg.forEach(t),gc=n(ce," ("),mr=s(ce,"CODE",{});var kg=a(mr);kc=n(kg,"Dict[str, Dict[str, Any]]"),kg.forEach(t),bc=n(ce,`) \u2014 A dictionary with, as keys, the
`),fr=s(ce,"CODE",{});var bg=a(fr);vc=n(bg,"short-cut-names"),bg.forEach(t),Tc=n(ce,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),ur=s(ce,"CODE",{});var vg=a(ur);yc=n(vg,"__init__"),vg.forEach(t),wc=n(ce,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Vo=s(ce,"A",{href:!0});var Tg=a(Vo);zc=n(Tg,"from_pretrained()"),Tg.forEach(t),xc=n(ce," method."),ce.forEach(t),Ec=c(J),Je=s(J,"LI",{});var Wa=a(Je);_r=s(Wa,"STRONG",{});var yg=a(_r);$c=n(yg,"model_input_names"),yg.forEach(t),Pc=n(Wa," ("),gr=s(Wa,"CODE",{});var wg=a(gr);qc=n(wg,"List[str]"),wg.forEach(t),Ic=n(Wa,") \u2014 A list of inputs expected in the forward pass of the model."),Wa.forEach(t),Fc=c(J),K=s(J,"LI",{});var Ue=a(K);kr=s(Ue,"STRONG",{});var zg=a(kr);Lc=n(zg,"padding_side"),zg.forEach(t),Dc=n(Ue," ("),br=s(Ue,"CODE",{});var xg=a(br);Nc=n(xg,"str"),xg.forEach(t),Cc=n(Ue,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),vr=s(Ue,"CODE",{});var Eg=a(vr);Ac=n(Eg,"'right'"),Eg.forEach(t),Bc=n(Ue," or "),Tr=s(Ue,"CODE",{});var $g=a(Tr);Wc=n($g,"'left'"),$g.forEach(t),Sc=n(Ue,"."),Ue.forEach(t),Oc=c(J),ee=s(J,"LI",{});var Re=a(ee);yr=s(Re,"STRONG",{});var Pg=a(yr);Uc=n(Pg,"truncation_side"),Pg.forEach(t),Rc=n(Re," ("),wr=s(Re,"CODE",{});var qg=a(wr);Mc=n(qg,"str"),qg.forEach(t),Vc=n(Re,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),zr=s(Re,"CODE",{});var Ig=a(zr);Gc=n(Ig,"'right'"),Ig.forEach(t),jc=n(Re," or "),xr=s(Re,"CODE",{});var Fg=a(xr);Hc=n(Fg,"'left'"),Fg.forEach(t),Zc=n(Re,"."),Re.forEach(t),J.forEach(t),Jc=c(z),Xe=s(z,"DIV",{class:!0});var ri=a(Xe);p(Et.$$.fragment,ri),Xc=c(ri),Er=s(ri,"P",{});var Lg=a(Er);Yc=n(Lg,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Lg.forEach(t),ri.forEach(t),Qc=c(z),Ye=s(z,"DIV",{class:!0});var si=a(Ye);p($t.$$.fragment,si),Kc=c(si),$r=s(si,"P",{});var Dg=a($r);el=n(Dg,"Convert a list of lists of token ids into a list of strings by calling decode."),Dg.forEach(t),si.forEach(t),tl=c(z),ue=s(z,"DIV",{class:!0});var yn=a(ue);p(Pt.$$.fragment,yn),ol=c(yn),Pr=s(yn,"P",{});var Ng=a(Pr);nl=n(Ng,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Ng.forEach(t),rl=c(yn),qt=s(yn,"P",{});var ai=a(qt);sl=n(ai,"Similar to doing "),qr=s(ai,"CODE",{});var Cg=a(qr);al=n(Cg,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Cg.forEach(t),il=n(ai,"."),ai.forEach(t),yn.forEach(t),dl=c(z),_e=s(z,"DIV",{class:!0});var wn=a(_e);p(It.$$.fragment,wn),cl=c(wn),Ir=s(wn,"P",{});var Ag=a(Ir);ll=n(Ag,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Ag.forEach(t),hl=c(wn),Ft=s(wn,"P",{});var ii=a(Ft);pl=n(ii,"Same as doing "),Fr=s(ii,"CODE",{});var Bg=a(Fr);ml=n(Bg,"self.convert_tokens_to_ids(self.tokenize(text))"),Bg.forEach(t),fl=n(ii,"."),ii.forEach(t),wn.forEach(t),ul=c(z),ge=s(z,"DIV",{class:!0});var zn=a(ge);p(Lt.$$.fragment,zn),_l=c(zn),Lr=s(zn,"P",{});var Wg=a(Lr);gl=n(Wg,"Upload the tokenizer files to the \u{1F917} Model Hub."),Wg.forEach(t),kl=c(zn),p(Qe.$$.fragment,zn),zn.forEach(t),bl=c(z),Ke=s(z,"DIV",{class:!0});var di=a(Ke);p(Dt.$$.fragment,di),vl=c(di),Dr=s(di,"P",{});var Sg=a(Dr);Tl=n(Sg,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Sg.forEach(t),di.forEach(t),yl=c(z),et=s(z,"DIV",{class:!0});var ci=a(et);p(Nt.$$.fragment,ci),wl=c(ci),Nr=s(ci,"P",{});var Og=a(Nr);zl=n(Og,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Og.forEach(t),ci.forEach(t),xl=c(z),tt=s(z,"DIV",{class:!0});var li=a(tt);p(Ct.$$.fragment,li),El=c(li),Cr=s(li,"P",{});var Ug=a(Cr);$l=n(Ug,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Ug.forEach(t),li.forEach(t),Pl=c(z),ke=s(z,"DIV",{class:!0});var xn=a(ke);p(At.$$.fragment,xn),ql=c(xn),Ar=s(xn,"P",{});var Rg=a(Ar);Il=n(Rg,"Returns the number of added tokens when encoding a sequence with special tokens."),Rg.forEach(t),Fl=c(xn),p(ot.$$.fragment,xn),xn.forEach(t),Ll=c(z),be=s(z,"DIV",{class:!0});var En=a(be);p(Bt.$$.fragment,En),Dl=c(En),Br=s(En,"P",{});var Mg=a(Br);Nl=n(Mg,"Performs any necessary transformations before tokenization."),Mg.forEach(t),Cl=c(En),Ce=s(En,"P",{});var $n=a(Ce);Al=n($n,"This method should pop the arguments from kwargs and return the remaining "),Wr=s($n,"CODE",{});var Vg=a(Wr);Bl=n(Vg,"kwargs"),Vg.forEach(t),Wl=n($n,` as well. We test the
`),Sr=s($n,"CODE",{});var Gg=a(Sr);Sl=n(Gg,"kwargs"),Gg.forEach(t),Ol=n($n," at the end of the encoding process to be sure all the arguments have been used."),$n.forEach(t),En.forEach(t),Ul=c(z),ve=s(z,"DIV",{class:!0});var Pn=a(ve);p(Wt.$$.fragment,Pn),Rl=c(Pn),Or=s(Pn,"P",{});var jg=a(Or);Ml=n(jg,"Converts a string in a sequence of tokens, using the tokenizer."),jg.forEach(t),Vl=c(Pn),Ur=s(Pn,"P",{});var Hg=a(Ur);Gl=n(Hg,`Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies
(BPE/SentencePieces/WordPieces). Takes care of added tokens.`),Hg.forEach(t),Pn.forEach(t),z.forEach(t),Za=c(i),Ae=s(i,"H2",{class:!0});var hi=a(Ae);nt=s(hi,"A",{id:!0,class:!0,href:!0});var Zg=a(nt);Rr=s(Zg,"SPAN",{});var Jg=a(Rr);p(St.$$.fragment,Jg),Jg.forEach(t),Zg.forEach(t),jl=c(hi),Mr=s(hi,"SPAN",{});var Xg=a(Mr);Hl=n(Xg,"PreTrainedTokenizerFast"),Xg.forEach(t),hi.forEach(t),Ja=c(i),te=s(i,"P",{});var bt=a(te);Zl=n(bt,"The "),Go=s(bt,"A",{href:!0});var Yg=a(Go);Jl=n(Yg,"PreTrainedTokenizerFast"),Yg.forEach(t),Xl=n(bt," depend on the "),Ot=s(bt,"A",{href:!0,rel:!0});var Qg=a(Ot);Yl=n(Qg,"tokenizers"),Qg.forEach(t),Ql=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 `),jo=s(bt,"A",{href:!0});var Kg=a(jo);Kl=n(Kg,"Using tokenizers from \u{1F917} tokenizers"),Kg.forEach(t),eh=n(bt," page to understand how this is done."),bt.forEach(t),Xa=c(i),k=s(i,"DIV",{class:!0});var x=a(k);p(Ut.$$.fragment,x),th=c(x),Vr=s(x,"P",{});var ek=a(Vr);oh=n(ek,"Base class for all fast tokenizers (wrapping HuggingFace tokenizers library)."),ek.forEach(t),nh=c(x),Rt=s(x,"P",{});var pi=a(Rt);rh=n(pi,"Inherits from "),Ho=s(pi,"A",{href:!0});var tk=a(Ho);sh=n(tk,"PreTrainedTokenizerBase"),tk.forEach(t),ah=n(pi,"."),pi.forEach(t),ih=c(x),Gr=s(x,"P",{});var ok=a(Gr);dh=n(ok,`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.`),ok.forEach(t),ch=c(x),jr=s(x,"P",{});var nk=a(jr);lh=n(nk,`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).`),nk.forEach(t),hh=c(x),Hr=s(x,"P",{});var rk=a(Hr);ph=n(rk,"Class attributes (overridden by derived classes)"),rk.forEach(t),mh=c(x),C=s(x,"UL",{});var X=a(C);Te=s(X,"LI",{});var No=a(Te);Zr=s(No,"STRONG",{});var sk=a(Zr);fh=n(sk,"vocab_files_names"),sk.forEach(t),uh=n(No," ("),Jr=s(No,"CODE",{});var ak=a(Jr);_h=n(ak,"Dict[str, str]"),ak.forEach(t),gh=n(No,") \u2014 A dictionary with, as keys, the "),Xr=s(No,"CODE",{});var ik=a(Xr);kh=n(ik,"__init__"),ik.forEach(t),bh=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),vh=c(X),M=s(X,"LI",{});var le=a(M);Yr=s(le,"STRONG",{});var dk=a(Yr);Th=n(dk,"pretrained_vocab_files_map"),dk.forEach(t),yh=n(le," ("),Qr=s(le,"CODE",{});var ck=a(Qr);wh=n(ck,"Dict[str, Dict[str, str]]"),ck.forEach(t),zh=n(le,`) \u2014 A dictionary of dictionaries, with the
high-level keys being the `),Kr=s(le,"CODE",{});var lk=a(Kr);xh=n(lk,"__init__"),lk.forEach(t),Eh=n(le,` keyword name of each vocabulary file required by the model, the
low-level being the `),es=s(le,"CODE",{});var hk=a(es);$h=n(hk,"short-cut-names"),hk.forEach(t),Ph=n(le," of the pretrained models with, as associated values, the "),ts=s(le,"CODE",{});var pk=a(ts);qh=n(pk,"url"),pk.forEach(t),Ih=n(le,` to the
associated pretrained vocabulary file.`),le.forEach(t),Fh=c(X),oe=s(X,"LI",{});var Me=a(oe);os=s(Me,"STRONG",{});var mk=a(os);Lh=n(mk,"max_model_input_sizes"),mk.forEach(t),Dh=n(Me," ("),ns=s(Me,"CODE",{});var fk=a(ns);Nh=n(fk,"Dict[str, Optional[int]]"),fk.forEach(t),Ch=n(Me,") \u2014 A dictionary with, as keys, the "),rs=s(Me,"CODE",{});var uk=a(rs);Ah=n(uk,"short-cut-names"),uk.forEach(t),Bh=n(Me,`
of the pretrained models, and as associated values, the maximum length of the sequence inputs of this model,
or `),ss=s(Me,"CODE",{});var _k=a(ss);Wh=n(_k,"None"),_k.forEach(t),Sh=n(Me," if the model has no maximum input size."),Me.forEach(t),Oh=c(X),V=s(X,"LI",{});var he=a(V);as=s(he,"STRONG",{});var gk=a(as);Uh=n(gk,"pretrained_init_configuration"),gk.forEach(t),Rh=n(he," ("),is=s(he,"CODE",{});var kk=a(is);Mh=n(kk,"Dict[str, Dict[str, Any]]"),kk.forEach(t),Vh=n(he,`) \u2014 A dictionary with, as keys, the
`),ds=s(he,"CODE",{});var bk=a(ds);Gh=n(bk,"short-cut-names"),bk.forEach(t),jh=n(he,` of the pretrained models, and as associated values, a dictionary of specific arguments to
pass to the `),cs=s(he,"CODE",{});var vk=a(cs);Hh=n(vk,"__init__"),vk.forEach(t),Zh=n(he,` method of the tokenizer class for this pretrained model when loading the tokenizer
with the `),Zo=s(he,"A",{href:!0});var Tk=a(Zo);Jh=n(Tk,"from_pretrained()"),Tk.forEach(t),Xh=n(he," method."),he.forEach(t),Yh=c(X),rt=s(X,"LI",{});var Sa=a(rt);ls=s(Sa,"STRONG",{});var yk=a(ls);Qh=n(yk,"model_input_names"),yk.forEach(t),Kh=n(Sa," ("),hs=s(Sa,"CODE",{});var wk=a(hs);ep=n(wk,"List[str]"),wk.forEach(t),tp=n(Sa,") \u2014 A list of inputs expected in the forward pass of the model."),Sa.forEach(t),op=c(X),ne=s(X,"LI",{});var Ve=a(ne);ps=s(Ve,"STRONG",{});var zk=a(ps);np=n(zk,"padding_side"),zk.forEach(t),rp=n(Ve," ("),ms=s(Ve,"CODE",{});var xk=a(ms);sp=n(xk,"str"),xk.forEach(t),ap=n(Ve,`) \u2014 The default value for the side on which the model should have padding applied.
Should be `),fs=s(Ve,"CODE",{});var Ek=a(fs);ip=n(Ek,"'right'"),Ek.forEach(t),dp=n(Ve," or "),us=s(Ve,"CODE",{});var $k=a(us);cp=n($k,"'left'"),$k.forEach(t),lp=n(Ve,"."),Ve.forEach(t),hp=c(X),re=s(X,"LI",{});var Ge=a(re);_s=s(Ge,"STRONG",{});var Pk=a(_s);pp=n(Pk,"truncation_side"),Pk.forEach(t),mp=n(Ge," ("),gs=s(Ge,"CODE",{});var qk=a(gs);fp=n(qk,"str"),qk.forEach(t),up=n(Ge,`) \u2014 The default value for the side on which the model should have truncation
applied. Should be `),ks=s(Ge,"CODE",{});var Ik=a(ks);_p=n(Ik,"'right'"),Ik.forEach(t),gp=n(Ge," or "),bs=s(Ge,"CODE",{});var Fk=a(bs);kp=n(Fk,"'left'"),Fk.forEach(t),bp=n(Ge,"."),Ge.forEach(t),X.forEach(t),vp=c(x),st=s(x,"DIV",{class:!0});var mi=a(st);p(Mt.$$.fragment,mi),Tp=c(mi),vs=s(mi,"P",{});var Lk=a(vs);yp=n(Lk,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Lk.forEach(t),mi.forEach(t),wp=c(x),at=s(x,"DIV",{class:!0});var fi=a(at);p(Vt.$$.fragment,fi),zp=c(fi),Ts=s(fi,"P",{});var Dk=a(Ts);xp=n(Dk,"Convert a list of lists of token ids into a list of strings by calling decode."),Dk.forEach(t),fi.forEach(t),Ep=c(x),ye=s(x,"DIV",{class:!0});var qn=a(ye);p(Gt.$$.fragment,qn),$p=c(qn),ys=s(qn,"P",{});var Nk=a(ys);Pp=n(Nk,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Nk.forEach(t),qp=c(qn),jt=s(qn,"P",{});var ui=a(jt);Ip=n(ui,"Similar to doing "),ws=s(ui,"CODE",{});var Ck=a(ws);Fp=n(Ck,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Ck.forEach(t),Lp=n(ui,"."),ui.forEach(t),qn.forEach(t),Dp=c(x),we=s(x,"DIV",{class:!0});var In=a(we);p(Ht.$$.fragment,In),Np=c(In),zs=s(In,"P",{});var Ak=a(zs);Cp=n(Ak,"Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary."),Ak.forEach(t),Ap=c(In),Zt=s(In,"P",{});var _i=a(Zt);Bp=n(_i,"Same as doing "),xs=s(_i,"CODE",{});var Bk=a(xs);Wp=n(Bk,"self.convert_tokens_to_ids(self.tokenize(text))"),Bk.forEach(t),Sp=n(_i,"."),_i.forEach(t),In.forEach(t),Op=c(x),ze=s(x,"DIV",{class:!0});var Fn=a(ze);p(Jt.$$.fragment,Fn),Up=c(Fn),Es=s(Fn,"P",{});var Wk=a(Es);Rp=n(Wk,"Upload the tokenizer files to the \u{1F917} Model Hub."),Wk.forEach(t),Mp=c(Fn),p(it.$$.fragment,Fn),Fn.forEach(t),Vp=c(x),dt=s(x,"DIV",{class:!0});var gi=a(dt);p(Xt.$$.fragment,gi),Gp=c(gi),$s=s(gi,"P",{});var Sk=a($s);jp=n(Sk,`Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and
added tokens.`),Sk.forEach(t),gi.forEach(t),Hp=c(x),ct=s(x,"DIV",{class:!0});var ki=a(ct);p(Yt.$$.fragment,ki),Zp=c(ki),Ps=s(ki,"P",{});var Ok=a(Ps);Jp=n(Ok,`Converts a token string (or a sequence of tokens) in a single integer id (or a sequence of ids), using the
vocabulary.`),Ok.forEach(t),ki.forEach(t),Xp=c(x),lt=s(x,"DIV",{class:!0});var bi=a(lt);p(Qt.$$.fragment,bi),Yp=c(bi),qs=s(bi,"P",{});var Uk=a(qs);Qp=n(Uk,"Returns the added tokens in the vocabulary as a dictionary of token to index."),Uk.forEach(t),bi.forEach(t),Kp=c(x),xe=s(x,"DIV",{class:!0});var Ln=a(xe);p(Kt.$$.fragment,Ln),em=c(Ln),Is=s(Ln,"P",{});var Rk=a(Is);tm=n(Rk,"Returns the number of added tokens when encoding a sequence with special tokens."),Rk.forEach(t),om=c(Ln),p(ht.$$.fragment,Ln),Ln.forEach(t),nm=c(x),Ee=s(x,"DIV",{class:!0});var Dn=a(Ee);p(eo.$$.fragment,Dn),rm=c(Dn),Fs=s(Dn,"P",{});var Mk=a(Fs);sm=n(Mk,`Define the truncation and the padding strategies for fast tokenizers (provided by HuggingFace tokenizers
library) and restore the tokenizer settings afterwards.`),Mk.forEach(t),am=c(Dn),Ls=s(Dn,"P",{});var Vk=a(Ls);im=n(Vk,`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.`),Vk.forEach(t),Dn.forEach(t),dm=c(x),pt=s(x,"DIV",{class:!0});var vi=a(pt);p(to.$$.fragment,vi),cm=c(vi),Ds=s(vi,"P",{});var Gk=a(Ds);lm=n(Gk,`Trains a tokenizer on a new corpus with the same defaults (in terms of special tokens or tokenization pipeline)
as the current one.`),Gk.forEach(t),vi.forEach(t),x.forEach(t),Ya=c(i),Be=s(i,"H2",{class:!0});var Ti=a(Be);mt=s(Ti,"A",{id:!0,class:!0,href:!0});var jk=a(mt);Ns=s(jk,"SPAN",{});var Hk=a(Ns);p(oo.$$.fragment,Hk),Hk.forEach(t),jk.forEach(t),hm=c(Ti),Cs=s(Ti,"SPAN",{});var Zk=a(Cs);pm=n(Zk,"BatchEncoding"),Zk.forEach(t),Ti.forEach(t),Qa=c(i),w=s(i,"DIV",{class:!0});var P=a(w);p(no.$$.fragment,P),mm=c(P),ie=s(P,"P",{});var vt=a(ie);fm=n(vt,"Holds the output of the "),ro=s(vt,"A",{href:!0});var c_=a(ro);As=s(c_,"STRONG",{});var Jk=a(As);um=n(Jk,"call"),Jk.forEach(t),_m=n(c_,"()"),c_.forEach(t),gm=n(vt,`,
`),Jo=s(vt,"A",{href:!0});var Xk=a(Jo);km=n(Xk,"encode_plus()"),Xk.forEach(t),bm=n(vt,` and
`),Xo=s(vt,"A",{href:!0});var Yk=a(Xo);vm=n(Yk,"batch_encode_plus()"),Yk.forEach(t),Tm=n(vt," methods (tokens, attention_masks, etc)."),vt.forEach(t),ym=c(P),Bs=s(P,"P",{});var Qk=a(Bs);wm=n(Qk,`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.`),Qk.forEach(t),zm=c(P),G=s(P,"DIV",{class:!0});var qe=a(G);p(so.$$.fragment,qe),xm=c(qe),Ws=s(qe,"P",{});var Kk=a(Ws);Em=n(Kk,`Get the index of the token in the encoded output comprising a character in the original string for a sequence
of the batch.`),Kk.forEach(t),$m=c(qe),Ss=s(qe,"P",{});var eb=a(Ss);Pm=n(eb,"Can be called as:"),eb.forEach(t),qm=c(qe),ao=s(qe,"UL",{});var yi=a(ao);Yo=s(yi,"LI",{});var l_=a(Yo);Os=s(l_,"CODE",{});var tb=a(Os);Im=n(tb,"self.char_to_token(char_index)"),tb.forEach(t),Fm=n(l_," if batch size is 1"),l_.forEach(t),Lm=c(yi),Qo=s(yi,"LI",{});var h_=a(Qo);Us=s(h_,"CODE",{});var ob=a(Us);Dm=n(ob,"self.char_to_token(batch_index, char_index)"),ob.forEach(t),Nm=n(h_," if batch size is greater or equal to 1"),h_.forEach(t),yi.forEach(t),Cm=c(qe),Rs=s(qe,"P",{});var nb=a(Rs);Am=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),qe.forEach(t),Bm=c(P),j=s(P,"DIV",{class:!0});var Ie=a(j);p(io.$$.fragment,Ie),Wm=c(Ie),Ms=s(Ie,"P",{});var rb=a(Ms);Sm=n(rb,`Get the word in the original string corresponding to a character in the original string of a sequence of the
batch.`),rb.forEach(t),Om=c(Ie),Vs=s(Ie,"P",{});var sb=a(Vs);Um=n(sb,"Can be called as:"),sb.forEach(t),Rm=c(Ie),co=s(Ie,"UL",{});var wi=a(co);Ko=s(wi,"LI",{});var p_=a(Ko);Gs=s(p_,"CODE",{});var ab=a(Gs);Mm=n(ab,"self.char_to_word(char_index)"),ab.forEach(t),Vm=n(p_," if batch size is 1"),p_.forEach(t),Gm=c(wi),en=s(wi,"LI",{});var m_=a(en);js=s(m_,"CODE",{});var ib=a(js);jm=n(ib,"self.char_to_word(batch_index, char_index)"),ib.forEach(t),Hm=n(m_," if batch size is greater than 1"),m_.forEach(t),wi.forEach(t),Zm=c(Ie),Hs=s(Ie,"P",{});var db=a(Hs);Jm=n(db,`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.`),db.forEach(t),Ie.forEach(t),Xm=c(P),ft=s(P,"DIV",{class:!0});var zi=a(ft);p(lo.$$.fragment,zi),Ym=c(zi),Zs=s(zi,"P",{});var cb=a(Zs);Qm=n(cb,"Convert the inner content to tensors."),cb.forEach(t),zi.forEach(t),Km=c(P),$e=s(P,"DIV",{class:!0});var Nn=a($e);p(ho.$$.fragment,Nn),ef=c(Nn),Js=s(Nn,"P",{});var lb=a(Js);tf=n(lb,"Return a list mapping the tokens to the id of their original sentences:"),lb.forEach(t),of=c(Nn),We=s(Nn,"UL",{});var Cn=a(We);tn=s(Cn,"LI",{});var f_=a(tn);Xs=s(f_,"CODE",{});var hb=a(Xs);nf=n(hb,"None"),hb.forEach(t),rf=n(f_," for special tokens added around or between sequences,"),f_.forEach(t),sf=c(Cn),on=s(Cn,"LI",{});var u_=a(on);Ys=s(u_,"CODE",{});var pb=a(Ys);af=n(pb,"0"),pb.forEach(t),df=n(u_," for tokens corresponding to words in the first sequence,"),u_.forEach(t),cf=c(Cn),nn=s(Cn,"LI",{});var __=a(nn);Qs=s(__,"CODE",{});var mb=a(Qs);lf=n(mb,"1"),mb.forEach(t),hf=n(__,` for tokens corresponding to words in the second sequence when a pair of sequences was jointly
encoded.`),__.forEach(t),Cn.forEach(t),Nn.forEach(t),pf=c(P),ut=s(P,"DIV",{class:!0});var xi=a(ut);p(po.$$.fragment,xi),mf=c(xi),mo=s(xi,"P",{});var Ei=a(mo);ff=n(Ei,"Send all values to device by calling "),Ks=s(Ei,"CODE",{});var fb=a(Ks);uf=n(fb,"v.to(device)"),fb.forEach(t),_f=n(Ei," (PyTorch only)."),Ei.forEach(t),xi.forEach(t),gf=c(P),B=s(P,"DIV",{class:!0});var se=a(B);p(fo.$$.fragment,se),kf=c(se),ea=s(se,"P",{});var ub=a(ea);bf=n(ub,"Get the character span corresponding to an encoded token in a sequence of the batch."),ub.forEach(t),vf=c(se),uo=s(se,"P",{});var $i=a(uo);Tf=n($i,"Character spans are returned as a "),rn=s($i,"A",{href:!0});var _b=a(rn);yf=n(_b,"CharSpan"),_b.forEach(t),wf=n($i," with:"),$i.forEach(t),zf=c(se),_o=s(se,"UL",{});var Pi=a(_o);sn=s(Pi,"LI",{});var g_=a(sn);ta=s(g_,"STRONG",{});var gb=a(ta);xf=n(gb,"start"),gb.forEach(t),Ef=n(g_," \u2014 Index of the first character in the original string associated to the token."),g_.forEach(t),$f=c(Pi),an=s(Pi,"LI",{});var k_=a(an);oa=s(k_,"STRONG",{});var kb=a(oa);Pf=n(kb,"end"),kb.forEach(t),qf=n(k_,` \u2014 Index of the character following the last character in the original string associated to the
token.`),k_.forEach(t),Pi.forEach(t),If=c(se),na=s(se,"P",{});var bb=a(na);Ff=n(bb,"Can be called as:"),bb.forEach(t),Lf=c(se),go=s(se,"UL",{});var qi=a(go);dn=s(qi,"LI",{});var b_=a(dn);ra=s(b_,"CODE",{});var vb=a(ra);Df=n(vb,"self.token_to_chars(token_index)"),vb.forEach(t),Nf=n(b_," if batch size is 1"),b_.forEach(t),Cf=c(qi),cn=s(qi,"LI",{});var v_=a(cn);sa=s(v_,"CODE",{});var Tb=a(sa);Af=n(Tb,"self.token_to_chars(batch_index, token_index)"),Tb.forEach(t),Bf=n(v_," if batch size is greater or equal to 1"),v_.forEach(t),qi.forEach(t),se.forEach(t),Wf=c(P),H=s(P,"DIV",{class:!0});var Fe=a(H);p(ko.$$.fragment,Fe),Sf=c(Fe),Se=s(Fe,"P",{});var An=a(Se);Of=n(An,"Get the index of the sequence represented by the given token. In the general use case, this method returns "),aa=s(An,"CODE",{});var yb=a(aa);Uf=n(yb,"0"),yb.forEach(t),Rf=n(An,`
for a single sequence or the first sequence of a pair, and `),ia=s(An,"CODE",{});var wb=a(ia);Mf=n(wb,"1"),wb.forEach(t),Vf=n(An," for the second sequence of a pair"),An.forEach(t),Gf=c(Fe),da=s(Fe,"P",{});var zb=a(da);jf=n(zb,"Can be called as:"),zb.forEach(t),Hf=c(Fe),bo=s(Fe,"UL",{});var Ii=a(bo);ln=s(Ii,"LI",{});var T_=a(ln);ca=s(T_,"CODE",{});var xb=a(ca);Zf=n(xb,"self.token_to_sequence(token_index)"),xb.forEach(t),Jf=n(T_," if batch size is 1"),T_.forEach(t),Xf=c(Ii),hn=s(Ii,"LI",{});var y_=a(hn);la=s(y_,"CODE",{});var Eb=a(la);Yf=n(Eb,"self.token_to_sequence(batch_index, token_index)"),Eb.forEach(t),Qf=n(y_," if batch size is greater than 1"),y_.forEach(t),Ii.forEach(t),Kf=c(Fe),ha=s(Fe,"P",{});var $b=a(ha);eu=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),Fe.forEach(t),tu=c(P),Z=s(P,"DIV",{class:!0});var Le=a(Z);p(vo.$$.fragment,Le),ou=c(Le),pa=s(Le,"P",{});var Pb=a(pa);nu=n(Pb,"Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch."),Pb.forEach(t),ru=c(Le),ma=s(Le,"P",{});var qb=a(ma);su=n(qb,"Can be called as:"),qb.forEach(t),au=c(Le),To=s(Le,"UL",{});var Fi=a(To);pn=s(Fi,"LI",{});var w_=a(pn);fa=s(w_,"CODE",{});var Ib=a(fa);iu=n(Ib,"self.token_to_word(token_index)"),Ib.forEach(t),du=n(w_," if batch size is 1"),w_.forEach(t),cu=c(Fi),mn=s(Fi,"LI",{});var z_=a(mn);ua=s(z_,"CODE",{});var Fb=a(ua);lu=n(Fb,"self.token_to_word(batch_index, token_index)"),Fb.forEach(t),hu=n(z_," if batch size is greater than 1"),z_.forEach(t),Fi.forEach(t),pu=c(Le),_a=s(Le,"P",{});var Lb=a(_a);mu=n(Lb,`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.`),Lb.forEach(t),Le.forEach(t),fu=c(P),_t=s(P,"DIV",{class:!0});var Li=a(_t);p(yo.$$.fragment,Li),uu=c(Li),ga=s(Li,"P",{});var Db=a(ga);_u=n(Db,`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).`),Db.forEach(t),Li.forEach(t),gu=c(P),gt=s(P,"DIV",{class:!0});var Di=a(gt);p(wo.$$.fragment,Di),ku=c(Di),ka=s(Di,"P",{});var Nb=a(ka);bu=n(Nb,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Nb.forEach(t),Di.forEach(t),vu=c(P),W=s(P,"DIV",{class:!0});var ae=a(W);p(zo.$$.fragment,ae),Tu=c(ae),ba=s(ae,"P",{});var Cb=a(ba);yu=n(Cb,"Get the character span in the original string corresponding to given word in a sequence of the batch."),Cb.forEach(t),wu=c(ae),va=s(ae,"P",{});var Ab=a(va);zu=n(Ab,"Character spans are returned as a CharSpan NamedTuple with:"),Ab.forEach(t),xu=c(ae),xo=s(ae,"UL",{});var Ni=a(xo);Ta=s(Ni,"LI",{});var Bb=a(Ta);Eu=n(Bb,"start: index of the first character in the original string"),Bb.forEach(t),$u=c(Ni),ya=s(Ni,"LI",{});var Wb=a(ya);Pu=n(Wb,"end: index of the character following the last character in the original string"),Wb.forEach(t),Ni.forEach(t),qu=c(ae),wa=s(ae,"P",{});var Sb=a(wa);Iu=n(Sb,"Can be called as:"),Sb.forEach(t),Fu=c(ae),Eo=s(ae,"UL",{});var Ci=a(Eo);fn=s(Ci,"LI",{});var x_=a(fn);za=s(x_,"CODE",{});var Ob=a(za);Lu=n(Ob,"self.word_to_chars(word_index)"),Ob.forEach(t),Du=n(x_," if batch size is 1"),x_.forEach(t),Nu=c(Ci),un=s(Ci,"LI",{});var E_=a(un);xa=s(E_,"CODE",{});var Ub=a(xa);Cu=n(Ub,"self.word_to_chars(batch_index, word_index)"),Ub.forEach(t),Au=n(E_," if batch size is greater or equal to 1"),E_.forEach(t),Ci.forEach(t),ae.forEach(t),Bu=c(P),L=s(P,"DIV",{class:!0});var Y=a(L);p($o.$$.fragment,Y),Wu=c(Y),Ea=s(Y,"P",{});var Rb=a(Ea);Su=n(Rb,"Get the encoded token span corresponding to a word in a sequence of the batch."),Rb.forEach(t),Ou=c(Y),Po=s(Y,"P",{});var Ai=a(Po);Uu=n(Ai,"Token spans are returned as a "),_n=s(Ai,"A",{href:!0});var Mb=a(_n);Ru=n(Mb,"TokenSpan"),Mb.forEach(t),Mu=n(Ai," with:"),Ai.forEach(t),Vu=c(Y),qo=s(Y,"UL",{});var Bi=a(qo);gn=s(Bi,"LI",{});var $_=a(gn);$a=s($_,"STRONG",{});var Vb=a($a);Gu=n(Vb,"start"),Vb.forEach(t),ju=n($_," \u2014 Index of the first token."),$_.forEach(t),Hu=c(Bi),kn=s(Bi,"LI",{});var P_=a(kn);Pa=s(P_,"STRONG",{});var Gb=a(Pa);Zu=n(Gb,"end"),Gb.forEach(t),Ju=n(P_," \u2014 Index of the token following the last token."),P_.forEach(t),Bi.forEach(t),Xu=c(Y),qa=s(Y,"P",{});var jb=a(qa);Yu=n(jb,"Can be called as:"),jb.forEach(t),Qu=c(Y),Io=s(Y,"UL",{});var Wi=a(Io);bn=s(Wi,"LI",{});var q_=a(bn);Ia=s(q_,"CODE",{});var Hb=a(Ia);Ku=n(Hb,"self.word_to_tokens(word_index, sequence_index: int = 0)"),Hb.forEach(t),e_=n(q_," if batch size is 1"),q_.forEach(t),t_=c(Wi),vn=s(Wi,"LI",{});var I_=a(vn);Fa=s(I_,"CODE",{});var Zb=a(Fa);o_=n(Zb,"self.word_to_tokens(batch_index, word_index, sequence_index: int = 0)"),Zb.forEach(t),n_=n(I_,` if batch size is greater or equal to
1`),I_.forEach(t),Wi.forEach(t),r_=c(Y),La=s(Y,"P",{});var Jb=a(La);s_=n(Jb,`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.`),Jb.forEach(t),Y.forEach(t),a_=c(P),kt=s(P,"DIV",{class:!0});var Si=a(kt);p(Fo.$$.fragment,Si),i_=c(Si),Da=s(Si,"P",{});var Xb=a(Da);d_=n(Xb,"Return a list mapping the tokens to their actual word in the initial sentence for a fast tokenizer."),Xb.forEach(t),Si.forEach(t),P.forEach(t),this.h()},h(){l(y,"name","hf:doc:metadata"),l(y,"content",JSON.stringify(hv)),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(Co,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Ao,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Bo,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Wo,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.SpecialTokensMixin"),l(So,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Oo,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Uo,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.BatchEncoding"),l(Ro,"href","/docs/transformers/v4.33.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(Ne,"class","relative group"),l(Mo,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Vo,"href","/docs/transformers/v4.33.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(Go,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(Ot,"href","https://huggingface.co/docs/tokenizers"),l(Ot,"rel","nofollow"),l(jo,"href","../fast_tokenizers"),l(Ho,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase"),l(Zo,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.from_pretrained"),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(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(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(Be,"class","relative group"),l(ro,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(Jo,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode_plus"),l(Xo,"href","/docs/transformers/v4.33.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(rn,"href","/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.CharSpan"),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(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(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_n,"href","/docs/transformers/v4.33.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,S),m(v,S,null),e(q,D),e(q,Bn),e(Bn,Ui),$(i,Oa,b),$(i,je,b),e(je,Ri),e(je,Tt),e(Tt,Mi),e(je,Vi),$(i,Ua,b),$(i,He,b),e(He,Wn),e(Wn,Gi),e(He,ji),e(He,Sn),e(Sn,Hi),$(i,Ra,b),$(i,O,b),e(O,Zi),e(O,Co),e(Co,Ji),e(O,Xi),e(O,Ao),e(Ao,Yi),e(O,Qi),e(O,Bo),e(Bo,Ki),e(O,ed),e(O,Wo),e(Wo,td),e(O,od),$(i,Ma,b),$(i,De,b),e(De,So),e(So,nd),e(De,rd),e(De,Oo),e(Oo,sd),e(De,ad),$(i,Va,b),$(i,me,b),e(me,On),e(On,id),e(me,dd),e(me,Un),e(Un,cd),e(me,ld),e(me,Rn),e(Rn,hd),$(i,Ga,b),$(i,I,b),e(I,Uo),e(Uo,pd),e(I,md),e(I,Ro),e(Ro,fd),e(I,ud),e(I,Mn),e(Mn,_d),e(I,gd),e(I,Vn),e(Vn,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,yt),e(yt,Ed),e(I,$d),$(i,ja,b),$(i,Ne,b),e(Ne,Ze),e(Ze,Zn),m(wt,Zn,null),e(Ne,Pd),e(Ne,Jn),e(Jn,qd),$(i,Ha,b),$(i,g,b),m(zt,g,null),e(g,Id),e(g,Xn),e(Xn,Fd),e(g,Ld),e(g,xt),e(xt,Dd),e(xt,Mo),e(Mo,Nd),e(xt,Cd),e(g,Ad),e(g,Yn),e(Yn,Bd),e(g,Wd),e(g,Qn),e(Qn,Sd),e(g,Od),e(g,Kn),e(Kn,Ud),e(g,Rd),e(g,N),e(N,fe),e(fe,er),e(er,Md),e(fe,Vd),e(fe,tr),e(tr,Gd),e(fe,jd),e(fe,or),e(or,Hd),e(fe,Zd),e(N,Jd),e(N,U),e(U,nr),e(nr,Xd),e(U,Yd),e(U,rr),e(rr,Qd),e(U,Kd),e(U,sr),e(sr,ec),e(U,tc),e(U,ar),e(ar,oc),e(U,nc),e(U,ir),e(ir,rc),e(U,sc),e(N,ac),e(N,Q),e(Q,dr),e(dr,ic),e(Q,dc),e(Q,cr),e(cr,cc),e(Q,lc),e(Q,lr),e(lr,hc),e(Q,pc),e(Q,hr),e(hr,mc),e(Q,fc),e(N,uc),e(N,R),e(R,pr),e(pr,_c),e(R,gc),e(R,mr),e(mr,kc),e(R,bc),e(R,fr),e(fr,vc),e(R,Tc),e(R,ur),e(ur,yc),e(R,wc),e(R,Vo),e(Vo,zc),e(R,xc),e(N,Ec),e(N,Je),e(Je,_r),e(_r,$c),e(Je,Pc),e(Je,gr),e(gr,qc),e(Je,Ic),e(N,Fc),e(N,K),e(K,kr),e(kr,Lc),e(K,Dc),e(K,br),e(br,Nc),e(K,Cc),e(K,vr),e(vr,Ac),e(K,Bc),e(K,Tr),e(Tr,Wc),e(K,Sc),e(N,Oc),e(N,ee),e(ee,yr),e(yr,Uc),e(ee,Rc),e(ee,wr),e(wr,Mc),e(ee,Vc),e(ee,zr),e(zr,Gc),e(ee,jc),e(ee,xr),e(xr,Hc),e(ee,Zc),e(g,Jc),e(g,Xe),m(Et,Xe,null),e(Xe,Xc),e(Xe,Er),e(Er,Yc),e(g,Qc),e(g,Ye),m($t,Ye,null),e(Ye,Kc),e(Ye,$r),e($r,el),e(g,tl),e(g,ue),m(Pt,ue,null),e(ue,ol),e(ue,Pr),e(Pr,nl),e(ue,rl),e(ue,qt),e(qt,sl),e(qt,qr),e(qr,al),e(qt,il),e(g,dl),e(g,_e),m(It,_e,null),e(_e,cl),e(_e,Ir),e(Ir,ll),e(_e,hl),e(_e,Ft),e(Ft,pl),e(Ft,Fr),e(Fr,ml),e(Ft,fl),e(g,ul),e(g,ge),m(Lt,ge,null),e(ge,_l),e(ge,Lr),e(Lr,gl),e(ge,kl),m(Qe,ge,null),e(g,bl),e(g,Ke),m(Dt,Ke,null),e(Ke,vl),e(Ke,Dr),e(Dr,Tl),e(g,yl),e(g,et),m(Nt,et,null),e(et,wl),e(et,Nr),e(Nr,zl),e(g,xl),e(g,tt),m(Ct,tt,null),e(tt,El),e(tt,Cr),e(Cr,$l),e(g,Pl),e(g,ke),m(At,ke,null),e(ke,ql),e(ke,Ar),e(Ar,Il),e(ke,Fl),m(ot,ke,null),e(g,Ll),e(g,be),m(Bt,be,null),e(be,Dl),e(be,Br),e(Br,Nl),e(be,Cl),e(be,Ce),e(Ce,Al),e(Ce,Wr),e(Wr,Bl),e(Ce,Wl),e(Ce,Sr),e(Sr,Sl),e(Ce,Ol),e(g,Ul),e(g,ve),m(Wt,ve,null),e(ve,Rl),e(ve,Or),e(Or,Ml),e(ve,Vl),e(ve,Ur),e(Ur,Gl),$(i,Za,b),$(i,Ae,b),e(Ae,nt),e(nt,Rr),m(St,Rr,null),e(Ae,jl),e(Ae,Mr),e(Mr,Hl),$(i,Ja,b),$(i,te,b),e(te,Zl),e(te,Go),e(Go,Jl),e(te,Xl),e(te,Ot),e(Ot,Yl),e(te,Ql),e(te,jo),e(jo,Kl),e(te,eh),$(i,Xa,b),$(i,k,b),m(Ut,k,null),e(k,th),e(k,Vr),e(Vr,oh),e(k,nh),e(k,Rt),e(Rt,rh),e(Rt,Ho),e(Ho,sh),e(Rt,ah),e(k,ih),e(k,Gr),e(Gr,dh),e(k,ch),e(k,jr),e(jr,lh),e(k,hh),e(k,Hr),e(Hr,ph),e(k,mh),e(k,C),e(C,Te),e(Te,Zr),e(Zr,fh),e(Te,uh),e(Te,Jr),e(Jr,_h),e(Te,gh),e(Te,Xr),e(Xr,kh),e(Te,bh),e(C,vh),e(C,M),e(M,Yr),e(Yr,Th),e(M,yh),e(M,Qr),e(Qr,wh),e(M,zh),e(M,Kr),e(Kr,xh),e(M,Eh),e(M,es),e(es,$h),e(M,Ph),e(M,ts),e(ts,qh),e(M,Ih),e(C,Fh),e(C,oe),e(oe,os),e(os,Lh),e(oe,Dh),e(oe,ns),e(ns,Nh),e(oe,Ch),e(oe,rs),e(rs,Ah),e(oe,Bh),e(oe,ss),e(ss,Wh),e(oe,Sh),e(C,Oh),e(C,V),e(V,as),e(as,Uh),e(V,Rh),e(V,is),e(is,Mh),e(V,Vh),e(V,ds),e(ds,Gh),e(V,jh),e(V,cs),e(cs,Hh),e(V,Zh),e(V,Zo),e(Zo,Jh),e(V,Xh),e(C,Yh),e(C,rt),e(rt,ls),e(ls,Qh),e(rt,Kh),e(rt,hs),e(hs,ep),e(rt,tp),e(C,op),e(C,ne),e(ne,ps),e(ps,np),e(ne,rp),e(ne,ms),e(ms,sp),e(ne,ap),e(ne,fs),e(fs,ip),e(ne,dp),e(ne,us),e(us,cp),e(ne,lp),e(C,hp),e(C,re),e(re,_s),e(_s,pp),e(re,mp),e(re,gs),e(gs,fp),e(re,up),e(re,ks),e(ks,_p),e(re,gp),e(re,bs),e(bs,kp),e(re,bp),e(k,vp),e(k,st),m(Mt,st,null),e(st,Tp),e(st,vs),e(vs,yp),e(k,wp),e(k,at),m(Vt,at,null),e(at,zp),e(at,Ts),e(Ts,xp),e(k,Ep),e(k,ye),m(Gt,ye,null),e(ye,$p),e(ye,ys),e(ys,Pp),e(ye,qp),e(ye,jt),e(jt,Ip),e(jt,ws),e(ws,Fp),e(jt,Lp),e(k,Dp),e(k,we),m(Ht,we,null),e(we,Np),e(we,zs),e(zs,Cp),e(we,Ap),e(we,Zt),e(Zt,Bp),e(Zt,xs),e(xs,Wp),e(Zt,Sp),e(k,Op),e(k,ze),m(Jt,ze,null),e(ze,Up),e(ze,Es),e(Es,Rp),e(ze,Mp),m(it,ze,null),e(k,Vp),e(k,dt),m(Xt,dt,null),e(dt,Gp),e(dt,$s),e($s,jp),e(k,Hp),e(k,ct),m(Yt,ct,null),e(ct,Zp),e(ct,Ps),e(Ps,Jp),e(k,Xp),e(k,lt),m(Qt,lt,null),e(lt,Yp),e(lt,qs),e(qs,Qp),e(k,Kp),e(k,xe),m(Kt,xe,null),e(xe,em),e(xe,Is),e(Is,tm),e(xe,om),m(ht,xe,null),e(k,nm),e(k,Ee),m(eo,Ee,null),e(Ee,rm),e(Ee,Fs),e(Fs,sm),e(Ee,am),e(Ee,Ls),e(Ls,im),e(k,dm),e(k,pt),m(to,pt,null),e(pt,cm),e(pt,Ds),e(Ds,lm),$(i,Ya,b),$(i,Be,b),e(Be,mt),e(mt,Ns),m(oo,Ns,null),e(Be,hm),e(Be,Cs),e(Cs,pm),$(i,Qa,b),$(i,w,b),m(no,w,null),e(w,mm),e(w,ie),e(ie,fm),e(ie,ro),e(ro,As),e(As,um),e(ro,_m),e(ie,gm),e(ie,Jo),e(Jo,km),e(ie,bm),e(ie,Xo),e(Xo,vm),e(ie,Tm),e(w,ym),e(w,Bs),e(Bs,wm),e(w,zm),e(w,G),m(so,G,null),e(G,xm),e(G,Ws),e(Ws,Em),e(G,$m),e(G,Ss),e(Ss,Pm),e(G,qm),e(G,ao),e(ao,Yo),e(Yo,Os),e(Os,Im),e(Yo,Fm),e(ao,Lm),e(ao,Qo),e(Qo,Us),e(Us,Dm),e(Qo,Nm),e(G,Cm),e(G,Rs),e(Rs,Am),e(w,Bm),e(w,j),m(io,j,null),e(j,Wm),e(j,Ms),e(Ms,Sm),e(j,Om),e(j,Vs),e(Vs,Um),e(j,Rm),e(j,co),e(co,Ko),e(Ko,Gs),e(Gs,Mm),e(Ko,Vm),e(co,Gm),e(co,en),e(en,js),e(js,jm),e(en,Hm),e(j,Zm),e(j,Hs),e(Hs,Jm),e(w,Xm),e(w,ft),m(lo,ft,null),e(ft,Ym),e(ft,Zs),e(Zs,Qm),e(w,Km),e(w,$e),m(ho,$e,null),e($e,ef),e($e,Js),e(Js,tf),e($e,of),e($e,We),e(We,tn),e(tn,Xs),e(Xs,nf),e(tn,rf),e(We,sf),e(We,on),e(on,Ys),e(Ys,af),e(on,df),e(We,cf),e(We,nn),e(nn,Qs),e(Qs,lf),e(nn,hf),e(w,pf),e(w,ut),m(po,ut,null),e(ut,mf),e(ut,mo),e(mo,ff),e(mo,Ks),e(Ks,uf),e(mo,_f),e(w,gf),e(w,B),m(fo,B,null),e(B,kf),e(B,ea),e(ea,bf),e(B,vf),e(B,uo),e(uo,Tf),e(uo,rn),e(rn,yf),e(uo,wf),e(B,zf),e(B,_o),e(_o,sn),e(sn,ta),e(ta,xf),e(sn,Ef),e(_o,$f),e(_o,an),e(an,oa),e(oa,Pf),e(an,qf),e(B,If),e(B,na),e(na,Ff),e(B,Lf),e(B,go),e(go,dn),e(dn,ra),e(ra,Df),e(dn,Nf),e(go,Cf),e(go,cn),e(cn,sa),e(sa,Af),e(cn,Bf),e(w,Wf),e(w,H),m(ko,H,null),e(H,Sf),e(H,Se),e(Se,Of),e(Se,aa),e(aa,Uf),e(Se,Rf),e(Se,ia),e(ia,Mf),e(Se,Vf),e(H,Gf),e(H,da),e(da,jf),e(H,Hf),e(H,bo),e(bo,ln),e(ln,ca),e(ca,Zf),e(ln,Jf),e(bo,Xf),e(bo,hn),e(hn,la),e(la,Yf),e(hn,Qf),e(H,Kf),e(H,ha),e(ha,eu),e(w,tu),e(w,Z),m(vo,Z,null),e(Z,ou),e(Z,pa),e(pa,nu),e(Z,ru),e(Z,ma),e(ma,su),e(Z,au),e(Z,To),e(To,pn),e(pn,fa),e(fa,iu),e(pn,du),e(To,cu),e(To,mn),e(mn,ua),e(ua,lu),e(mn,hu),e(Z,pu),e(Z,_a),e(_a,mu),e(w,fu),e(w,_t),m(yo,_t,null),e(_t,uu),e(_t,ga),e(ga,_u),e(w,gu),e(w,gt),m(wo,gt,null),e(gt,ku),e(gt,ka),e(ka,bu),e(w,vu),e(w,W),m(zo,W,null),e(W,Tu),e(W,ba),e(ba,yu),e(W,wu),e(W,va),e(va,zu),e(W,xu),e(W,xo),e(xo,Ta),e(Ta,Eu),e(xo,$u),e(xo,ya),e(ya,Pu),e(W,qu),e(W,wa),e(wa,Iu),e(W,Fu),e(W,Eo),e(Eo,fn),e(fn,za),e(za,Lu),e(fn,Du),e(Eo,Nu),e(Eo,un),e(un,xa),e(xa,Cu),e(un,Au),e(w,Bu),e(w,L),m($o,L,null),e(L,Wu),e(L,Ea),e(Ea,Su),e(L,Ou),e(L,Po),e(Po,Uu),e(Po,_n),e(_n,Ru),e(Po,Mu),e(L,Vu),e(L,qo),e(qo,gn),e(gn,$a),e($a,Gu),e(gn,ju),e(qo,Hu),e(qo,kn),e(kn,Pa),e(Pa,Zu),e(kn,Ju),e(L,Xu),e(L,qa),e(qa,Yu),e(L,Qu),e(L,Io),e(Io,bn),e(bn,Ia),e(Ia,Ku),e(bn,e_),e(Io,t_),e(Io,vn),e(vn,Fa),e(Fa,o_),e(vn,n_),e(L,r_),e(L,La),e(La,s_),e(w,a_),e(w,kt),m(Fo,kt,null),e(kt,i_),e(kt,Da),e(Da,d_),Ka=!0},p(i,[b]){const Lo={};b&2&&(Lo.$$scope={dirty:b,ctx:i}),Qe.$set(Lo);const Na={};b&2&&(Na.$$scope={dirty:b,ctx:i}),ot.$set(Na);const Ca={};b&2&&(Ca.$$scope={dirty:b,ctx:i}),it.$set(Ca);const Aa={};b&2&&(Aa.$$scope={dirty:b,ctx:i}),ht.$set(Aa)},i(i){Ka||(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(Dt.$$.fragment,i),f(Nt.$$.fragment,i),f(Ct.$$.fragment,i),f(At.$$.fragment,i),f(ot.$$.fragment,i),f(Bt.$$.fragment,i),f(Wt.$$.fragment,i),f(St.$$.fragment,i),f(Ut.$$.fragment,i),f(Mt.$$.fragment,i),f(Vt.$$.fragment,i),f(Gt.$$.fragment,i),f(Ht.$$.fragment,i),f(Jt.$$.fragment,i),f(it.$$.fragment,i),f(Xt.$$.fragment,i),f(Yt.$$.fragment,i),f(Qt.$$.fragment,i),f(Kt.$$.fragment,i),f(ht.$$.fragment,i),f(eo.$$.fragment,i),f(to.$$.fragment,i),f(oo.$$.fragment,i),f(no.$$.fragment,i),f(so.$$.fragment,i),f(io.$$.fragment,i),f(lo.$$.fragment,i),f(ho.$$.fragment,i),f(po.$$.fragment,i),f(fo.$$.fragment,i),f(ko.$$.fragment,i),f(vo.$$.fragment,i),f(yo.$$.fragment,i),f(wo.$$.fragment,i),f(zo.$$.fragment,i),f($o.$$.fragment,i),f(Fo.$$.fragment,i),Ka=!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(Dt.$$.fragment,i),u(Nt.$$.fragment,i),u(Ct.$$.fragment,i),u(At.$$.fragment,i),u(ot.$$.fragment,i),u(Bt.$$.fragment,i),u(Wt.$$.fragment,i),u(St.$$.fragment,i),u(Ut.$$.fragment,i),u(Mt.$$.fragment,i),u(Vt.$$.fragment,i),u(Gt.$$.fragment,i),u(Ht.$$.fragment,i),u(Jt.$$.fragment,i),u(it.$$.fragment,i),u(Xt.$$.fragment,i),u(Yt.$$.fragment,i),u(Qt.$$.fragment,i),u(Kt.$$.fragment,i),u(ht.$$.fragment,i),u(eo.$$.fragment,i),u(to.$$.fragment,i),u(oo.$$.fragment,i),u(no.$$.fragment,i),u(so.$$.fragment,i),u(io.$$.fragment,i),u(lo.$$.fragment,i),u(ho.$$.fragment,i),u(po.$$.fragment,i),u(fo.$$.fragment,i),u(ko.$$.fragment,i),u(vo.$$.fragment,i),u(yo.$$.fragment,i),u(wo.$$.fragment,i),u(zo.$$.fragment,i),u($o.$$.fragment,i),u(Fo.$$.fragment,i),Ka=!1},d(i){t(y),i&&t(F),i&&t(q),_(v),i&&t(Oa),i&&t(je),i&&t(Ua),i&&t(He),i&&t(Ra),i&&t(O),i&&t(Ma),i&&t(De),i&&t(Va),i&&t(me),i&&t(Ga),i&&t(I),i&&t(ja),i&&t(Ne),_(wt),i&&t(Ha),i&&t(g),_(zt),_(Et),_($t),_(Pt),_(It),_(Lt),_(Qe),_(Dt),_(Nt),_(Ct),_(At),_(ot),_(Bt),_(Wt),i&&t(Za),i&&t(Ae),_(St),i&&t(Ja),i&&t(te),i&&t(Xa),i&&t(k),_(Ut),_(Mt),_(Vt),_(Gt),_(Ht),_(Jt),_(it),_(Xt),_(Yt),_(Qt),_(Kt),_(ht),_(eo),_(to),i&&t(Ya),i&&t(Be),_(oo),i&&t(Qa),i&&t(w),_(no),_(so),_(io),_(lo),_(ho),_(po),_(fo),_(ko),_(vo),_(yo),_(wo),_(zo),_($o),_(Fo)}}}const hv={local:"tokenizer",sections:[{local:"transformers.PreTrainedTokenizer",title:"PreTrainedTokenizer"},{local:"transformers.PreTrainedTokenizerFast",title:"PreTrainedTokenizerFast"},{local:"transformers.BatchEncoding",title:"BatchEncoding"}],title:"Tokenizer"};function pv(pe){return sv(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bv extends tv{constructor(y){super();ov(this,y,pv,lv,nv,{})}}export{bv as default,hv as metadata};
