import{s as Gt,o as Xt,n as Rt}from"../chunks/scheduler.9bc65507.js";import{S as Wt,i as Et,g as a,s as l,u as y,A as Nt,h as o,f as t,c as i,j as g,v as b,y as d,k as p,o as r,a as s,w as _,d as v,t as w,x as k}from"../chunks/index.78c82d43.js";import{T as Ft}from"../chunks/Tip.87d55b76.js";import{D as at}from"../chunks/Docstring.4e7352e2.js";import{C as ot}from"../chunks/CodeBlock.73e038be.js";import{I as Ae}from"../chunks/IconCopyLink.bedaa44d.js";function $t(ye){let h,B="This model is in maintenance mode only, so we won’t accept any new PRs changing its code.",M,f,T=`If you run into any issues running this model, please reinstall the last version that supported this model: v4.30.0.
You can do so by running the following command: <code>pip install -U transformers==4.30.0</code>.`;return{c(){h=a("p"),h.textContent=B,M=l(),f=a("p"),f.innerHTML=T},l(m){h=o(m,"P",{"data-svelte-h":!0}),d(h)!=="svelte-lwu440"&&(h.textContent=B),M=i(m),f=o(m,"P",{"data-svelte-h":!0}),d(f)!=="svelte-4042uy"&&(f.innerHTML=T)},m(m,x){s(m,h,x),s(m,M,x),s(m,f,x)},p:Rt,d(m){m&&(t(h),t(M),t(f))}}}function At(ye){let h,B,M,f,T,m,x,G,Se,ne,st="TAPEX",be,U,_e,j,C,he,X,Ve,ae,rt="Overview",ve,R,lt=`The TAPEX model was proposed in <a href="https://arxiv.org/abs/2107.07653" rel="nofollow">TAPEX: Table Pre-training via Learning a Neural SQL Executor</a> by Qian Liu,
Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, Jian-Guang Lou. TAPEX pre-trains a BART model to solve synthetic SQL queries, after
which it can be fine-tuned to answer natural language questions related to tabular data, as well as performing table fact checking.`,we,W,it="TAPEX has been fine-tuned on several datasets:",ke,E,ct='<li><a href="https://www.microsoft.com/en-us/download/details.aspx?id=54253" rel="nofollow">SQA</a> (Sequential Question Answering by Microsoft)</li> <li><a href="https://github.com/ppasupat/WikiTableQuestions" rel="nofollow">WTQ</a> (Wiki Table Questions by Stanford University)</li> <li><a href="https://github.com/salesforce/WikiSQL" rel="nofollow">WikiSQL</a> (by Salesforce)</li> <li><a href="https://tabfact.github.io/" rel="nofollow">TabFact</a> (by USCB NLP Lab).</li>',Me,N,dt="The abstract from the paper is the following:",xe,F,pt=`<em>Recent progress in language model pre-training has achieved a great success via leveraging large-scale unstructured textual data. However, it is
still a challenge to apply pre-training on structured tabular data due to the absence of large-scale high-quality tabular data. In this paper, we
propose TAPEX to show that table pre-training can be achieved by learning a neural SQL executor over a synthetic corpus, which is obtained by automatically
synthesizing executable SQL queries and their execution outputs. TAPEX addresses the data scarcity challenge via guiding the language model to mimic a SQL
executor on the diverse, large-scale and high-quality synthetic corpus. We evaluate TAPEX on four benchmark datasets. Experimental results demonstrate that
TAPEX outperforms previous table pre-training approaches by a large margin and achieves new state-of-the-art results on all of them. This includes improvements
on the weakly-supervised WikiSQL denotation accuracy to 89.5% (+2.3%), the WikiTableQuestions denotation accuracy to 57.5% (+4.8%), the SQA denotation accuracy
to 74.5% (+3.5%), and the TabFact accuracy to 84.2% (+3.2%). To our knowledge, this is the first work to exploit table pre-training via synthetic executable programs
and to achieve new state-of-the-art results on various downstream tasks.</em>`,je,$,mt="Tips:",Je,A,ut=`<li>TAPEX is a generative (seq2seq) model. One can directly plug in the weights of TAPEX into a BART model.</li> <li>TAPEX has checkpoints on the hub that are either pre-trained only, or fine-tuned on WTQ, SQA, WikiSQL and TabFact.</li> <li>Sentences + tables are presented to the model as <code>sentence + &quot; &quot; + linearized table</code>. The linearized table has the following format:
<code>col: col1 | col2 | col 3 row 1 : val1 | val2 | val3 row 2 : ...</code>.</li> <li>TAPEX has its own tokenizer, that allows to prepare all data for the model easily. One can pass Pandas DataFrames and strings to the tokenizer,
and it will automatically create the <code>input_ids</code> and <code>attention_mask</code> (as shown in the usage examples below).</li>`,qe,J,I,ge,S,Pe,oe,ht="Usage: inference",Ue,V,gt=`Below, we illustrate how to use TAPEX for table question answering. As one can see, one can directly plug in the weights of TAPEX into a BART model.
We use the <a href="auto">Auto API</a>, which will automatically instantiate the appropriate tokenizer (<a href="/docs/transformers/v4.34.0/en/model_doc/tapex#transformers.TapexTokenizer">TapexTokenizer</a>) and model (<a href="/docs/transformers/v4.34.0/en/model_doc/bart#transformers.BartForConditionalGeneration">BartForConditionalGeneration</a>) for us,
based on the configuration file of the checkpoint on the hub.`,Ce,P,Ie,Q,ft=`Note that <a href="/docs/transformers/v4.34.0/en/model_doc/tapex#transformers.TapexTokenizer">TapexTokenizer</a> also supports batched inference. Hence, one can provide a batch of different tables/questions, or a batch of a single table
and multiple questions, or a batch of a single query and multiple tables. Let’s illustrate this:`,ze,Y,Ze,L,Tt=`In case one wants to do table verification (i.e. the task of determining whether a given sentence is supported or refuted by the contents
of a table), one can instantiate a <a href="/docs/transformers/v4.34.0/en/model_doc/bart#transformers.BartForSequenceClassification">BartForSequenceClassification</a> model. TAPEX has checkpoints on the hub fine-tuned on TabFact, an important
benchmark for table fact checking (it achieves 84% accuracy). The code example below again leverages the <a href="auto">Auto API</a>.`,Be,H,Ge,q,z,fe,D,Qe,se,yt="TapexTokenizer",Xe,c,O,Ye,re,bt="Construct a TAPEX tokenizer. Based on byte-level Byte-Pair-Encoding (BPE).",Le,le,_t=`This tokenizer can be used to flatten one or more table(s) and concatenate them with one or more related sentences
to be used by TAPEX models. The format that the TAPEX tokenizer creates is the following:`,He,ie,vt="sentence col: col1 | col2 | col 3 row 1 : val1 | val2 | val3 row 2 : …",De,ce,wt=`The tokenizer supports a single table + single query, a single table and multiple queries (in which case the table
will be duplicated for every query), a single query and multiple tables (in which case the query will be duplicated
for every table), and multiple tables and queries. In other words, you can provide a batch of tables + questions to
the tokenizer for instance to prepare them for the model.`,Oe,de,kt="Tokenization itself is based on the BPE algorithm. It is identical to the one used by BART, RoBERTa and GPT-2.",Ke,pe,Mt=`This tokenizer inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,et,Z,K,tt,me,xt="Main method to tokenize and prepare for the model one or several table-sequence pair(s).",nt,ue,ee,Re,Te,We;return G=new Ae({}),U=new Ft({props:{warning:!0,$$slots:{default:[$t]},$$scope:{ctx:ye}}}),X=new Ae({}),S=new Ae({}),P=new ot({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXEyU2VxTE0lMEFpbXBvcnQlMjBwYW5kYXMlMjBhcyUyMHBkJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdGFwZXgtbGFyZ2UtZmluZXR1bmVkLXd0cSUyMiklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcTJTZXFMTS5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdGFwZXgtbGFyZ2UtZmluZXR1bmVkLXd0cSUyMiklMEElMEElMjMlMjBwcmVwYXJlJTIwdGFibGUlMjAlMkIlMjBxdWVzdGlvbiUwQWRhdGElMjAlM0QlMjAlN0IlMjJBY3RvcnMlMjIlM0ElMjAlNUIlMjJCcmFkJTIwUGl0dCUyMiUyQyUyMCUyMkxlb25hcmRvJTIwRGklMjBDYXByaW8lMjIlMkMlMjAlMjJHZW9yZ2UlMjBDbG9vbmV5JTIyJTVEJTJDJTIwJTIyTnVtYmVyJTIwb2YlMjBtb3ZpZXMlMjIlM0ElMjAlNUIlMjI4NyUyMiUyQyUyMCUyMjUzJTIyJTJDJTIwJTIyNjklMjIlNUQlN0QlMEF0YWJsZSUyMCUzRCUyMHBkLkRhdGFGcmFtZS5mcm9tX2RpY3QoZGF0YSklMEFxdWVzdGlvbiUyMCUzRCUyMCUyMmhvdyUyMG1hbnklMjBtb3ZpZXMlMjBkb2VzJTIwTGVvbmFyZG8lMjBEaSUyMENhcHJpbyUyMGhhdmUlM0YlMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplcih0YWJsZSUyQyUyMHF1ZXN0aW9uJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBsZXQlMjB0aGUlMjBtb2RlbCUyMGdlbmVyYXRlJTIwYW4lMjBhbnN3ZXIlMjBhdXRvcmVncmVzc2l2ZWx5JTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqZW5jb2RpbmcpJTBBJTBBJTIzJTIwZGVjb2RlJTIwYmFjayUyMHRvJTIwdGV4dCUwQXByZWRpY3RlZF9hbnN3ZXIlMjAlM0QlMjB0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKG91dHB1dHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVEJTBBcHJpbnQocHJlZGljdGVkX2Fuc3dlcik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSeq2SeqLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-wtq&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-wtq&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare table + question</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>data = {<span class="hljs-string">&quot;Actors&quot;</span>: [<span class="hljs-string">&quot;Brad Pitt&quot;</span>, <span class="hljs-string">&quot;Leonardo Di Caprio&quot;</span>, <span class="hljs-string">&quot;George Clooney&quot;</span>], <span class="hljs-string">&quot;Number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>]}
<span class="hljs-meta">&gt;&gt;&gt; </span>table = pd.DataFrame.from_dict(data)
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;how many movies does Leonardo Di Caprio have?&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(table, question, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let the model generate an answer autoregressively</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># decode back to text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_answer = tokenizer.batch_decode(outputs, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(predicted_answer)
<span class="hljs-number">53</span>`,wrap:!1}}),Y=new ot({props:{code:"JTIzJTIwcHJlcGFyZSUyMHRhYmxlJTIwJTJCJTIwcXVlc3Rpb24lMEFkYXRhJTIwJTNEJTIwJTdCJTIyQWN0b3JzJTIyJTNBJTIwJTVCJTIyQnJhZCUyMFBpdHQlMjIlMkMlMjAlMjJMZW9uYXJkbyUyMERpJTIwQ2FwcmlvJTIyJTJDJTIwJTIyR2VvcmdlJTIwQ2xvb25leSUyMiU1RCUyQyUyMCUyMk51bWJlciUyMG9mJTIwbW92aWVzJTIyJTNBJTIwJTVCJTIyODclMjIlMkMlMjAlMjI1MyUyMiUyQyUyMCUyMjY5JTIyJTVEJTdEJTBBdGFibGUlMjAlM0QlMjBwZC5EYXRhRnJhbWUuZnJvbV9kaWN0KGRhdGEpJTBBcXVlc3Rpb25zJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIyaG93JTIwbWFueSUyMG1vdmllcyUyMGRvZXMlMjBMZW9uYXJkbyUyMERpJTIwQ2FwcmlvJTIwaGF2ZSUzRiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMndoaWNoJTIwYWN0b3IlMjBoYXMlMjA2OSUyMG1vdmllcyUzRiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMndoYXQncyUyMHRoZSUyMGZpcnN0JTIwbmFtZSUyMG9mJTIwdGhlJTIwYWN0b3IlMjB3aG8lMjBoYXMlMjA4NyUyMG1vdmllcyUzRiUyMiUyQyUwQSU1RCUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKHRhYmxlJTJDJTIwcXVlc3Rpb25zJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMGxldCUyMHRoZSUyMG1vZGVsJTIwZ2VuZXJhdGUlMjBhbiUyMGFuc3dlciUyMGF1dG9yZWdyZXNzaXZlbHklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKiplbmNvZGluZyklMEElMEElMjMlMjBkZWNvZGUlMjBiYWNrJTIwdG8lMjB0ZXh0JTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShvdXRwdXRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare table + question</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>data = {<span class="hljs-string">&quot;Actors&quot;</span>: [<span class="hljs-string">&quot;Brad Pitt&quot;</span>, <span class="hljs-string">&quot;Leonardo Di Caprio&quot;</span>, <span class="hljs-string">&quot;George Clooney&quot;</span>], <span class="hljs-string">&quot;Number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>]}
<span class="hljs-meta">&gt;&gt;&gt; </span>table = pd.DataFrame.from_dict(data)
<span class="hljs-meta">&gt;&gt;&gt; </span>questions = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;how many movies does Leonardo Di Caprio have?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;which actor has 69 movies?&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;what&#x27;s the first name of the actor who has 87 movies?&quot;</span>,
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(table, questions, padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># let the model generate an answer autoregressively</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># decode back to text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(outputs, skip_special_tokens=<span class="hljs-literal">True</span>)
[<span class="hljs-string">&#x27; 53&#x27;</span>, <span class="hljs-string">&#x27; george clooney&#x27;</span>, <span class="hljs-string">&#x27; brad pitt&#x27;</span>]`,wrap:!1}}),H=new ot({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdGFwZXgtbGFyZ2UtZmluZXR1bmVkLXRhYmZhY3QlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ0YXBleC1sYXJnZS1maW5ldHVuZWQtdGFiZmFjdCUyMiklMEElMEElMjMlMjBwcmVwYXJlJTIwdGFibGUlMjAlMkIlMjBzZW50ZW5jZSUwQWRhdGElMjAlM0QlMjAlN0IlMjJBY3RvcnMlMjIlM0ElMjAlNUIlMjJCcmFkJTIwUGl0dCUyMiUyQyUyMCUyMkxlb25hcmRvJTIwRGklMjBDYXByaW8lMjIlMkMlMjAlMjJHZW9yZ2UlMjBDbG9vbmV5JTIyJTVEJTJDJTIwJTIyTnVtYmVyJTIwb2YlMjBtb3ZpZXMlMjIlM0ElMjAlNUIlMjI4NyUyMiUyQyUyMCUyMjUzJTIyJTJDJTIwJTIyNjklMjIlNUQlN0QlMEF0YWJsZSUyMCUzRCUyMHBkLkRhdGFGcmFtZS5mcm9tX2RpY3QoZGF0YSklMEFzZW50ZW5jZSUyMCUzRCUyMCUyMkdlb3JnZSUyMENsb29uZXklMjBoYXMlMjAzMCUyMG1vdmllcyUyMiUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKHRhYmxlJTJDJTIwc2VudGVuY2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMGZvcndhcmQlMjBwYXNzJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqZW5jb2RpbmcpJTBBJTBBJTIzJTIwcHJpbnQlMjBwcmVkaWN0aW9uJTBBcHJlZGljdGVkX2NsYXNzX2lkeCUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCMCU1RC5hcmdtYXgoZGltJTNEMCkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkeCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-tabfact&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/tapex-large-finetuned-tabfact&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare table + sentence</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>data = {<span class="hljs-string">&quot;Actors&quot;</span>: [<span class="hljs-string">&quot;Brad Pitt&quot;</span>, <span class="hljs-string">&quot;Leonardo Di Caprio&quot;</span>, <span class="hljs-string">&quot;George Clooney&quot;</span>], <span class="hljs-string">&quot;Number of movies&quot;</span>: [<span class="hljs-string">&quot;87&quot;</span>, <span class="hljs-string">&quot;53&quot;</span>, <span class="hljs-string">&quot;69&quot;</span>]}
<span class="hljs-meta">&gt;&gt;&gt; </span>table = pd.DataFrame.from_dict(data)
<span class="hljs-meta">&gt;&gt;&gt; </span>sentence = <span class="hljs-string">&quot;George Clooney has 30 movies&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(table, sentence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># print prediction</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_idx = outputs.logits[<span class="hljs-number">0</span>].argmax(dim=<span class="hljs-number">0</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_class_idx])
Refused`,wrap:!1}}),D=new Ae({}),O=new at({props:{name:"class transformers.TapexTokenizer",anchor:"transformers.TapexTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"do_lower_case",val:" = True"},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = False"},{name:"max_cell_length",val:" = 15"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TapexTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.TapexTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.TapexTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.TapexTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.TapexTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.TapexTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.TapexTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.TapexTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.TapexTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.TapexTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.TapexTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.TapexTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (BART tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.TapexTokenizer.max_cell_length",description:`<strong>max_cell_length</strong> (<code>int</code>, <em>optional</em>, defaults to 15) &#x2014;
Maximum number of characters per cell when linearizing a table. If this number is exceeded, truncation
takes place.`,name:"max_cell_length"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deprecated/tapex/tokenization_tapex.py#L194"}}),K=new at({props:{name:"__call__",anchor:"transformers.TapexTokenizer.__call__",parameters:[{name:"table",val:": typing.Union[ForwardRef('pd.DataFrame'), typing.List[ForwardRef('pd.DataFrame')]] = None"},{name:"query",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"answer",val:": typing.Union[str, typing.List[str]] = 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:"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.TapexTokenizer.__call__.table",description:`<strong>table</strong> (<code>pd.DataFrame</code>, <code>List[pd.DataFrame]</code>) &#x2014;
Table(s) containing tabular data.`,name:"table"},{anchor:"transformers.TapexTokenizer.__call__.query",description:`<strong>query</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Sentence or batch of sentences related to one or more table(s) to be encoded. Note that the number of
sentences must match the number of tables.`,name:"query"},{anchor:"transformers.TapexTokenizer.__call__.answer",description:`<strong>answer</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
Optionally, the corresponding answer to the questions as supervision.`,name:"answer"},{anchor:"transformers.TapexTokenizer.__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 add special tokens when encoding the sequences. This will use the underlying
<code>PretrainedTokenizerBase.build_inputs_with_special_tokens</code> function, which defines which tokens are
automatically added to the input ids. This is usefull if you want to add <code>bos</code> or <code>eos</code> tokens
automatically.`,name:"add_special_tokens"},{anchor:"transformers.TapexTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.34.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.TapexTokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.34.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.TapexTokenizer.__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.TapexTokenizer.__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.TapexTokenizer.__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.TapexTokenizer.__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.TapexTokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.34.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.TapexTokenizer.__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.TapexTokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.34.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.TapexTokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code>, <code>TapexTruncationStrategy</code> or <a href="/docs/transformers/v4.34.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, &#x2014;
<em>optional</em>, defaults to <code>False</code>):</p>
<p>Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>&apos;drop_rows_to_fit&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
row by row, removing rows from the table.</li>
<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.TapexTokenizer.__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. 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.TapexTokenizer.__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.TapexTokenizer.__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. 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.TapexTokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.34.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"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deprecated/tapex/tokenization_tapex.py#L515"}}),ee=new at({props:{name:"save_vocabulary",anchor:"transformers.TapexTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deprecated/tapex/tokenization_tapex.py#L486"}}),{c(){h=a("meta"),B=l(),M=a("p"),f=l(),T=a("h1"),m=a("a"),x=a("span"),y(G.$$.fragment),Se=l(),ne=a("span"),ne.textContent=st,be=l(),y(U.$$.fragment),_e=l(),j=a("h2"),C=a("a"),he=a("span"),y(X.$$.fragment),Ve=l(),ae=a("span"),ae.textContent=rt,ve=l(),R=a("p"),R.innerHTML=lt,we=l(),W=a("p"),W.textContent=it,ke=l(),E=a("ul"),E.innerHTML=ct,Me=l(),N=a("p"),N.textContent=dt,xe=l(),F=a("p"),F.innerHTML=pt,je=l(),$=a("p"),$.textContent=mt,Je=l(),A=a("ul"),A.innerHTML=ut,qe=l(),J=a("h2"),I=a("a"),ge=a("span"),y(S.$$.fragment),Pe=l(),oe=a("span"),oe.textContent=ht,Ue=l(),V=a("p"),V.innerHTML=gt,Ce=l(),y(P.$$.fragment),Ie=l(),Q=a("p"),Q.innerHTML=ft,ze=l(),y(Y.$$.fragment),Ze=l(),L=a("p"),L.innerHTML=Tt,Be=l(),y(H.$$.fragment),Ge=l(),q=a("h2"),z=a("a"),fe=a("span"),y(D.$$.fragment),Qe=l(),se=a("span"),se.textContent=yt,Xe=l(),c=a("div"),y(O.$$.fragment),Ye=l(),re=a("p"),re.textContent=bt,Le=l(),le=a("p"),le.textContent=_t,He=l(),ie=a("p"),ie.textContent=vt,De=l(),ce=a("p"),ce.textContent=wt,Oe=l(),de=a("p"),de.textContent=kt,Ke=l(),pe=a("p"),pe.innerHTML=Mt,et=l(),Z=a("div"),y(K.$$.fragment),tt=l(),me=a("p"),me.textContent=xt,nt=l(),ue=a("div"),y(ee.$$.fragment),Re=l(),Te=a("p"),this.h()},l(e){const n=Nt("svelte-1phssyn",document.head);h=o(n,"META",{name:!0,content:!0}),n.forEach(t),B=i(e),M=o(e,"P",{}),g(M).forEach(t),f=i(e),T=o(e,"H1",{class:!0});var te=g(T);m=o(te,"A",{id:!0,class:!0,href:!0});var jt=g(m);x=o(jt,"SPAN",{});var Jt=g(x);b(G.$$.fragment,Jt),Jt.forEach(t),jt.forEach(t),Se=i(te),ne=o(te,"SPAN",{"data-svelte-h":!0}),d(ne)!=="svelte-14ho1f7"&&(ne.textContent=st),te.forEach(t),be=i(e),b(U.$$.fragment,e),_e=i(e),j=o(e,"H2",{class:!0});var Ee=g(j);C=o(Ee,"A",{id:!0,class:!0,href:!0});var qt=g(C);he=o(qt,"SPAN",{});var Ut=g(he);b(X.$$.fragment,Ut),Ut.forEach(t),qt.forEach(t),Ve=i(Ee),ae=o(Ee,"SPAN",{"data-svelte-h":!0}),d(ae)!=="svelte-1jsw1pg"&&(ae.textContent=rt),Ee.forEach(t),ve=i(e),R=o(e,"P",{"data-svelte-h":!0}),d(R)!=="svelte-kx8uvg"&&(R.innerHTML=lt),we=i(e),W=o(e,"P",{"data-svelte-h":!0}),d(W)!=="svelte-2m0hm9"&&(W.textContent=it),ke=i(e),E=o(e,"UL",{"data-svelte-h":!0}),d(E)!=="svelte-1d618io"&&(E.innerHTML=ct),Me=i(e),N=o(e,"P",{"data-svelte-h":!0}),d(N)!=="svelte-vfdo9a"&&(N.textContent=dt),xe=i(e),F=o(e,"P",{"data-svelte-h":!0}),d(F)!=="svelte-xg0jss"&&(F.innerHTML=pt),je=i(e),$=o(e,"P",{"data-svelte-h":!0}),d($)!=="svelte-axv494"&&($.textContent=mt),Je=i(e),A=o(e,"UL",{"data-svelte-h":!0}),d(A)!=="svelte-15dagua"&&(A.innerHTML=ut),qe=i(e),J=o(e,"H2",{class:!0});var Ne=g(J);I=o(Ne,"A",{id:!0,class:!0,href:!0});var Ct=g(I);ge=o(Ct,"SPAN",{});var It=g(ge);b(S.$$.fragment,It),It.forEach(t),Ct.forEach(t),Pe=i(Ne),oe=o(Ne,"SPAN",{"data-svelte-h":!0}),d(oe)!=="svelte-uxz3z9"&&(oe.textContent=ht),Ne.forEach(t),Ue=i(e),V=o(e,"P",{"data-svelte-h":!0}),d(V)!=="svelte-130kz1d"&&(V.innerHTML=gt),Ce=i(e),b(P.$$.fragment,e),Ie=i(e),Q=o(e,"P",{"data-svelte-h":!0}),d(Q)!=="svelte-1pp5tr1"&&(Q.innerHTML=ft),ze=i(e),b(Y.$$.fragment,e),Ze=i(e),L=o(e,"P",{"data-svelte-h":!0}),d(L)!=="svelte-13xw8x0"&&(L.innerHTML=Tt),Be=i(e),b(H.$$.fragment,e),Ge=i(e),q=o(e,"H2",{class:!0});var Fe=g(q);z=o(Fe,"A",{id:!0,class:!0,href:!0});var zt=g(z);fe=o(zt,"SPAN",{});var Zt=g(fe);b(D.$$.fragment,Zt),Zt.forEach(t),zt.forEach(t),Qe=i(Fe),se=o(Fe,"SPAN",{"data-svelte-h":!0}),d(se)!=="svelte-1t24wty"&&(se.textContent=yt),Fe.forEach(t),Xe=i(e),c=o(e,"DIV",{class:!0});var u=g(c);b(O.$$.fragment,u),Ye=i(u),re=o(u,"P",{"data-svelte-h":!0}),d(re)!=="svelte-gkb1rl"&&(re.textContent=bt),Le=i(u),le=o(u,"P",{"data-svelte-h":!0}),d(le)!=="svelte-ic5ztl"&&(le.textContent=_t),He=i(u),ie=o(u,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-1bmyk1l"&&(ie.textContent=vt),De=i(u),ce=o(u,"P",{"data-svelte-h":!0}),d(ce)!=="svelte-6e19qv"&&(ce.textContent=wt),Oe=i(u),de=o(u,"P",{"data-svelte-h":!0}),d(de)!=="svelte-1bf8sfk"&&(de.textContent=kt),Ke=i(u),pe=o(u,"P",{"data-svelte-h":!0}),d(pe)!=="svelte-1b0fouy"&&(pe.innerHTML=Mt),et=i(u),Z=o(u,"DIV",{class:!0});var $e=g(Z);b(K.$$.fragment,$e),tt=i($e),me=o($e,"P",{"data-svelte-h":!0}),d(me)!=="svelte-olz8ao"&&(me.textContent=xt),$e.forEach(t),nt=i(u),ue=o(u,"DIV",{class:!0});var Bt=g(ue);b(ee.$$.fragment,Bt),Bt.forEach(t),u.forEach(t),Re=i(e),Te=o(e,"P",{}),g(Te).forEach(t),this.h()},h(){p(h,"name","hf:doc:metadata"),p(h,"content",JSON.stringify(St)),p(m,"id","tapex"),p(m,"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"),p(m,"href","#tapex"),p(T,"class","relative group"),p(C,"id","overview"),p(C,"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"),p(C,"href","#overview"),p(j,"class","relative group"),p(I,"id","usage-inference"),p(I,"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"),p(I,"href","#usage-inference"),p(J,"class","relative group"),p(z,"id","transformers.TapexTokenizer"),p(z,"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"),p(z,"href","#transformers.TapexTokenizer"),p(q,"class","relative group"),p(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,n){r(document.head,h),s(e,B,n),s(e,M,n),s(e,f,n),s(e,T,n),r(T,m),r(m,x),_(G,x,null),r(T,Se),r(T,ne),s(e,be,n),_(U,e,n),s(e,_e,n),s(e,j,n),r(j,C),r(C,he),_(X,he,null),r(j,Ve),r(j,ae),s(e,ve,n),s(e,R,n),s(e,we,n),s(e,W,n),s(e,ke,n),s(e,E,n),s(e,Me,n),s(e,N,n),s(e,xe,n),s(e,F,n),s(e,je,n),s(e,$,n),s(e,Je,n),s(e,A,n),s(e,qe,n),s(e,J,n),r(J,I),r(I,ge),_(S,ge,null),r(J,Pe),r(J,oe),s(e,Ue,n),s(e,V,n),s(e,Ce,n),_(P,e,n),s(e,Ie,n),s(e,Q,n),s(e,ze,n),_(Y,e,n),s(e,Ze,n),s(e,L,n),s(e,Be,n),_(H,e,n),s(e,Ge,n),s(e,q,n),r(q,z),r(z,fe),_(D,fe,null),r(q,Qe),r(q,se),s(e,Xe,n),s(e,c,n),_(O,c,null),r(c,Ye),r(c,re),r(c,Le),r(c,le),r(c,He),r(c,ie),r(c,De),r(c,ce),r(c,Oe),r(c,de),r(c,Ke),r(c,pe),r(c,et),r(c,Z),_(K,Z,null),r(Z,tt),r(Z,me),r(c,nt),r(c,ue),_(ee,ue,null),s(e,Re,n),s(e,Te,n),We=!0},p(e,[n]){const te={};n&2&&(te.$$scope={dirty:n,ctx:e}),U.$set(te)},i(e){We||(v(G.$$.fragment,e),v(U.$$.fragment,e),v(X.$$.fragment,e),v(S.$$.fragment,e),v(P.$$.fragment,e),v(Y.$$.fragment,e),v(H.$$.fragment,e),v(D.$$.fragment,e),v(O.$$.fragment,e),v(K.$$.fragment,e),v(ee.$$.fragment,e),We=!0)},o(e){w(G.$$.fragment,e),w(U.$$.fragment,e),w(X.$$.fragment,e),w(S.$$.fragment,e),w(P.$$.fragment,e),w(Y.$$.fragment,e),w(H.$$.fragment,e),w(D.$$.fragment,e),w(O.$$.fragment,e),w(K.$$.fragment,e),w(ee.$$.fragment,e),We=!1},d(e){e&&(t(B),t(M),t(f),t(T),t(be),t(_e),t(j),t(ve),t(R),t(we),t(W),t(ke),t(E),t(Me),t(N),t(xe),t(F),t(je),t($),t(Je),t(A),t(qe),t(J),t(Ue),t(V),t(Ce),t(Ie),t(Q),t(ze),t(Ze),t(L),t(Be),t(Ge),t(q),t(Xe),t(c),t(Re),t(Te)),t(h),k(G),k(U,e),k(X),k(S),k(P,e),k(Y,e),k(H,e),k(D),k(O),k(K),k(ee)}}}const St={local:"tapex",sections:[{local:"overview",title:"Overview"},{local:"usage-inference",title:"Usage: inference"},{local:"transformers.TapexTokenizer",title:"TapexTokenizer"}],title:"TAPEX"};function Vt(ye){return Xt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ot extends Wt{constructor(h){super(),Et(this,h,Vt,At,Gt,{})}}export{Ot as component};
