Buckets:
| import{s as ct,o as pt,n as G}from"../chunks/scheduler.7c59faff.js";import{S as dt,i as mt,e as g,s as c,c as k,h as ft,a as $,d,b as p,f as de,g as v,j as me,k as i,l as T,m as w,t as x,n as C,o as _,p as M}from"../chunks/index.09bb5655.js";import{C as ut,H as ue,E as gt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.1fbbab81.js";import{D as ke}from"../chunks/Docstring.6794b142.js";import{C as ge}from"../chunks/CodeBlock.73acbedb.js";import{T as $t,M as Ae}from"../chunks/TokenizersLanguageContent.0fc17a7a.js";import{E as fe}from"../chunks/ExampleCodeBlock.cd3055e5.js";function ht(b){let e,l="Example:",t,n,a;return n=new ge({props:{code:"ZnJvbSUyMHRva2VuaXplcnMucHJvY2Vzc29ycyUyMGltcG9ydCUyMEJlcnRQcm9jZXNzaW5nJTBBcHJvY2Vzc29yJTIwJTNEJTIwQmVydFByb2Nlc3NpbmcoKCUyMiU1QlNFUCU1RCUyMiUyQyUyMDEwMiklMkMlMjAoJTIyJTVCQ0xTJTVEJTIyJTJDJTIwMTAxKSklMEFwcm9jZXNzb3IucHJvY2VzcyhlbmNvZGluZyk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> tokenizers.processors <span class="hljs-keyword">import</span> BertProcessing | |
| <span class="hljs-meta">>>> </span>processor = BertProcessing((<span class="hljs-string">"[SEP]"</span>, <span class="hljs-number">102</span>), (<span class="hljs-string">"[CLS]"</span>, <span class="hljs-number">101</span>)) | |
| <span class="hljs-meta">>>> </span>processor.process(encoding) | |
| <span class="hljs-comment"># Encoding with [CLS] at start and [SEP] at end</span>`,lang:"python",wrap:!1}}),{c(){e=g("p"),e.textContent=l,t=c(),k(n.$$.fragment)},l(s){e=$(s,"P",{"data-svelte-h":!0}),M(e)!=="svelte-11lpom8"&&(e.textContent=l),t=p(s),v(n.$$.fragment,s)},m(s,y){T(s,e,y),T(s,t,y),w(n,s,y),a=!0},p:G,i(s){a||(x(n.$$.fragment,s),a=!0)},o(s){C(n.$$.fragment,s),a=!1},d(s){s&&(d(e),d(t)),_(n,s)}}}function Tt(b){let e,l="Example:",t,n,a;return n=new ge({props:{code:"ZnJvbSUyMHRva2VuaXplcnMucHJvY2Vzc29ycyUyMGltcG9ydCUyMEJ5dGVMZXZlbCUwQXByb2Nlc3NvciUyMCUzRCUyMEJ5dGVMZXZlbCh0cmltX29mZnNldHMlM0RUcnVlKSUwQSUyMyUyME9mZnNldHMlMjB3aWxsJTIwYmUlMjB0cmltbWVkJTIwdG8lMjBleGNsdWRlJTIwbGVhZGluZyUyMHdoaXRlc3BhY2UlMjBieXRlcw==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> tokenizers.processors <span class="hljs-keyword">import</span> ByteLevel | |
| <span class="hljs-meta">>>> </span>processor = ByteLevel(trim_offsets=<span class="hljs-literal">True</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Offsets will be trimmed to exclude leading whitespace bytes</span>`,lang:"python",wrap:!1}}),{c(){e=g("p"),e.textContent=l,t=c(),k(n.$$.fragment)},l(s){e=$(s,"P",{"data-svelte-h":!0}),M(e)!=="svelte-11lpom8"&&(e.textContent=l),t=p(s),v(n.$$.fragment,s)},m(s,y){T(s,e,y),T(s,t,y),w(n,s,y),a=!0},p:G,i(s){a||(x(n.$$.fragment,s),a=!0)},o(s){C(n.$$.fragment,s),a=!1},d(s){s&&(d(e),d(t)),_(n,s)}}}function yt(b){let e,l="Example:",t,n,a;return n=new ge({props:{code:"ZnJvbSUyMHRva2VuaXplcnMucHJvY2Vzc29ycyUyMGltcG9ydCUyMFJvYmVydGFQcm9jZXNzaW5nJTBBcHJvY2Vzc29yJTIwJTNEJTIwUm9iZXJ0YVByb2Nlc3NpbmcoKCUyMiUzQyUyRnMlM0UlMjIlMkMlMjAyKSUyQyUyMCglMjIlM0NzJTNFJTIyJTJDJTIwMCkpJTBBcHJvY2Vzc29yLnByb2Nlc3MoZW5jb2Rpbmcp",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> tokenizers.processors <span class="hljs-keyword">import</span> RobertaProcessing | |
| <span class="hljs-meta">>>> </span>processor = RobertaProcessing((<span class="hljs-string">"</s>"</span>, <span class="hljs-number">2</span>), (<span class="hljs-string">"<s>"</span>, <span class="hljs-number">0</span>)) | |
| <span class="hljs-meta">>>> </span>processor.process(encoding) | |
| <span class="hljs-comment"># Encoding with <s> at start and </s> at end</span>`,lang:"python",wrap:!1}}),{c(){e=g("p"),e.textContent=l,t=c(),k(n.$$.fragment)},l(s){e=$(s,"P",{"data-svelte-h":!0}),M(e)!=="svelte-11lpom8"&&(e.textContent=l),t=p(s),v(n.$$.fragment,s)},m(s,y){T(s,e,y),T(s,t,y),w(n,s,y),a=!0},p:G,i(s){a||(x(n.$$.fragment,s),a=!0)},o(s){C(n.$$.fragment,s),a=!1},d(s){s&&(d(e),d(t)),_(n,s)}}}function Mt(b){let e,l="With the type ids as following:",t,n,a;return n=new ge({props:{code:"JTVCQ0xTJTVEJTIwJTIwJTIwLi4uJTIwJTIwJTIwJTVCU0VQJTVEJTIwJTIwJTIwLi4uJTIwJTIwJTIwJTVCU0VQJTVEJTBBMCUyMCUyMCUyMCUyMCUyMCUyMDAlMjAlMjAlMjAlMjAlMjAlMjAwJTIwJTIwJTIwJTIwJTIwJTIwMSUyMCUyMCUyMCUyMCUyMCUyMDE=",highlighted:`[CLS] ... [SEP] ... [SEP] | |
| <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span>`,lang:"python",wrap:!1}}),{c(){e=g("p"),e.textContent=l,t=c(),k(n.$$.fragment)},l(s){e=$(s,"P",{"data-svelte-h":!0}),M(e)!=="svelte-tdrlp0"&&(e.textContent=l),t=p(s),v(n.$$.fragment,s)},m(s,y){T(s,e,y),T(s,t,y),w(n,s,y),a=!0},p:G,i(s){a||(x(n.$$.fragment,s),a=!0)},o(s){C(n.$$.fragment,s),a=!1},d(s){s&&(d(e),d(t)),_(n,s)}}}function kt(b){let e,l="You can achieve such behavior using a TemplateProcessing:",t,n,a;return n=new ge({props:{code:"VGVtcGxhdGVQcm9jZXNzaW5nKCUwQSUyMCUyMCUyMCUyMHNpbmdsZSUzRCUyMiU1QkNMUyU1RCUyMCUyNDAlMjAlNUJTRVAlNUQlMjIlMkMlMEElMjAlMjAlMjAlMjBwYWlyJTNEJTIyJTVCQ0xTJTVEJTIwJTI0QSUyMCU1QlNFUCU1RCUyMCUyNEIlM0ExJTIwJTVCU0VQJTVEJTNBMSUyMiUyQyUwQSUyMCUyMCUyMCUyMHNwZWNpYWxfdG9rZW5zJTNEJTVCKCUyMiU1QkNMUyU1RCUyMiUyQyUyMDEpJTJDJTIwKCUyMiU1QlNFUCU1RCUyMiUyQyUyMDApJTVEJTJDJTBBKQ==",highlighted:`TemplateProcessing( | |
| single=<span class="hljs-string">"[CLS] $0 [SEP]"</span>, | |
| pair=<span class="hljs-string">"[CLS] $A [SEP] $B:1 [SEP]:1"</span>, | |
| special_tokens=[(<span class="hljs-string">"[CLS]"</span>, <span class="hljs-number">1</span>), (<span class="hljs-string">"[SEP]"</span>, <span class="hljs-number">0</span>)], | |
| )`,lang:"python",wrap:!1}}),{c(){e=g("p"),e.textContent=l,t=c(),k(n.$$.fragment)},l(s){e=$(s,"P",{"data-svelte-h":!0}),M(e)!=="svelte-1qw3em7"&&(e.textContent=l),t=p(s),v(n.$$.fragment,s)},m(s,y){T(s,e,y),T(s,t,y),w(n,s,y),a=!0},p:G,i(s){a||(x(n.$$.fragment,s),a=!0)},o(s){C(n.$$.fragment,s),a=!1},d(s){s&&(d(e),d(t)),_(n,s)}}}function vt(b){let e,l,t,n,a,s,y=`This post-processor takes care of adding the special tokens needed by | |
| a Bert model:`,S,U,q="<li>a SEP token</li> <li>a CLS token</li>",z,J,I,j,r,h,B,ve,W,Qe="This post-processor takes care of trimming the offsets.",we,Y,De=`By default, the ByteLevel BPE might include whitespaces in the produced tokens. If you don’t | |
| want the offsets to include these whitespaces, then this PostProcessor must be used.`,xe,H,$e,A,he,P,Q,Ce,X,Ze=`This post-processor takes care of adding the special tokens needed by | |
| a Roberta model:`,_e,F,Ge="<li>a SEP token</li> <li>a CLS token</li>",be,K,We=`It also takes care of trimming the offsets. | |
| By default, the ByteLevel BPE might include whitespaces in the produced tokens. If you don’t | |
| want the offsets to include these whitespaces, then this PostProcessor should be initialized | |
| with <code>trim_offsets=True</code>`,Ue,V,Te,D,ye,m,Z,Pe,O,Ye=`Provides a way to specify templates in order to add the special tokens to each | |
| input sequence as relevant.`,Je,ee,Xe=`Let’s take <code>BERT</code> tokenizer as an example. It uses two special tokens, used to | |
| delimitate each sequence. <code>[CLS]</code> is always used at the beginning of the first | |
| sequence, and <code>[SEP]</code> is added at the end of both the first, and the pair | |
| sequences. The final result looks like this:`,Le,te,Fe="<li>Single sequence: <code>[CLS] Hello there [SEP]</code></li> <li>Pair sequences: <code>[CLS] My name is Anthony [SEP] What is my name? [SEP]</code></li>",je,N,ze,R,Ee,se,Ke=`In this example, each input sequence is identified using a <code>$</code> construct. This identifier | |
| lets us specify each input sequence, and the type_id to use. When nothing is specified, | |
| it uses the default values. Here are the different ways to specify it:`,Ie,ne,Oe="<li>Specifying the sequence, with default <code>type_id == 0</code>: <code>$A</code> or <code>$B</code></li> <li>Specifying the <em>type_id</em> with default <code>sequence == A</code>: <code>$0</code>, <code>$1</code>, <code>$2</code>, …</li> <li>Specifying both: <code>$A:0</code>, <code>$B:1</code>, …</li>",Be,oe,et="The same construct is used for special tokens: <code><identifier>(:<type_id>)?</code>.",Se,re,tt=`<strong>Warning</strong>: You must ensure that you are giving the correct tokens/ids as these | |
| will be added to the Encoding without any further check. If the given ids correspond | |
| to something totally different in a <em>Tokenizer</em> using this <em>PostProcessor</em>, it | |
| might lead to unexpected results.`,He,le,st="Types:",Ve,ae,nt="Template (<code>str</code> or <code>List</code>):",Ne,ie,ot="<li>If a <code>str</code> is provided, the whitespace is used as delimiter between tokens</li> <li>If a <code>List[str]</code> is provided, a list of tokens</li>",Re,ce,rt="Tokens (<code>List[Union[Tuple[int, str], Tuple[str, int], dict]]</code>):",qe,pe,lt=`<li><p>A <code>Tuple</code> with both a token and its associated ID, in any order</p></li> <li><p>A <code>dict</code> with the following keys:</p> <ul><li>“id”: <code>str</code> => The special token id, as specified in the Template</li> <li>“ids”: <code>List[int]</code> => The associated IDs</li> <li>“tokens”: <code>List[str]</code> => The associated tokens</li></ul> <p>The given dict expects the provided <code>ids</code> and <code>tokens</code> lists to have | |
| the same length.</p></li>`,Me;return e=new ue({props:{title:"BertProcessing",local:"tokenizers.processors.BertProcessing",headingTag:"h2"}}),n=new ke({props:{name:"class tokenizers.processors.BertProcessing",anchor:"tokenizers.processors.BertProcessing",parameters:"",parametersDescription:[{anchor:"tokenizers.processors.BertProcessing.sep",description:`<strong>sep</strong> (<code>Tuple[str, int]</code>) — | |
| A tuple with the string representation of the SEP token, and its id`,name:"sep"},{anchor:"tokenizers.processors.BertProcessing.cls",description:`<strong>cls</strong> (<code>Tuple[str, int]</code>) — | |
| A tuple with the string representation of the CLS token, and its id`,name:"cls"}]}}),J=new fe({props:{anchor:"tokenizers.processors.BertProcessing.example",$$slots:{default:[ht]},$$scope:{ctx:b}}}),j=new ue({props:{title:"ByteLevel",local:"tokenizers.processors.ByteLevel",headingTag:"h2"}}),B=new ke({props:{name:"class tokenizers.processors.ByteLevel",anchor:"tokenizers.processors.ByteLevel",parameters:[{name:"add_prefix_space",val:" = None"},{name:"trim_offsets",val:" = None"},{name:"use_regex",val:" = None"}],parametersDescription:[{anchor:"tokenizers.processors.ByteLevel.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>) — | |
| Whether to trim the whitespaces from the produced offsets.`,name:"trim_offsets"},{anchor:"tokenizers.processors.ByteLevel.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| If <code>True</code>, keeps the first token’s offset as is. If <code>False</code>, increments | |
| the start of the first token’s offset by 1. Only has an effect if <code>trim_offsets</code> | |
| is set to <code>True</code>.`,name:"add_prefix_space"}]}}),H=new fe({props:{anchor:"tokenizers.processors.ByteLevel.example",$$slots:{default:[Tt]},$$scope:{ctx:b}}}),A=new ue({props:{title:"RobertaProcessing",local:"tokenizers.processors.RobertaProcessing",headingTag:"h2"}}),Q=new ke({props:{name:"class tokenizers.processors.RobertaProcessing",anchor:"tokenizers.processors.RobertaProcessing",parameters:[{name:"sep",val:""},{name:"cls_token",val:""},{name:"trim_offsets",val:" = True"},{name:"add_prefix_space",val:" = True"}],parametersDescription:[{anchor:"tokenizers.processors.RobertaProcessing.sep",description:`<strong>sep</strong> (<code>Tuple[str, int]</code>) — | |
| A tuple with the string representation of the SEP token, and its id`,name:"sep"},{anchor:"tokenizers.processors.RobertaProcessing.cls",description:`<strong>cls</strong> (<code>Tuple[str, int]</code>) — | |
| A tuple with the string representation of the CLS token, and its id`,name:"cls"},{anchor:"tokenizers.processors.RobertaProcessing.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to trim the whitespaces from the produced offsets.`,name:"trim_offsets"},{anchor:"tokenizers.processors.RobertaProcessing.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether the add_prefix_space option was enabled during pre-tokenization. This | |
| is relevant because it defines the way the offsets are trimmed out.`,name:"add_prefix_space"}]}}),V=new fe({props:{anchor:"tokenizers.processors.RobertaProcessing.example",$$slots:{default:[yt]},$$scope:{ctx:b}}}),D=new ue({props:{title:"TemplateProcessing",local:"tokenizers.processors.TemplateProcessing",headingTag:"h2"}}),Z=new ke({props:{name:"class tokenizers.processors.TemplateProcessing",anchor:"tokenizers.processors.TemplateProcessing",parameters:[{name:"single",val:" = None"},{name:"pair",val:" = None"},{name:"special_tokens",val:" = None"}],parametersDescription:[{anchor:"tokenizers.processors.TemplateProcessing.single",description:`<strong>single</strong> (<code>Template</code>) — | |
| The template used for single sequences`,name:"single"},{anchor:"tokenizers.processors.TemplateProcessing.pair",description:`<strong>pair</strong> (<code>Template</code>) — | |
| The template used when both sequences are specified`,name:"pair"},{anchor:"tokenizers.processors.TemplateProcessing.special_tokens",description:`<strong>special_tokens</strong> (<code>Tokens</code>) — | |
| The list of special tokens used in each sequences`,name:"special_tokens"}]}}),N=new fe({props:{anchor:"tokenizers.processors.TemplateProcessing.example",$$slots:{default:[Mt]},$$scope:{ctx:b}}}),R=new fe({props:{anchor:"tokenizers.processors.TemplateProcessing.example-2",$$slots:{default:[kt]},$$scope:{ctx:b}}}),{c(){k(e.$$.fragment),l=c(),t=g("div"),k(n.$$.fragment),a=c(),s=g("p"),s.textContent=y,S=c(),U=g("ul"),U.innerHTML=q,z=c(),k(J.$$.fragment),I=c(),k(j.$$.fragment),r=c(),h=g("div"),k(B.$$.fragment),ve=c(),W=g("p"),W.textContent=Qe,we=c(),Y=g("p"),Y.textContent=De,xe=c(),k(H.$$.fragment),$e=c(),k(A.$$.fragment),he=c(),P=g("div"),k(Q.$$.fragment),Ce=c(),X=g("p"),X.textContent=Ze,_e=c(),F=g("ul"),F.innerHTML=Ge,be=c(),K=g("p"),K.innerHTML=We,Ue=c(),k(V.$$.fragment),Te=c(),k(D.$$.fragment),ye=c(),m=g("div"),k(Z.$$.fragment),Pe=c(),O=g("p"),O.textContent=Ye,Je=c(),ee=g("p"),ee.innerHTML=Xe,Le=c(),te=g("ul"),te.innerHTML=Fe,je=c(),k(N.$$.fragment),ze=c(),k(R.$$.fragment),Ee=c(),se=g("p"),se.innerHTML=Ke,Ie=c(),ne=g("ul"),ne.innerHTML=Oe,Be=c(),oe=g("p"),oe.innerHTML=et,Se=c(),re=g("p"),re.innerHTML=tt,He=c(),le=g("p"),le.textContent=st,Ve=c(),ae=g("p"),ae.innerHTML=nt,Ne=c(),ie=g("ul"),ie.innerHTML=ot,Re=c(),ce=g("p"),ce.innerHTML=rt,qe=c(),pe=g("ul"),pe.innerHTML=lt,this.h()},l(o){v(e.$$.fragment,o),l=p(o),t=$(o,"DIV",{class:!0});var f=de(t);v(n.$$.fragment,f),a=p(f),s=$(f,"P",{"data-svelte-h":!0}),M(s)!=="svelte-j5l3j3"&&(s.textContent=y),S=p(f),U=$(f,"UL",{"data-svelte-h":!0}),M(U)!=="svelte-19nfwue"&&(U.innerHTML=q),z=p(f),v(J.$$.fragment,f),f.forEach(d),I=p(o),v(j.$$.fragment,o),r=p(o),h=$(o,"DIV",{class:!0});var E=de(h);v(B.$$.fragment,E),ve=p(E),W=$(E,"P",{"data-svelte-h":!0}),M(W)!=="svelte-1pew3nx"&&(W.textContent=Qe),we=p(E),Y=$(E,"P",{"data-svelte-h":!0}),M(Y)!=="svelte-18el03w"&&(Y.textContent=De),xe=p(E),v(H.$$.fragment,E),E.forEach(d),$e=p(o),v(A.$$.fragment,o),he=p(o),P=$(o,"DIV",{class:!0});var L=de(P);v(Q.$$.fragment,L),Ce=p(L),X=$(L,"P",{"data-svelte-h":!0}),M(X)!=="svelte-13xluxv"&&(X.textContent=Ze),_e=p(L),F=$(L,"UL",{"data-svelte-h":!0}),M(F)!=="svelte-19nfwue"&&(F.innerHTML=Ge),be=p(L),K=$(L,"P",{"data-svelte-h":!0}),M(K)!=="svelte-5hdvuy"&&(K.innerHTML=We),Ue=p(L),v(V.$$.fragment,L),L.forEach(d),Te=p(o),v(D.$$.fragment,o),ye=p(o),m=$(o,"DIV",{class:!0});var u=de(m);v(Z.$$.fragment,u),Pe=p(u),O=$(u,"P",{"data-svelte-h":!0}),M(O)!=="svelte-17j0bbk"&&(O.textContent=Ye),Je=p(u),ee=$(u,"P",{"data-svelte-h":!0}),M(ee)!=="svelte-1jzrjo"&&(ee.innerHTML=Xe),Le=p(u),te=$(u,"UL",{"data-svelte-h":!0}),M(te)!=="svelte-bbb8xt"&&(te.innerHTML=Fe),je=p(u),v(N.$$.fragment,u),ze=p(u),v(R.$$.fragment,u),Ee=p(u),se=$(u,"P",{"data-svelte-h":!0}),M(se)!=="svelte-1px755u"&&(se.innerHTML=Ke),Ie=p(u),ne=$(u,"UL",{"data-svelte-h":!0}),M(ne)!=="svelte-1jv5met"&&(ne.innerHTML=Oe),Be=p(u),oe=$(u,"P",{"data-svelte-h":!0}),M(oe)!=="svelte-1h9guxl"&&(oe.innerHTML=et),Se=p(u),re=$(u,"P",{"data-svelte-h":!0}),M(re)!=="svelte-svd9p0"&&(re.innerHTML=tt),He=p(u),le=$(u,"P",{"data-svelte-h":!0}),M(le)!=="svelte-19y9q03"&&(le.textContent=st),Ve=p(u),ae=$(u,"P",{"data-svelte-h":!0}),M(ae)!=="svelte-fxju4z"&&(ae.innerHTML=nt),Ne=p(u),ie=$(u,"UL",{"data-svelte-h":!0}),M(ie)!=="svelte-hg8fj8"&&(ie.innerHTML=ot),Re=p(u),ce=$(u,"P",{"data-svelte-h":!0}),M(ce)!=="svelte-150u5tp"&&(ce.innerHTML=rt),qe=p(u),pe=$(u,"UL",{"data-svelte-h":!0}),M(pe)!=="svelte-1xe1sl4"&&(pe.innerHTML=lt),u.forEach(d),this.h()},h(){me(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),me(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),me(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),me(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,f){w(e,o,f),T(o,l,f),T(o,t,f),w(n,t,null),i(t,a),i(t,s),i(t,S),i(t,U),i(t,z),w(J,t,null),T(o,I,f),w(j,o,f),T(o,r,f),T(o,h,f),w(B,h,null),i(h,ve),i(h,W),i(h,we),i(h,Y),i(h,xe),w(H,h,null),T(o,$e,f),w(A,o,f),T(o,he,f),T(o,P,f),w(Q,P,null),i(P,Ce),i(P,X),i(P,_e),i(P,F),i(P,be),i(P,K),i(P,Ue),w(V,P,null),T(o,Te,f),w(D,o,f),T(o,ye,f),T(o,m,f),w(Z,m,null),i(m,Pe),i(m,O),i(m,Je),i(m,ee),i(m,Le),i(m,te),i(m,je),w(N,m,null),i(m,ze),w(R,m,null),i(m,Ee),i(m,se),i(m,Ie),i(m,ne),i(m,Be),i(m,oe),i(m,Se),i(m,re),i(m,He),i(m,le),i(m,Ve),i(m,ae),i(m,Ne),i(m,ie),i(m,Re),i(m,ce),i(m,qe),i(m,pe),Me=!0},p(o,f){const E={};f&2&&(E.$$scope={dirty:f,ctx:o}),J.$set(E);const L={};f&2&&(L.$$scope={dirty:f,ctx:o}),H.$set(L);const u={};f&2&&(u.$$scope={dirty:f,ctx:o}),V.$set(u);const at={};f&2&&(at.$$scope={dirty:f,ctx:o}),N.$set(at);const it={};f&2&&(it.$$scope={dirty:f,ctx:o}),R.$set(it)},i(o){Me||(x(e.$$.fragment,o),x(n.$$.fragment,o),x(J.$$.fragment,o),x(j.$$.fragment,o),x(B.$$.fragment,o),x(H.$$.fragment,o),x(A.$$.fragment,o),x(Q.$$.fragment,o),x(V.$$.fragment,o),x(D.$$.fragment,o),x(Z.$$.fragment,o),x(N.$$.fragment,o),x(R.$$.fragment,o),Me=!0)},o(o){C(e.$$.fragment,o),C(n.$$.fragment,o),C(J.$$.fragment,o),C(j.$$.fragment,o),C(B.$$.fragment,o),C(H.$$.fragment,o),C(A.$$.fragment,o),C(Q.$$.fragment,o),C(V.$$.fragment,o),C(D.$$.fragment,o),C(Z.$$.fragment,o),C(N.$$.fragment,o),C(R.$$.fragment,o),Me=!1},d(o){o&&(d(l),d(t),d(I),d(r),d(h),d($e),d(he),d(P),d(Te),d(ye),d(m)),_(e,o),_(n),_(J),_(j,o),_(B),_(H),_(A,o),_(Q),_(V),_(D,o),_(Z),_(N),_(R)}}}function wt(b){let e,l;return e=new Ae({props:{$$slots:{default:[vt]},$$scope:{ctx:b}}}),{c(){k(e.$$.fragment)},l(t){v(e.$$.fragment,t)},m(t,n){w(e,t,n),l=!0},p(t,n){const a={};n&2&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){l||(x(e.$$.fragment,t),l=!0)},o(t){C(e.$$.fragment,t),l=!1},d(t){_(e,t)}}}function xt(b){let e,l='The Rust API Reference is available directly on the <a href="https://docs.rs/tokenizers/latest/tokenizers/" rel="nofollow">Docs.rs</a> website.';return{c(){e=g("p"),e.innerHTML=l},l(t){e=$(t,"P",{"data-svelte-h":!0}),M(e)!=="svelte-4ytcyb"&&(e.innerHTML=l)},m(t,n){T(t,e,n)},p:G,d(t){t&&d(e)}}}function Ct(b){let e,l;return e=new Ae({props:{$$slots:{default:[xt]},$$scope:{ctx:b}}}),{c(){k(e.$$.fragment)},l(t){v(e.$$.fragment,t)},m(t,n){w(e,t,n),l=!0},p(t,n){const a={};n&2&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){l||(x(e.$$.fragment,t),l=!0)},o(t){C(e.$$.fragment,t),l=!1},d(t){_(e,t)}}}function _t(b){let e,l="The node API has not been documented yet.";return{c(){e=g("p"),e.textContent=l},l(t){e=$(t,"P",{"data-svelte-h":!0}),M(e)!=="svelte-1mrchm6"&&(e.textContent=l)},m(t,n){T(t,e,n)},p:G,d(t){t&&d(e)}}}function bt(b){let e,l;return e=new Ae({props:{$$slots:{default:[_t]},$$scope:{ctx:b}}}),{c(){k(e.$$.fragment)},l(t){v(e.$$.fragment,t)},m(t,n){w(e,t,n),l=!0},p(t,n){const a={};n&2&&(a.$$scope={dirty:n,ctx:t}),e.$set(a)},i(t){l||(x(e.$$.fragment,t),l=!0)},o(t){C(e.$$.fragment,t),l=!1},d(t){_(e,t)}}}function Ut(b){let e,l,t,n,a,s,y,S,U,q,z,J,I,j;return a=new ut({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),y=new ue({props:{title:"Post-processors",local:"post-processors",headingTag:"h1"}}),U=new $t({props:{python:!0,rust:!0,node:!0,$$slots:{node:[bt],rust:[Ct],python:[wt]},$$scope:{ctx:b}}}),z=new gt({props:{source:"https://github.com/huggingface/tokenizers/blob/main/docs/source-doc-builder/api/post-processors.mdx"}}),{c(){e=g("meta"),l=c(),t=g("p"),n=c(),k(a.$$.fragment),s=c(),k(y.$$.fragment),S=c(),k(U.$$.fragment),q=c(),k(z.$$.fragment),J=c(),I=g("p"),this.h()},l(r){const h=ft("svelte-u9bgzb",document.head);e=$(h,"META",{name:!0,content:!0}),h.forEach(d),l=p(r),t=$(r,"P",{}),de(t).forEach(d),n=p(r),v(a.$$.fragment,r),s=p(r),v(y.$$.fragment,r),S=p(r),v(U.$$.fragment,r),q=p(r),v(z.$$.fragment,r),J=p(r),I=$(r,"P",{}),de(I).forEach(d),this.h()},h(){me(e,"name","hf:doc:metadata"),me(e,"content",Pt)},m(r,h){i(document.head,e),T(r,l,h),T(r,t,h),T(r,n,h),w(a,r,h),T(r,s,h),w(y,r,h),T(r,S,h),w(U,r,h),T(r,q,h),w(z,r,h),T(r,J,h),T(r,I,h),j=!0},p(r,[h]){const B={};h&2&&(B.$$scope={dirty:h,ctx:r}),U.$set(B)},i(r){j||(x(a.$$.fragment,r),x(y.$$.fragment,r),x(U.$$.fragment,r),x(z.$$.fragment,r),j=!0)},o(r){C(a.$$.fragment,r),C(y.$$.fragment,r),C(U.$$.fragment,r),C(z.$$.fragment,r),j=!1},d(r){r&&(d(l),d(t),d(n),d(s),d(S),d(q),d(J),d(I)),d(e),_(a,r),_(y,r),_(U,r),_(z,r)}}}const Pt='{"title":"Post-processors","local":"post-processors","sections":[{"title":"BertProcessing","local":"tokenizers.processors.BertProcessing","sections":[],"depth":2},{"title":"ByteLevel","local":"tokenizers.processors.ByteLevel","sections":[],"depth":2},{"title":"RobertaProcessing","local":"tokenizers.processors.RobertaProcessing","sections":[],"depth":2},{"title":"TemplateProcessing","local":"tokenizers.processors.TemplateProcessing","sections":[],"depth":2}],"depth":1}';function Jt(b){return pt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ht extends dt{constructor(e){super(),mt(this,e,Jt,Ut,ct,{})}}export{Ht as component}; | |
Xet Storage Details
- Size:
- 22.9 kB
- Xet hash:
- 593f8cc9e5e7dd47fd7b34843fb283087c90c157c18716defa56980b16278074
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.