import{S as Tx,i as Ex,s as Lx,e as a,k as l,w as k,t as o,M as qx,c as r,d as t,m as d,a as i,x as v,h as n,b as c,N as $x,G as e,g as u,y as b,q as M,o as w,B as y,v as Fx,L as ta}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ac}from"../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Te}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as me}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ea}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function zx(P){let m,T,_,g,x;return g=new Te({props:{code:`from transformers import MarkupLMModel, MarkupLMConfig

# Initializing a MarkupLM microsoft/markuplm-base style configuration
configuration = MarkupLMConfig()

# Initializing a model from the microsoft/markuplm-base style configuration
model = MarkupLMModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMModel, MarkupLMConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a MarkupLM microsoft/markuplm-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MarkupLMConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the microsoft/markuplm-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarkupLMModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){m=a("p"),T=o("Examples:"),_=l(),k(g.$$.fragment)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Examples:"),f.forEach(t),_=d(h),v(g.$$.fragment,h)},m(h,f){u(h,m,f),e(m,T),u(h,_,f),b(g,h,f),x=!0},p:ta,i(h){x||(M(g.$$.fragment,h),x=!0)},o(h){w(g.$$.fragment,h),x=!1},d(h){h&&t(m),h&&t(_),y(g,h)}}}function jx(P){let m,T,_,g,x;return g=new Te({props:{code:`from transformers import MarkupLMFeatureExtractor

page_name_1 = "page1.html"
page_name_2 = "page2.html"
page_name_3 = "page3.html"

with open(page_name_1) as f:
    single_html_string = f.read()

feature_extractor = MarkupLMFeatureExtractor()

# single example
encoding = feature_extractor(single_html_string)
print(encoding.keys())
# dict_keys(['nodes', 'xpaths'])

# batched example

multi_html_strings = []

with open(page_name_2) as f:
    multi_html_strings.append(f.read())
with open(page_name_3) as f:
    multi_html_strings.append(f.read())

encoding = feature_extractor(multi_html_strings)
print(encoding.keys())
# dict_keys(['nodes', 'xpaths'])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMFeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>page_name_1 = <span class="hljs-string">&quot;page1.html&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>page_name_2 = <span class="hljs-string">&quot;page2.html&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>page_name_3 = <span class="hljs-string">&quot;page3.html&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(page_name_1) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>    single_html_string = f.read()

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = MarkupLMFeatureExtractor()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># single example</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = feature_extractor(single_html_string)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding.keys())
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># dict_keys([&#x27;nodes&#x27;, &#x27;xpaths&#x27;])</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># batched example</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>multi_html_strings = []

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(page_name_2) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>    multi_html_strings.append(f.read())
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(page_name_3) <span class="hljs-keyword">as</span> f:
<span class="hljs-meta">... </span>    multi_html_strings.append(f.read())

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = feature_extractor(multi_html_strings)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding.keys())
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># dict_keys([&#x27;nodes&#x27;, &#x27;xpaths&#x27;])</span>`}}),{c(){m=a("p"),T=o("Examples:"),_=l(),k(g.$$.fragment)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Examples:"),f.forEach(t),_=d(h),v(g.$$.fragment,h)},m(h,f){u(h,m,f),e(m,T),u(h,_,f),b(g,h,f),x=!0},p:ta,i(h){x||(M(g.$$.fragment,h),x=!0)},o(h){w(g.$$.fragment,h),x=!1},d(h){h&&t(m),h&&t(_),y(g,h)}}}function Cx(P){let m,T,_,g,x;return{c(){m=a("p"),T=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=o("Module"),x=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(f,"CODE",{});var G=i(_);g=n(G,"Module"),G.forEach(t),x=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(h,f){u(h,m,f),e(m,T),e(m,_),e(_,g),e(m,x)},d(h){h&&t(m)}}}function Px(P){let m,T,_,g,x;return g=new Te({props:{code:`from transformers import AutoProcessor, MarkupLMModel

processor = AutoProcessor.from_pretrained("microsoft/markuplm-base")
model = MarkupLMModel.from_pretrained("microsoft/markuplm-base")

html_string = "<html> <head> <title>Page Title</title> </head> </html>"

encoding = processor(html_string, return_tensors="pt")

outputs = model(**encoding)
last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, MarkupLMModel

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarkupLMModel.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>html_string = <span class="hljs-string">&quot;&lt;html&gt; &lt;head&gt; &lt;title&gt;Page Title&lt;/title&gt; &lt;/head&gt; &lt;/html&gt;&quot;</span>

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">4</span>, <span class="hljs-number">768</span>]`}}),{c(){m=a("p"),T=o("Examples:"),_=l(),k(g.$$.fragment)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Examples:"),f.forEach(t),_=d(h),v(g.$$.fragment,h)},m(h,f){u(h,m,f),e(m,T),u(h,_,f),b(g,h,f),x=!0},p:ta,i(h){x||(M(g.$$.fragment,h),x=!0)},o(h){w(g.$$.fragment,h),x=!1},d(h){h&&t(m),h&&t(_),y(g,h)}}}function Dx(P){let m,T,_,g,x;return{c(){m=a("p"),T=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=o("Module"),x=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(f,"CODE",{});var G=i(_);g=n(G,"Module"),G.forEach(t),x=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(h,f){u(h,m,f),e(m,T),e(m,_),e(_,g),e(m,x)},d(h){h&&t(m)}}}function Ox(P){let m,T,_,g,x;return g=new Te({props:{code:`from transformers import AutoProcessor, AutoModelForSequenceClassification
import torch

processor = AutoProcessor.from_pretrained("microsoft/markuplm-base")
model = AutoModelForSequenceClassification.from_pretrained("microsoft/markuplm-base", num_labels=7)

html_string = "<html> <head> <title>Page Title</title> </head> </html>"
encoding = processor(html_string, return_tensors="pt")

with torch.no_grad():
    outputs = model(**encoding)

loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>, num_labels=<span class="hljs-number">7</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>html_string = <span class="hljs-string">&quot;&lt;html&gt; &lt;head&gt; &lt;title&gt;Page Title&lt;/title&gt; &lt;/head&gt; &lt;/html&gt;&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(html_string, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){m=a("p"),T=o("Examples:"),_=l(),k(g.$$.fragment)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Examples:"),f.forEach(t),_=d(h),v(g.$$.fragment,h)},m(h,f){u(h,m,f),e(m,T),u(h,_,f),b(g,h,f),x=!0},p:ta,i(h){x||(M(g.$$.fragment,h),x=!0)},o(h){w(g.$$.fragment,h),x=!1},d(h){h&&t(m),h&&t(_),y(g,h)}}}function Ax(P){let m,T,_,g,x;return{c(){m=a("p"),T=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=o("Module"),x=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(f,"CODE",{});var G=i(_);g=n(G,"Module"),G.forEach(t),x=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(h,f){u(h,m,f),e(m,T),e(m,_),e(_,g),e(m,x)},d(h){h&&t(m)}}}function Ix(P){let m,T,_,g,x;return g=new Te({props:{code:`from transformers import AutoProcessor, AutoModelForTokenClassification
import torch

processor = AutoProcessor.from_pretrained("microsoft/markuplm-base")
processor.parse_html = False
model = AutoModelForTokenClassification.from_pretrained("microsoft/markuplm-base", num_labels=7)

nodes = ["hello", "world"]
xpaths = ["/html/body/div/li[1]/div/span", "/html/body/div/li[1]/div/span"]
node_labels = [1, 2]
encoding = processor(nodes=nodes, xpaths=xpaths, node_labels=node_labels, return_tensors="pt")

with torch.no_grad():
    outputs = model(**encoding)

loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor.parse_html = <span class="hljs-literal">False</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>, num_labels=<span class="hljs-number">7</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>nodes = [<span class="hljs-string">&quot;hello&quot;</span>, <span class="hljs-string">&quot;world&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>xpaths = [<span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>, <span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>node_labels = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(nodes=nodes, xpaths=xpaths, node_labels=node_labels, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){m=a("p"),T=o("Examples:"),_=l(),k(g.$$.fragment)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Examples:"),f.forEach(t),_=d(h),v(g.$$.fragment,h)},m(h,f){u(h,m,f),e(m,T),u(h,_,f),b(g,h,f),x=!0},p:ta,i(h){x||(M(g.$$.fragment,h),x=!0)},o(h){w(g.$$.fragment,h),x=!1},d(h){h&&t(m),h&&t(_),y(g,h)}}}function Nx(P){let m,T,_,g,x;return{c(){m=a("p"),T=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=o("Module"),x=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(f,"CODE",{});var G=i(_);g=n(G,"Module"),G.forEach(t),x=n(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(t)},m(h,f){u(h,m,f),e(m,T),e(m,_),e(_,g),e(m,x)},d(h){h&&t(m)}}}function Sx(P){let m,T,_,g,x;return g=new Te({props:{code:`from transformers import AutoProcessor, MarkupLMForQuestionAnswering
import torch

processor = AutoProcessor.from_pretrained("microsoft/markuplm-base-finetuned-websrc")
model = MarkupLMForQuestionAnswering.from_pretrained("microsoft/markuplm-base-finetuned-websrc")

html_string = "<html> <head> <title>My name is Niels</title> </head> </html>"
question = "What's his name?"

encoding = processor(html_string, questions=question, return_tensors="pt")

with torch.no_grad():
    outputs = model(**encoding)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = encoding.input_ids[0, answer_start_index : answer_end_index + 1]
processor.decode(predict_answer_tokens).strip()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, MarkupLMForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base-finetuned-websrc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MarkupLMForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base-finetuned-websrc&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>html_string = <span class="hljs-string">&quot;&lt;html&gt; &lt;head&gt; &lt;title&gt;My name is Niels&lt;/title&gt; &lt;/head&gt; &lt;/html&gt;&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;What&#x27;s his name?&quot;</span>

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**encoding)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = encoding.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>processor.decode(predict_answer_tokens).strip()
<span class="hljs-string">&#x27;Niels&#x27;</span>`}}),{c(){m=a("p"),T=o("Examples:"),_=l(),k(g.$$.fragment)},l(h){m=r(h,"P",{});var f=i(m);T=n(f,"Examples:"),f.forEach(t),_=d(h),v(g.$$.fragment,h)},m(h,f){u(h,m,f),e(m,T),u(h,_,f),b(g,h,f),x=!0},p:ta,i(h){x||(M(g.$$.fragment,h),x=!0)},o(h){w(g.$$.fragment,h),x=!1},d(h){h&&t(m),h&&t(_),y(g,h)}}}function Bx(P){let m,T,_,g,x,h,f,G,Ic,ud,Be,ht,oa,co,Nc,na,Sc,md,qe,Bc,po,Rc,Wc,Ln,Uc,Hc,fd,qn,Vc,gd,ut,$n,ho,Qc,Xc,Gc,Fn,uo,Kc,Yc,_d,zn,Jc,kd,jn,sa,Zc,vd,Cn,ep,bd,$e,le,tp,aa,op,np,Pn,sp,ap,ra,rp,ip,ia,lp,dp,cp,Re,pp,Dn,hp,up,On,mp,fp,gp,mo,_p,fo,kp,vp,Md,mt,uM,wd,go,bp,An,Mp,yd,Fe,wp,_o,yp,xp,ko,Tp,Ep,xd,We,ft,la,vo,Lp,da,qp,Td,J,$p,In,Fp,zp,Nn,jp,Cp,Sn,Pp,Dp,Bn,Op,Ap,ca,Ip,Np,Ed,bo,Ld,F,Sp,Rn,Bp,Rp,Wn,Wp,Up,Un,Hp,Vp,Hn,Qp,Xp,pa,Gp,Kp,ha,Yp,Jp,ua,Zp,eh,ma,th,oh,fa,nh,sh,ga,ah,rh,qd,de,Vn,ih,lh,Mo,dh,ch,Qn,ph,hh,Xn,uh,mh,$d,Gn,fh,Fd,Kn,_a,gh,zd,Yn,_h,jd,wo,Cd,Jn,ka,kh,Pd,ze,vh,va,bh,Mh,ba,wh,yh,Dd,yo,Od,Zn,Ma,xh,Ad,Z,Th,xo,Eh,Lh,wa,qh,$h,ya,Fh,zh,xa,jh,Ch,Ta,Ph,Dh,Id,To,Nd,es,Ea,Oh,Sd,ts,Ah,Bd,Eo,Rd,os,La,Ih,Wd,je,Nh,qa,Sh,Bh,$a,Rh,Wh,Ud,Lo,Hd,Ue,gt,Fa,qo,Uh,za,Hh,Vd,Ce,ja,ns,Vh,Qh,Ca,ss,Xh,Gh,Pa,as,Kh,Qd,He,_t,Da,$o,Yh,Oa,Jh,Xd,ce,Fo,Zh,Ve,eu,rs,tu,ou,zo,nu,su,au,Qe,ru,is,iu,lu,ls,du,cu,pu,kt,Gd,Xe,vt,Aa,jo,hu,Ia,uu,Kd,pe,Co,mu,Na,fu,gu,Po,_u,Sa,ku,vu,bu,Pe,Do,Mu,Ba,wu,yu,bt,Yd,Ge,Mt,Ra,Oo,xu,Wa,Tu,Jd,K,Ao,Eu,S,Lu,ds,qu,$u,Ua,Fu,zu,Ha,ju,Cu,Va,Pu,Du,Qa,Ou,Au,Xa,Iu,Nu,cs,Su,Bu,Ru,De,Io,Wu,Ga,Uu,Hu,No,ps,Vu,Ka,Qu,Xu,hs,Gu,Ya,Ku,Yu,us,So,Ju,wt,Bo,Zu,Ja,em,tm,ms,Ro,Zd,Ke,yt,Za,Wo,om,er,nm,ec,j,Uo,sm,tr,am,rm,B,fs,im,lm,or,dm,cm,nr,pm,hm,sr,um,mm,ar,fm,gm,rr,_m,km,gs,vm,bm,Mm,ir,wm,ym,R,Ho,xm,O,Tm,lr,Em,Lm,dr,qm,$m,cr,Fm,zm,pr,jm,Cm,hr,Pm,Dm,_s,Om,Am,ur,Im,Nm,mr,Sm,Bm,Rm,Y,fr,xt,gr,Wm,Um,_r,Hm,Vm,Qm,kr,Tt,vr,Xm,Gm,br,Km,Ym,Jm,Mr,W,wr,Zm,ef,yr,tf,of,xr,nf,sf,Tr,af,rf,ks,lf,df,Er,cf,pf,Lr,hf,uf,mf,qr,Oe,$r,ff,gf,Fr,_f,kf,zr,vf,bf,Mf,jr,Et,Cr,wf,yf,Pr,xf,Tf,Ef,Dr,Lt,Or,Lf,qf,Ar,$f,Ff,zf,Ir,fe,Nr,jf,Cf,Sr,Pf,Df,Br,Of,Af,Rr,If,Nf,Sf,E,Bf,Wr,Rf,Wf,Ur,Uf,Hf,Hr,Vf,Qf,Vr,Xf,Gf,Qr,Kf,Yf,Xr,Jf,Zf,Gr,eg,tg,Kr,og,ng,Yr,sg,ag,Jr,rg,ig,Zr,lg,dg,ei,cg,pg,ti,hg,ug,vs,mg,fg,oi,gg,_g,kg,Ye,qt,ni,vg,bg,si,Mg,wg,yg,$t,ai,xg,Tg,ri,Eg,Lg,qg,Ft,ii,$g,Fg,li,zg,jg,Cg,A,Pg,di,Dg,Og,ci,Ag,Ig,pi,Ng,Sg,hi,Bg,Rg,ui,Wg,Ug,bs,Hg,Vg,mi,Qg,Xg,fi,Gg,Kg,Yg,C,gi,zt,_i,Jg,Zg,ki,e_,t_,o_,vi,jt,bi,n_,s_,Mi,a_,r_,i_,wi,U,yi,l_,d_,xi,c_,p_,Ti,h_,u_,Ei,m_,f_,Ms,g_,__,Li,k_,v_,qi,b_,M_,w_,$i,Ae,Fi,y_,x_,zi,T_,E_,ji,L_,q_,$_,Ci,Ct,Pi,F_,z_,Di,j_,C_,P_,Oi,Pt,Ai,D_,O_,Ii,A_,I_,N_,Ni,L,Si,S_,B_,Bi,R_,W_,Ri,U_,H_,Wi,V_,Q_,Ui,X_,G_,Hi,K_,Y_,Vi,J_,Z_,Qi,ek,tk,Xi,ok,nk,Gi,sk,ak,Ki,rk,ik,Yi,lk,dk,Ji,ck,pk,ws,hk,uk,Zi,mk,fk,gk,el,Dt,tl,_k,kk,ol,vk,bk,Mk,nl,Ot,sl,wk,yk,al,xk,Tk,Ek,rl,At,il,Lk,qk,ll,$k,Fk,zk,Ie,Vo,jk,dl,Ck,Pk,Qo,ys,Dk,cl,Ok,Ak,xs,Ik,pl,Nk,Sk,It,Xo,Bk,hl,Rk,Wk,Nt,Go,Uk,Ko,Hk,ul,Vk,Qk,Xk,St,Yo,Gk,ml,Kk,tc,Je,Bt,fl,Jo,Yk,gl,Jk,oc,te,Zo,Zk,_l,ev,tv,Ts,Es,ov,nv,sv,I,av,Ls,rv,iv,qs,lv,dv,$s,cv,pv,kl,hv,uv,vl,mv,fv,bl,gv,_v,Ml,kv,vv,wl,bv,Mv,wv,ge,en,yv,oe,xv,yl,Tv,Ev,tn,xl,Lv,qv,$v,Tl,Fv,zv,El,jv,Cv,Ll,Pv,Dv,Ov,on,Av,ql,Iv,Nv,Sv,$l,Bv,nc,Ze,Rt,Fl,nn,Rv,zl,Wv,sc,Ee,sn,Uv,an,Hv,rn,Vv,Qv,Xv,_e,ln,Gv,et,Kv,Fs,Yv,Jv,jl,Zv,eb,tb,Wt,ob,Ut,ac,tt,Ht,Cl,dn,nb,Pl,sb,rc,he,cn,ab,Dl,rb,ib,pn,lb,hn,db,cb,pb,ke,un,hb,ot,ub,zs,mb,fb,Ol,gb,_b,kb,Vt,vb,Qt,ic,nt,Xt,Al,mn,bb,Il,Mb,lc,Le,fn,wb,st,yb,Nl,xb,Tb,gn,Eb,Lb,qb,ve,_n,$b,at,Fb,js,zb,jb,Sl,Cb,Pb,Db,Gt,Ob,Kt,dc,rt,Yt,Bl,kn,Ab,Rl,Ib,cc,ue,vn,Nb,it,Sb,Wl,Bb,Rb,Ul,Wb,Ub,Hb,bn,Vb,Mn,Qb,Xb,Gb,be,wn,Kb,lt,Yb,Cs,Jb,Zb,Hl,eM,tM,oM,Jt,nM,Zt,pc;return h=new me({}),co=new me({}),vo=new me({}),bo=new Te({props:{code:`from transformers import MarkupLMFeatureExtractor, MarkupLMTokenizerFast, MarkupLMProcessor

feature_extractor = MarkupLMFeatureExtractor()
tokenizer = MarkupLMTokenizerFast.from_pretrained("microsoft/markuplm-base")
processor = MarkupLMProcessor(feature_extractor, tokenizer)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMFeatureExtractor, MarkupLMTokenizerFast, MarkupLMProcessor

feature_extractor = MarkupLMFeatureExtractor()
tokenizer = MarkupLMTokenizerFast.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)
processor = MarkupLMProcessor(feature_extractor, tokenizer)`}}),wo=new Te({props:{code:`from transformers import MarkupLMProcessor

processor = MarkupLMProcessor.from_pretrained("microsoft/markuplm-base")

html_string = """
 <!DOCTYPE html>
 <html>
 <head>
 <title>Hello world</title>
 </head>
 <body>
 <h1 class="relative group">
	<a 
		id="welcome" 
		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" 
		href="#welcome"
	>
		<span><IconCopyLink/></span>
	</a>
	<span>
		Welcome
	</span>
</h1>

 <p>Here is my website.</p>
 </body>
 </html>"""

# note that you can also add provide all tokenizer parameters here such as padding, truncation
encoding = processor(html_string, return_tensors="pt")
print(encoding.keys())`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = MarkupLMProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>html_string = <span class="hljs-string">&quot;&quot;&quot;
<span class="hljs-meta">... </span> &lt;!DOCTYPE html&gt;
<span class="hljs-meta">... </span> &lt;html&gt;
<span class="hljs-meta">... </span> &lt;head&gt;
<span class="hljs-meta">... </span> &lt;title&gt;Hello world&lt;/title&gt;
<span class="hljs-meta">... </span> &lt;/head&gt;
<span class="hljs-meta">... </span> &lt;body&gt;
<span class="hljs-meta">... </span> &lt;h1&gt;Welcome&lt;/h1&gt;
<span class="hljs-meta">... </span> &lt;p&gt;Here is my website.&lt;/p&gt;
<span class="hljs-meta">... </span> &lt;/body&gt;
<span class="hljs-meta">... </span> &lt;/html&gt;&quot;&quot;&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># note that you can also add provide all tokenizer parameters here such as padding, truncation</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(html_string, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding.keys())
dict_keys([<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;xpath_tags_seq&#x27;</span>, <span class="hljs-string">&#x27;xpath_subs_seq&#x27;</span>])`}}),yo=new Te({props:{code:`from transformers import MarkupLMProcessor

processor = MarkupLMProcessor.from_pretrained("microsoft/markuplm-base")
processor.parse_html = False

nodes = ["hello", "world", "how", "are"]
xpaths = ["/html/body/div/li[1]/div/span", "/html/body/div/li[1]/div/span", "html/body", "html/body/div"]
encoding = processor(nodes=nodes, xpaths=xpaths, return_tensors="pt")
print(encoding.keys())`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = MarkupLMProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor.parse_html = <span class="hljs-literal">False</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>nodes = [<span class="hljs-string">&quot;hello&quot;</span>, <span class="hljs-string">&quot;world&quot;</span>, <span class="hljs-string">&quot;how&quot;</span>, <span class="hljs-string">&quot;are&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>xpaths = [<span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>, <span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>, <span class="hljs-string">&quot;html/body&quot;</span>, <span class="hljs-string">&quot;html/body/div&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(nodes=nodes, xpaths=xpaths, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding.keys())
dict_keys([<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;xpath_tags_seq&#x27;</span>, <span class="hljs-string">&#x27;xpath_subs_seq&#x27;</span>])`}}),To=new Te({props:{code:`from transformers import MarkupLMProcessor

processor = MarkupLMProcessor.from_pretrained("microsoft/markuplm-base")
processor.parse_html = False

nodes = ["hello", "world", "how", "are"]
xpaths = ["/html/body/div/li[1]/div/span", "/html/body/div/li[1]/div/span", "html/body", "html/body/div"]
node_labels = [1, 2, 2, 1]
encoding = processor(nodes=nodes, xpaths=xpaths, node_labels=node_labels, return_tensors="pt")
print(encoding.keys())`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = MarkupLMProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor.parse_html = <span class="hljs-literal">False</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>nodes = [<span class="hljs-string">&quot;hello&quot;</span>, <span class="hljs-string">&quot;world&quot;</span>, <span class="hljs-string">&quot;how&quot;</span>, <span class="hljs-string">&quot;are&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>xpaths = [<span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>, <span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>, <span class="hljs-string">&quot;html/body&quot;</span>, <span class="hljs-string">&quot;html/body/div&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>node_labels = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">2</span>, <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(nodes=nodes, xpaths=xpaths, node_labels=node_labels, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding.keys())
dict_keys([<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;xpath_tags_seq&#x27;</span>, <span class="hljs-string">&#x27;xpath_subs_seq&#x27;</span>, <span class="hljs-string">&#x27;labels&#x27;</span>])`}}),Eo=new Te({props:{code:`from transformers import MarkupLMProcessor

processor = MarkupLMProcessor.from_pretrained("microsoft/markuplm-base")

html_string = """
 <!DOCTYPE html>
 <html>
 <head>
 <title>Hello world</title>
 </head>
 <body>
 <h1 class="relative group">
	<a 
		id="welcome" 
		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" 
		href="#welcome"
	>
		<span><IconCopyLink/></span>
	</a>
	<span>
		Welcome
	</span>
</h1>

 <p>My name is Niels.</p>
 </body>
 </html>"""

question = "What's his name?"
encoding = processor(html_string, questions=question, return_tensors="pt")
print(encoding.keys())`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = MarkupLMProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>html_string = <span class="hljs-string">&quot;&quot;&quot;
<span class="hljs-meta">... </span> &lt;!DOCTYPE html&gt;
<span class="hljs-meta">... </span> &lt;html&gt;
<span class="hljs-meta">... </span> &lt;head&gt;
<span class="hljs-meta">... </span> &lt;title&gt;Hello world&lt;/title&gt;
<span class="hljs-meta">... </span> &lt;/head&gt;
<span class="hljs-meta">... </span> &lt;body&gt;
<span class="hljs-meta">... </span> &lt;h1&gt;Welcome&lt;/h1&gt;
<span class="hljs-meta">... </span> &lt;p&gt;My name is Niels.&lt;/p&gt;
<span class="hljs-meta">... </span> &lt;/body&gt;
<span class="hljs-meta">... </span> &lt;/html&gt;&quot;&quot;&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;What&#x27;s his name?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(html_string, questions=question, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding.keys())
dict_keys([<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;xpath_tags_seq&#x27;</span>, <span class="hljs-string">&#x27;xpath_subs_seq&#x27;</span>])`}}),Lo=new Te({props:{code:`from transformers import MarkupLMProcessor

processor = MarkupLMProcessor.from_pretrained("microsoft/markuplm-base")
processor.parse_html = False

nodes = ["hello", "world", "how", "are"]
xpaths = ["/html/body/div/li[1]/div/span", "/html/body/div/li[1]/div/span", "html/body", "html/body/div"]
question = "What's his name?"
encoding = processor(nodes=nodes, xpaths=xpaths, questions=question, return_tensors="pt")
print(encoding.keys())`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MarkupLMProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = MarkupLMProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/markuplm-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor.parse_html = <span class="hljs-literal">False</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>nodes = [<span class="hljs-string">&quot;hello&quot;</span>, <span class="hljs-string">&quot;world&quot;</span>, <span class="hljs-string">&quot;how&quot;</span>, <span class="hljs-string">&quot;are&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>xpaths = [<span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>, <span class="hljs-string">&quot;/html/body/div/li[1]/div/span&quot;</span>, <span class="hljs-string">&quot;html/body&quot;</span>, <span class="hljs-string">&quot;html/body/div&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;What&#x27;s his name?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(nodes=nodes, xpaths=xpaths, questions=question, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding.keys())
dict_keys([<span class="hljs-string">&#x27;input_ids&#x27;</span>, <span class="hljs-string">&#x27;token_type_ids&#x27;</span>, <span class="hljs-string">&#x27;attention_mask&#x27;</span>, <span class="hljs-string">&#x27;xpath_tags_seq&#x27;</span>, <span class="hljs-string">&#x27;xpath_subs_seq&#x27;</span>])`}}),qo=new me({}),$o=new me({}),Fo=new z({props:{name:"class transformers.MarkupLMConfig",anchor:"transformers.MarkupLMConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"max_xpath_tag_unit_embeddings",val:" = 256"},{name:"max_xpath_subs_unit_embeddings",val:" = 1024"},{name:"tag_pad_id",val:" = 216"},{name:"subs_pad_id",val:" = 1001"},{name:"xpath_unit_hidden_size",val:" = 32"},{name:"max_depth",val:" = 50"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the MarkupLM model. Defines the different tokens that can be represented by the
<em>inputs_ids</em> passed to the forward method of <a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMModel">MarkupLMModel</a>.`,name:"vocab_size"},{anchor:"transformers.MarkupLMConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.MarkupLMConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.MarkupLMConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.MarkupLMConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.MarkupLMConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.MarkupLMConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.MarkupLMConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.MarkupLMConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.MarkupLMConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed into <a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMModel">MarkupLMModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.MarkupLMConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.MarkupLMConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.MarkupLMConfig.max_tree_id_unit_embeddings",description:`<strong>max_tree_id_unit_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum value that the tree id unit embedding might ever use. Typically set this to something large
just in case (e.g., 1024).`,name:"max_tree_id_unit_embeddings"},{anchor:"transformers.MarkupLMConfig.max_xpath_tag_unit_embeddings",description:`<strong>max_xpath_tag_unit_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The maximum value that the xpath tag unit embedding might ever use. Typically set this to something large
just in case (e.g., 256).`,name:"max_xpath_tag_unit_embeddings"},{anchor:"transformers.MarkupLMConfig.max_xpath_subs_unit_embeddings",description:`<strong>max_xpath_subs_unit_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum value that the xpath subscript unit embedding might ever use. Typically set this to something
large just in case (e.g., 1024).`,name:"max_xpath_subs_unit_embeddings"},{anchor:"transformers.MarkupLMConfig.tag_pad_id",description:`<strong>tag_pad_id</strong> (<code>int</code>, <em>optional</em>, defaults to 216) &#x2014;
The id of the padding token in the xpath tags.`,name:"tag_pad_id"},{anchor:"transformers.MarkupLMConfig.subs_pad_id",description:`<strong>subs_pad_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1001) &#x2014;
The id of the padding token in the xpath subscripts.`,name:"subs_pad_id"},{anchor:"transformers.MarkupLMConfig.xpath_tag_unit_hidden_size",description:`<strong>xpath_tag_unit_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The hidden size of each tree id unit. One complete tree index will have
(50*xpath_tag_unit_hidden_size)-dim.`,name:"xpath_tag_unit_hidden_size"},{anchor:"transformers.MarkupLMConfig.max_depth",description:`<strong>max_depth</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The maximum depth in xpath.`,name:"max_depth"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/configuration_markuplm.py#L29"}}),kt=new ea({props:{anchor:"transformers.MarkupLMConfig.example",$$slots:{default:[zx]},$$scope:{ctx:P}}}),jo=new me({}),Co=new z({props:{name:"class transformers.MarkupLMFeatureExtractor",anchor:"transformers.MarkupLMFeatureExtractor",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/feature_extraction_markuplm.py#L33"}}),Do=new z({props:{name:"__call__",anchor:"transformers.MarkupLMFeatureExtractor.__call__",parameters:[{name:"html_strings",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMFeatureExtractor.__call__.html_strings",description:`<strong>html_strings</strong> (<code>str</code>, <code>List[str]</code>) &#x2014;
The HTML string or batch of HTML strings from which to extract nodes and corresponding xpaths.`,name:"html_strings"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/feature_extraction_markuplm.py#L99",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/image_processor#transformers.BatchFeature"
>BatchFeature</a> with the following fields:</p>
<ul>
<li><strong>nodes</strong> \u2014 Nodes.</li>
<li><strong>xpaths</strong> \u2014 Corresponding xpaths.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/image_processor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),bt=new ea({props:{anchor:"transformers.MarkupLMFeatureExtractor.__call__.example",$$slots:{default:[jx]},$$scope:{ctx:P}}}),Oo=new me({}),Ao=new z({props:{name:"class transformers.MarkupLMTokenizer",anchor:"transformers.MarkupLMTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"tags_dict",val:""},{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_depth",val:" = 50"},{name:"max_width",val:" = 1000"},{name:"pad_width",val:" = 1001"},{name:"pad_token_label",val:" = -100"},{name:"only_label_first_subword",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MarkupLMTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.MarkupLMTokenizer.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.MarkupLMTokenizer.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.MarkupLMTokenizer.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.MarkupLMTokenizer.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.MarkupLMTokenizer.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.MarkupLMTokenizer.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.MarkupLMTokenizer.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.MarkupLMTokenizer.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.MarkupLMTokenizer.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. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm.py#L145"}}),Io=new z({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MarkupLMTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.MarkupLMTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm.py#L423",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),So=new z({props:{name:"get_special_tokens_mask",anchor:"transformers.MarkupLMTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.MarkupLMTokenizer.get_special_tokens_mask.Retrieve",description:"<strong>Retrieve</strong> sequence ids from a token list that has no special tokens added. This method is called when adding &#x2014;",name:"Retrieve"},{anchor:"transformers.MarkupLMTokenizer.get_special_tokens_mask.special",description:`<strong>special</strong> tokens using the tokenizer <code>prepare_for_model</code> method. &#x2014;
token_ids_0 (<code>List[int]</code>):
List of IDs.
token_ids_1 (<code>List[int]</code>, <em>optional</em>):
Optional second list of IDs for sequence pairs.
already_has_special_tokens (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>):
Whether or not the token list is already formatted with special tokens for the model.`,name:"special"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm.py#L462",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Bo=new z({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MarkupLMTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.MarkupLMTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm.py#L487",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ro=new z({props:{name:"save_vocabulary",anchor:"transformers.MarkupLMTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm.py#L386"}}),Wo=new me({}),Uo=new z({props:{name:"class transformers.MarkupLMTokenizerFast",anchor:"transformers.MarkupLMTokenizerFast",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"tags_dict",val:""},{name:"tokenizer_file",val:" = None"},{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_depth",val:" = 50"},{name:"max_width",val:" = 1000"},{name:"pad_width",val:" = 1001"},{name:"pad_token_label",val:" = -100"},{name:"only_label_first_subword",val:" = True"},{name:"trim_offsets",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.MarkupLMTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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.MarkupLMTokenizerFast.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. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm_fast.py#L99"}}),Ho=new z({props:{name:"batch_encode_plus",anchor:"transformers.MarkupLMTokenizerFast.batch_encode_plus",parameters:[{name:"batch_text_or_text_pairs",val:": typing.Union[typing.List[str], typing.List[typing.Tuple[str, str]], typing.List[typing.List[str]]]"},{name:"is_pair",val:": bool = None"},{name:"xpaths",val:": typing.Optional[typing.List[typing.List[typing.List[int]]]] = None"},{name:"node_labels",val:": typing.Union[typing.List[int], typing.List[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:"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:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm_fast.py#L429"}}),Vo=new z({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.MarkupLMTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.MarkupLMTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm_fast.py#L879",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Xo=new z({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.MarkupLMTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.MarkupLMTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm_fast.py#L902",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Go=new z({props:{name:"encode_plus",anchor:"transformers.MarkupLMTokenizerFast.encode_plus",parameters:[{name:"text",val:": typing.Union[str, typing.List[str]]"},{name:"text_pair",val:": typing.Optional[typing.List[str]] = None"},{name:"xpaths",val:": typing.Optional[typing.List[typing.List[int]]] = None"},{name:"node_labels",val:": typing.Optional[typing.List[int]] = 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.MarkupLMTokenizerFast.encode_plus.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The first sequence to be encoded. This can be a string, a list of strings or a list of list of strings.`,name:"text"},{anchor:"transformers.MarkupLMTokenizerFast.encode_plus.text_pair",description:`<strong>text_pair</strong> (<code>List[str]</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second sequence to be encoded. This can be a list of strings (words of a single example) or a
list of list of strings (words of a batch of examples).`,name:"text_pair"},{anchor:"transformers.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/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.MarkupLMTokenizerFast.encode_plus.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.27.1/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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/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.MarkupLMTokenizerFast.encode_plus.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.27.1/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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.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.MarkupLMTokenizerFast.encode_plus.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/markuplm/tokenization_markuplm_fast.py#L496"}}),Yo=new z({props:{name:"get_xpath_seq",anchor:"transformers.MarkupLMTokenizerFast.get_xpath_seq",parameters:[{name:"xpath",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/tokenization_markuplm_fast.py#L259"}}),Jo=new me({}),Zo=new z({props:{name:"class transformers.MarkupLMProcessor",anchor:"transformers.MarkupLMProcessor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>MarkupLMFeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor">MarkupLMFeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.MarkupLMProcessor.tokenizer",description:`<strong>tokenizer</strong> (<code>MarkupLMTokenizer</code> or <code>MarkupLMTokenizerFast</code>) &#x2014;
An instance of <a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizer">MarkupLMTokenizer</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast">MarkupLMTokenizerFast</a>. The tokenizer is a required input.`,name:"tokenizer"},{anchor:"transformers.MarkupLMProcessor.parse_html",description:`<strong>parse_html</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use <code>MarkupLMFeatureExtractor</code> to parse HTML strings into nodes and corresponding xpaths.`,name:"parse_html"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/processing_markuplm.py#L25"}}),en=new z({props:{name:"__call__",anchor:"transformers.MarkupLMProcessor.__call__",parameters:[{name:"html_strings",val:" = None"},{name:"nodes",val:" = None"},{name:"xpaths",val:" = None"},{name:"node_labels",val:" = None"},{name:"questions",val:" = 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_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:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/processing_markuplm.py#L48"}}),nn=new me({}),sn=new z({props:{name:"class transformers.MarkupLMModel",anchor:"transformers.MarkupLMModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.MarkupLMModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig">MarkupLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L806"}}),ln=new z({props:{name:"forward",anchor:"transformers.MarkupLMModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"xpath_tags_seq",val:": typing.Optional[torch.LongTensor] = None"},{name:"xpath_subs_seq",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MarkupLMModel.forward.xpath_tags_seq",description:`<strong>xpath_tags_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Tag IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_tags_seq"},{anchor:"transformers.MarkupLMModel.forward.xpath_subs_seq",description:`<strong>xpath_subs_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Subscript IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_subs_seq"},{anchor:"transformers.MarkupLMModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>: <code>1</code> for
tokens that are NOT MASKED, <code>0</code> for MASKED tokens.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MarkupLMModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>: <code>0</code> corresponds to a <em>sentence A</em> token, <code>1</code> corresponds to a <em>sentence B</em> token</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.MarkupLMModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MarkupLMModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>: <code>1</code>
indicates the head is <strong>not masked</strong>, <code>0</code> indicates the head is <strong>masked</strong>.`,name:"head_mask"},{anchor:"transformers.MarkupLMModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MarkupLMModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the attentions tensors of all attention layers are returned. See <code>attentions</code> under
returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MarkupLMModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the hidden states of all layers are returned. See <code>hidden_states</code> under returned tensors
for more detail.`,name:"output_hidden_states"},{anchor:"transformers.MarkupLMModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the model will return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L834",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig"
>MarkupLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wt=new Ac({props:{$$slots:{default:[Cx]},$$scope:{ctx:P}}}),Ut=new ea({props:{anchor:"transformers.MarkupLMModel.forward.example",$$slots:{default:[Px]},$$scope:{ctx:P}}}),dn=new me({}),cn=new z({props:{name:"class transformers.MarkupLMForSequenceClassification",anchor:"transformers.MarkupLMForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig">MarkupLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L1201"}}),un=new z({props:{name:"forward",anchor:"transformers.MarkupLMForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"xpath_tags_seq",val:": typing.Optional[torch.Tensor] = None"},{name:"xpath_subs_seq",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.xpath_tags_seq",description:`<strong>xpath_tags_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Tag IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_tags_seq"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.xpath_subs_seq",description:`<strong>xpath_subs_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Subscript IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_subs_seq"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>: <code>1</code> for
tokens that are NOT MASKED, <code>0</code> for MASKED tokens.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>: <code>0</code> corresponds to a <em>sentence A</em> token, <code>1</code> corresponds to a <em>sentence B</em> token</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>: <code>1</code>
indicates the head is <strong>not masked</strong>, <code>0</code> indicates the head is <strong>masked</strong>.`,name:"head_mask"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the attentions tensors of all attention layers are returned. See <code>attentions</code> under
returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the hidden states of all layers are returned. See <code>hidden_states</code> under returned tensors
for more detail.`,name:"output_hidden_states"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the model will return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MarkupLMForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L1218",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig"
>MarkupLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vt=new Ac({props:{$$slots:{default:[Dx]},$$scope:{ctx:P}}}),Qt=new ea({props:{anchor:"transformers.MarkupLMForSequenceClassification.forward.example",$$slots:{default:[Ox]},$$scope:{ctx:P}}}),mn=new me({}),fn=new z({props:{name:"class transformers.MarkupLMForTokenClassification",anchor:"transformers.MarkupLMForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig">MarkupLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L1095"}}),_n=new z({props:{name:"forward",anchor:"transformers.MarkupLMForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"xpath_tags_seq",val:": typing.Optional[torch.Tensor] = None"},{name:"xpath_subs_seq",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MarkupLMForTokenClassification.forward.xpath_tags_seq",description:`<strong>xpath_tags_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Tag IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_tags_seq"},{anchor:"transformers.MarkupLMForTokenClassification.forward.xpath_subs_seq",description:`<strong>xpath_subs_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Subscript IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_subs_seq"},{anchor:"transformers.MarkupLMForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>: <code>1</code> for
tokens that are NOT MASKED, <code>0</code> for MASKED tokens.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MarkupLMForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>: <code>0</code> corresponds to a <em>sentence A</em> token, <code>1</code> corresponds to a <em>sentence B</em> token</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.MarkupLMForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MarkupLMForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>: <code>1</code>
indicates the head is <strong>not masked</strong>, <code>0</code> indicates the head is <strong>masked</strong>.`,name:"head_mask"},{anchor:"transformers.MarkupLMForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MarkupLMForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the attentions tensors of all attention layers are returned. See <code>attentions</code> under
returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MarkupLMForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the hidden states of all layers are returned. See <code>hidden_states</code> under returned tensors
for more detail.`,name:"output_hidden_states"},{anchor:"transformers.MarkupLMForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the model will return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MarkupLMForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L1111",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig"
>MarkupLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gt=new Ac({props:{$$slots:{default:[Ax]},$$scope:{ctx:P}}}),Kt=new ea({props:{anchor:"transformers.MarkupLMForTokenClassification.forward.example",$$slots:{default:[Ix]},$$scope:{ctx:P}}}),kn=new me({}),vn=new z({props:{name:"class transformers.MarkupLMForQuestionAnswering",anchor:"transformers.MarkupLMForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.MarkupLMForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig">MarkupLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L973"}}),wn=new z({props:{name:"forward",anchor:"transformers.MarkupLMForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"xpath_tags_seq",val:": typing.Optional[torch.Tensor] = None"},{name:"xpath_subs_seq",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MarkupLMForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.xpath_tags_seq",description:`<strong>xpath_tags_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Tag IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_tags_seq"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.xpath_subs_seq",description:`<strong>xpath_subs_seq</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, config.max_depth)</code>, <em>optional</em>) &#x2014;
Subscript IDs for each token in the input sequence, padded up to config.max_depth.`,name:"xpath_subs_seq"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>: <code>1</code> for
tokens that are NOT MASKED, <code>0</code> for MASKED tokens.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>: <code>0</code> corresponds to a <em>sentence A</em> token, <code>1</code> corresponds to a <em>sentence B</em> token</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>: <code>1</code>
indicates the head is <strong>not masked</strong>, <code>0</code> indicates the head is <strong>masked</strong>.`,name:"head_mask"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the attentions tensors of all attention layers are returned. See <code>attentions</code> under
returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the hidden states of all layers are returned. See <code>hidden_states</code> under returned tensors
for more detail.`,name:"output_hidden_states"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, the model will return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.MarkupLMForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/markuplm/modeling_markuplm.py#L987",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMConfig"
>MarkupLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jt=new Ac({props:{$$slots:{default:[Nx]},$$scope:{ctx:P}}}),Zt=new ea({props:{anchor:"transformers.MarkupLMForQuestionAnswering.forward.example",$$slots:{default:[Sx]},$$scope:{ctx:P}}}),{c(){m=a("meta"),T=l(),_=a("h1"),g=a("a"),x=a("span"),k(h.$$.fragment),f=l(),G=a("span"),Ic=o("MarkupLM"),ud=l(),Be=a("h2"),ht=a("a"),oa=a("span"),k(co.$$.fragment),Nc=l(),na=a("span"),Sc=o("Overview"),md=l(),qe=a("p"),Bc=o("The MarkupLM model was proposed in "),po=a("a"),Rc=o(`MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document
Understanding`),Wc=o(` by Junlong Li, Yiheng Xu, Lei Cui, Furu Wei. MarkupLM is BERT, but
applied to HTML pages instead of raw text documents. The model incorporates additional embedding layers to improve
performance, similar to `),Ln=a("a"),Uc=o("LayoutLM"),Hc=o("."),fd=l(),qn=a("p"),Vc=o(`The model can be used for tasks like question answering on web pages or information extraction from web pages. It obtains
state-of-the-art results on 2 important benchmarks:`),gd=l(),ut=a("ul"),$n=a("li"),ho=a("a"),Qc=o("WebSRC"),Xc=o(", a dataset for Web-Based Structural Reading Comprehension (a bit like SQuAD but for web pages)"),Gc=l(),Fn=a("li"),uo=a("a"),Kc=o("SWDE"),Yc=o(`, a dataset
for information extraction from web pages (basically named-entity recogntion on web pages)`),_d=l(),zn=a("p"),Jc=o("The abstract from the paper is the following:"),kd=l(),jn=a("p"),sa=a("em"),Zc=o(`Multimodal pre-training with text, layout, and image has made significant progress for Visually-rich Document
Understanding (VrDU), especially the fixed-layout documents such as scanned document images. While, there are still a
large number of digital documents where the layout information is not fixed and needs to be interactively and
dynamically rendered for visualization, making existing layout-based pre-training approaches not easy to apply. In this
paper, we propose MarkupLM for document understanding tasks with markup languages as the backbone such as
HTML/XML-based documents, where text and markup information is jointly pre-trained. Experiment results show that the
pre-trained MarkupLM significantly outperforms the existing strong baseline models on several document understanding
tasks. The pre-trained model and code will be publicly available.`),vd=l(),Cn=a("p"),ep=o("Tips:"),bd=l(),$e=a("ul"),le=a("li"),tp=o("In addition to "),aa=a("code"),op=o("input_ids"),np=o(", "),Pn=a("a"),sp=o("forward()"),ap=o(" expects 2 additional inputs, namely "),ra=a("code"),rp=o("xpath_tags_seq"),ip=o(" and "),ia=a("code"),lp=o("xpath_subs_seq"),dp=o(`.
These are the XPATH tags and subscripts respectively for each token in the input sequence.`),cp=l(),Re=a("li"),pp=o("One can use "),Dn=a("a"),hp=o("MarkupLMProcessor"),up=o(" to prepare all data for the model. Refer to the "),On=a("a"),mp=o("usage guide"),fp=o(" for more info."),gp=l(),mo=a("li"),_p=o("Demo notebooks can be found "),fo=a("a"),kp=o("here"),vp=o("."),Md=l(),mt=a("img"),wd=l(),go=a("small"),bp=o("MarkupLM architecture. Taken from the "),An=a("a"),Mp=o("original paper."),yd=l(),Fe=a("p"),wp=o("This model was contributed by "),_o=a("a"),yp=o("nielsr"),xp=o(". The original code can be found "),ko=a("a"),Tp=o("here"),Ep=o("."),xd=l(),We=a("h2"),ft=a("a"),la=a("span"),k(vo.$$.fragment),Lp=l(),da=a("span"),qp=o("Usage: MarkupLMProcessor"),Td=l(),J=a("p"),$p=o("The easiest way to prepare data for the model is to use "),In=a("a"),Fp=o("MarkupLMProcessor"),zp=o(`, which internally combines a feature extractor
(`),Nn=a("a"),jp=o("MarkupLMFeatureExtractor"),Cp=o(") and a tokenizer ("),Sn=a("a"),Pp=o("MarkupLMTokenizer"),Dp=o(" or "),Bn=a("a"),Op=o("MarkupLMTokenizerFast"),Ap=o(`). The feature extractor is
used to extract all nodes and xpaths from the HTML strings, which are then provided to the tokenizer, which turns them into the
token-level inputs of the model (`),ca=a("code"),Ip=o("input_ids"),Np=o(` etc.). Note that you can still use the feature extractor and tokenizer separately,
if you only want to handle one of the two tasks.`),Ed=l(),k(bo.$$.fragment),Ld=l(),F=a("p"),Sp=o("In short, one can provide HTML strings (and possibly additional data) to "),Rn=a("a"),Bp=o("MarkupLMProcessor"),Rp=o(`,
and it will create the inputs expected by the model. Internally, the processor first uses
`),Wn=a("a"),Wp=o("MarkupLMFeatureExtractor"),Up=o(` to get a list of nodes and corresponding xpaths. The nodes and
xpaths are then provided to `),Un=a("a"),Hp=o("MarkupLMTokenizer"),Vp=o(" or "),Hn=a("a"),Qp=o("MarkupLMTokenizerFast"),Xp=o(`, which converts them
to token-level `),pa=a("code"),Gp=o("input_ids"),Kp=o(", "),ha=a("code"),Yp=o("attention_mask"),Jp=o(", "),ua=a("code"),Zp=o("token_type_ids"),eh=o(", "),ma=a("code"),th=o("xpath_subs_seq"),oh=o(", "),fa=a("code"),nh=o("xpath_tags_seq"),sh=o(`.
Optionally, one can provide node labels to the processor, which are turned into token-level `),ga=a("code"),ah=o("labels"),rh=o("."),qd=l(),de=a("p"),Vn=a("a"),ih=o("MarkupLMFeatureExtractor"),lh=o(" uses "),Mo=a("a"),dh=o("Beautiful Soup"),ch=o(`, a Python library for
pulling data out of HTML and XML files, under the hood. Note that you can still use your own parsing solution of
choice, and provide the nodes and xpaths yourself to `),Qn=a("a"),ph=o("MarkupLMTokenizer"),hh=o(" or "),Xn=a("a"),uh=o("MarkupLMTokenizerFast"),mh=o("."),$d=l(),Gn=a("p"),fh=o(`In total, there are 5 use cases that are supported by the processor. Below, we list them all. Note that each of these
use cases work for both batched and non-batched inputs (we illustrate them for non-batched inputs).`),Fd=l(),Kn=a("p"),_a=a("strong"),gh=o("Use case 1: web page classification (training, inference) + token classification (inference), parse_html = True"),zd=l(),Yn=a("p"),_h=o("This is the simplest case, in which the processor will use the feature extractor to get all nodes and xpaths from the HTML."),jd=l(),k(wo.$$.fragment),Cd=l(),Jn=a("p"),ka=a("strong"),kh=o("Use case 2: web page classification (training, inference) + token classification (inference), parse_html=False"),Pd=l(),ze=a("p"),vh=o(`In case one already has obtained all nodes and xpaths, one doesn\u2019t need the feature extractor. In that case, one should
provide the nodes and corresponding xpaths themselves to the processor, and make sure to set `),va=a("code"),bh=o("parse_html"),Mh=o(" to "),ba=a("code"),wh=o("False"),yh=o("."),Dd=l(),k(yo.$$.fragment),Od=l(),Zn=a("p"),Ma=a("strong"),xh=o("Use case 3: token classification (training), parse_html=False"),Ad=l(),Z=a("p"),Th=o("For token classification tasks (such as "),xo=a("a"),Eh=o("SWDE"),Lh=o(`), one can also provide the
corresponding node labels in order to train a model. The processor will then convert these into token-level `),wa=a("code"),qh=o("labels"),$h=o(`.
By default, it will only label the first wordpiece of a word, and label the remaining wordpieces with -100, which is the
`),ya=a("code"),Fh=o("ignore_index"),zh=o(` of PyTorch\u2019s CrossEntropyLoss. In case you want all wordpieces of a word to be labeled, you can
initialize the tokenizer with `),xa=a("code"),jh=o("only_label_first_subword"),Ch=o(" set to "),Ta=a("code"),Ph=o("False"),Dh=o("."),Id=l(),k(To.$$.fragment),Nd=l(),es=a("p"),Ea=a("strong"),Oh=o("Use case 4: web page question answering (inference), parse_html=True"),Sd=l(),ts=a("p"),Ah=o(`For question answering tasks on web pages, you can provide a question to the processor. By default, the
processor will use the feature extractor to get all nodes and xpaths, and create [CLS] question tokens [SEP] word tokens [SEP].`),Bd=l(),k(Eo.$$.fragment),Rd=l(),os=a("p"),La=a("strong"),Ih=o("Use case 5: web page question answering (inference), parse_html=False"),Wd=l(),je=a("p"),Nh=o(`For question answering tasks (such as WebSRC), you can provide a question to the processor. If you have extracted
all nodes and xpaths yourself, you can provide them directly to the processor. Make sure to set `),qa=a("code"),Sh=o("parse_html"),Bh=o(" to "),$a=a("code"),Rh=o("False"),Wh=o("."),Ud=l(),k(Lo.$$.fragment),Hd=l(),Ue=a("h2"),gt=a("a"),Fa=a("span"),k(qo.$$.fragment),Uh=l(),za=a("span"),Hh=o("Documentation resources"),Vd=l(),Ce=a("ul"),ja=a("li"),ns=a("a"),Vh=o("Text classification task guide"),Qh=l(),Ca=a("li"),ss=a("a"),Xh=o("Token classification task guide"),Gh=l(),Pa=a("li"),as=a("a"),Kh=o("Question answering task guide"),Qd=l(),He=a("h2"),_t=a("a"),Da=a("span"),k($o.$$.fragment),Yh=l(),Oa=a("span"),Jh=o("MarkupLMConfig"),Xd=l(),ce=a("div"),k(Fo.$$.fragment),Zh=l(),Ve=a("p"),eu=o("This is the configuration class to store the configuration of a "),rs=a("a"),tu=o("MarkupLMModel"),ou=o(`. It is used to instantiate a
MarkupLM model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the MarkupLM
`),zo=a("a"),nu=o("microsoft/markuplm-base"),su=o(" architecture."),au=l(),Qe=a("p"),ru=o("Configuration objects inherit from "),is=a("a"),iu=o("BertConfig"),lu=o(` and can be used to control the model outputs. Read the
documentation from `),ls=a("a"),du=o("BertConfig"),cu=o(" for more information."),pu=l(),k(kt.$$.fragment),Gd=l(),Xe=a("h2"),vt=a("a"),Aa=a("span"),k(jo.$$.fragment),hu=l(),Ia=a("span"),uu=o("MarkupLMFeatureExtractor"),Kd=l(),pe=a("div"),k(Co.$$.fragment),mu=l(),Na=a("p"),fu=o(`Constructs a MarkupLM feature extractor. This can be used to get a list of nodes and corresponding xpaths from HTML
strings.`),gu=l(),Po=a("p"),_u=o("This feature extractor inherits from "),Sa=a("code"),ku=o("PreTrainedFeatureExtractor()"),vu=o(` which contains most
of the main methods. Users should refer to this superclass for more information regarding those methods.`),bu=l(),Pe=a("div"),k(Do.$$.fragment),Mu=l(),Ba=a("p"),wu=o("Main method to prepare for the model one or several HTML strings."),yu=l(),k(bt.$$.fragment),Yd=l(),Ge=a("h2"),Mt=a("a"),Ra=a("span"),k(Oo.$$.fragment),xu=l(),Wa=a("span"),Tu=o("MarkupLMTokenizer"),Jd=l(),K=a("div"),k(Ao.$$.fragment),Eu=l(),S=a("p"),Lu=o("Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE). "),ds=a("a"),qu=o("MarkupLMTokenizer"),$u=o(` can be used to
turn HTML strings into to token-level `),Ua=a("code"),Fu=o("input_ids"),zu=o(", "),Ha=a("code"),ju=o("attention_mask"),Cu=o(", "),Va=a("code"),Pu=o("token_type_ids"),Du=o(", "),Qa=a("code"),Ou=o("xpath_tags_seq"),Au=o(` and
`),Xa=a("code"),Iu=o("xpath_tags_seq"),Nu=o(". This tokenizer inherits from "),cs=a("a"),Su=o("PreTrainedTokenizer"),Bu=o(` which contains most of the main methods.
Users should refer to this superclass for more information regarding those methods.`),Ru=l(),De=a("div"),k(Io.$$.fragment),Wu=l(),Ga=a("p"),Uu=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),Hu=l(),No=a("ul"),ps=a("li"),Vu=o("single sequence: "),Ka=a("code"),Qu=o("<s> X </s>"),Xu=l(),hs=a("li"),Gu=o("pair of sequences: "),Ya=a("code"),Ku=o("<s> A </s></s> B </s>"),Yu=l(),us=a("div"),k(So.$$.fragment),Ju=l(),wt=a("div"),k(Bo.$$.fragment),Zu=l(),Ja=a("p"),em=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),tm=l(),ms=a("div"),k(Ro.$$.fragment),Zd=l(),Ke=a("h2"),yt=a("a"),Za=a("span"),k(Wo.$$.fragment),om=l(),er=a("span"),nm=o("MarkupLMTokenizerFast"),ec=l(),j=a("div"),k(Uo.$$.fragment),sm=l(),tr=a("p"),am=o("Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE)."),rm=l(),B=a("p"),fs=a("a"),im=o("MarkupLMTokenizerFast"),lm=o(" can be used to turn HTML strings into to token-level "),or=a("code"),dm=o("input_ids"),cm=o(", "),nr=a("code"),pm=o("attention_mask"),hm=o(`,
`),sr=a("code"),um=o("token_type_ids"),mm=o(", "),ar=a("code"),fm=o("xpath_tags_seq"),gm=o(" and "),rr=a("code"),_m=o("xpath_tags_seq"),km=o(". This tokenizer inherits from "),gs=a("a"),vm=o("PreTrainedTokenizer"),bm=o(` which
contains most of the main methods.`),Mm=l(),ir=a("p"),wm=o("Users should refer to this superclass for more information regarding those methods."),ym=l(),R=a("div"),k(Ho.$$.fragment),xm=l(),O=a("p"),Tm=o("add_special_tokens ("),lr=a("code"),Em=o("bool"),Lm=o(", "),dr=a("em"),qm=o("optional"),$m=o(", defaults to "),cr=a("code"),Fm=o("True"),zm=o(`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),pr=a("code"),jm=o("bool"),Cm=o(", "),hr=a("code"),Pm=o("str"),Dm=o(" or "),_s=a("a"),Om=o("PaddingStrategy"),Am=o(", "),ur=a("em"),Im=o("optional"),Nm=o(", defaults to "),mr=a("code"),Sm=o("False"),Bm=o(`):
Activates and controls padding. Accepts the following values:`),Rm=l(),Y=a("ul"),fr=a("li"),xt=a("p"),gr=a("code"),Wm=o("True"),Um=o(" or "),_r=a("code"),Hm=o("'longest'"),Vm=o(`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),Qm=l(),kr=a("li"),Tt=a("p"),vr=a("code"),Xm=o("'max_length'"),Gm=o(": Pad to a maximum length specified with the argument "),br=a("code"),Km=o("max_length"),Ym=o(` or to the maximum
acceptable input length for the model if that argument is not provided.`),Jm=l(),Mr=a("li"),W=a("p"),wr=a("code"),Zm=o("False"),ef=o(" or "),yr=a("code"),tf=o("'do_not_pad'"),of=o(` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),xr=a("code"),nf=o("bool"),sf=o(", "),Tr=a("code"),af=o("str"),rf=o(" or "),ks=a("a"),lf=o("TruncationStrategy"),df=o(", "),Er=a("em"),cf=o("optional"),pf=o(", defaults to "),Lr=a("code"),hf=o("False"),uf=o(`):
Activates and controls truncation. Accepts the following values:`),mf=l(),qr=a("li"),Oe=a("p"),$r=a("code"),ff=o("True"),gf=o(" or "),Fr=a("code"),_f=o("'longest_first'"),kf=o(": Truncate to a maximum length specified with the argument "),zr=a("code"),vf=o("max_length"),bf=o(` 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.`),Mf=l(),jr=a("li"),Et=a("p"),Cr=a("code"),wf=o("'only_first'"),yf=o(": Truncate to a maximum length specified with the argument "),Pr=a("code"),xf=o("max_length"),Tf=o(` 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.`),Ef=l(),Dr=a("li"),Lt=a("p"),Or=a("code"),Lf=o("'only_second'"),qf=o(": Truncate to a maximum length specified with the argument "),Ar=a("code"),$f=o("max_length"),Ff=o(` 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.`),zf=l(),Ir=a("li"),fe=a("p"),Nr=a("code"),jf=o("False"),Cf=o(" or "),Sr=a("code"),Pf=o("'do_not_truncate'"),Df=o(` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Br=a("code"),Of=o("int"),Af=o(", "),Rr=a("em"),If=o("optional"),Nf=o(`):
Controls the maximum length to use by one of the truncation/padding parameters.`),Sf=l(),E=a("p"),Bf=o("If left unset or set to "),Wr=a("code"),Rf=o("None"),Wf=o(`, 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.
stride (`),Ur=a("code"),Uf=o("int"),Hf=o(", "),Hr=a("em"),Vf=o("optional"),Qf=o(`, defaults to 0):
If set to a number along with `),Vr=a("code"),Xf=o("max_length"),Gf=o(`, the overflowing tokens returned when
`),Qr=a("code"),Kf=o("return_overflowing_tokens=True"),Yf=o(` 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.
is_split_into_words (`),Xr=a("code"),Jf=o("bool"),Zf=o(", "),Gr=a("em"),eg=o("optional"),tg=o(", defaults to "),Kr=a("code"),og=o("False"),ng=o(`):
Whether or not the input is already pre-tokenized (e.g., split into words). If set to `),Yr=a("code"),sg=o("True"),ag=o(`, 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.
pad_to_multiple_of (`),Jr=a("code"),rg=o("int"),ig=o(", "),Zr=a("em"),lg=o("optional"),dg=o(`):
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 `),ei=a("code"),cg=o(">= 7.5"),pg=o(` (Volta).
return_tensors (`),ti=a("code"),hg=o("str"),ug=o(" or "),vs=a("a"),mg=o("TensorType"),fg=o(", "),oi=a("em"),gg=o("optional"),_g=o(`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),kg=l(),Ye=a("ul"),qt=a("li"),ni=a("code"),vg=o("'tf'"),bg=o(": Return TensorFlow "),si=a("code"),Mg=o("tf.constant"),wg=o(" objects."),yg=l(),$t=a("li"),ai=a("code"),xg=o("'pt'"),Tg=o(": Return PyTorch "),ri=a("code"),Eg=o("torch.Tensor"),Lg=o(" objects."),qg=l(),Ft=a("li"),ii=a("code"),$g=o("'np'"),Fg=o(": Return Numpy "),li=a("code"),zg=o("np.ndarray"),jg=o(" objects."),Cg=l(),A=a("p"),Pg=o("add_special_tokens ("),di=a("code"),Dg=o("bool"),Og=o(", "),ci=a("em"),Ag=o("optional"),Ig=o(", defaults to "),pi=a("code"),Ng=o("True"),Sg=o(`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),hi=a("code"),Bg=o("bool"),Rg=o(", "),ui=a("code"),Wg=o("str"),Ug=o(" or "),bs=a("a"),Hg=o("PaddingStrategy"),Vg=o(", "),mi=a("em"),Qg=o("optional"),Xg=o(", defaults to "),fi=a("code"),Gg=o("False"),Kg=o(`):
Activates and controls padding. Accepts the following values:`),Yg=l(),C=a("ul"),gi=a("li"),zt=a("p"),_i=a("code"),Jg=o("True"),Zg=o(" or "),ki=a("code"),e_=o("'longest'"),t_=o(`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),o_=l(),vi=a("li"),jt=a("p"),bi=a("code"),n_=o("'max_length'"),s_=o(": Pad to a maximum length specified with the argument "),Mi=a("code"),a_=o("max_length"),r_=o(` or to the maximum
acceptable input length for the model if that argument is not provided.`),i_=l(),wi=a("li"),U=a("p"),yi=a("code"),l_=o("False"),d_=o(" or "),xi=a("code"),c_=o("'do_not_pad'"),p_=o(` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),Ti=a("code"),h_=o("bool"),u_=o(", "),Ei=a("code"),m_=o("str"),f_=o(" or "),Ms=a("a"),g_=o("TruncationStrategy"),__=o(", "),Li=a("em"),k_=o("optional"),v_=o(", defaults to "),qi=a("code"),b_=o("False"),M_=o(`):
Activates and controls truncation. Accepts the following values:`),w_=l(),$i=a("li"),Ae=a("p"),Fi=a("code"),y_=o("True"),x_=o(" or "),zi=a("code"),T_=o("'longest_first'"),E_=o(": Truncate to a maximum length specified with the argument "),ji=a("code"),L_=o("max_length"),q_=o(` 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.`),$_=l(),Ci=a("li"),Ct=a("p"),Pi=a("code"),F_=o("'only_first'"),z_=o(": Truncate to a maximum length specified with the argument "),Di=a("code"),j_=o("max_length"),C_=o(` 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.`),P_=l(),Oi=a("li"),Pt=a("p"),Ai=a("code"),D_=o("'only_second'"),O_=o(": Truncate to a maximum length specified with the argument "),Ii=a("code"),A_=o("max_length"),I_=o(` 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.`),N_=l(),Ni=a("li"),L=a("p"),Si=a("code"),S_=o("False"),B_=o(" or "),Bi=a("code"),R_=o("'do_not_truncate'"),W_=o(` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Ri=a("code"),U_=o("int"),H_=o(", "),Wi=a("em"),V_=o("optional"),Q_=o(`):
Controls the maximum length to use by one of the truncation/padding parameters. If left unset or set to
`),Ui=a("code"),X_=o("None"),G_=o(`, 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.
stride (`),Hi=a("code"),K_=o("int"),Y_=o(", "),Vi=a("em"),J_=o("optional"),Z_=o(`, defaults to 0):
If set to a number along with `),Qi=a("code"),ek=o("max_length"),tk=o(`, the overflowing tokens returned when
`),Xi=a("code"),ok=o("return_overflowing_tokens=True"),nk=o(` 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.
pad_to_multiple_of (`),Gi=a("code"),sk=o("int"),ak=o(", "),Ki=a("em"),rk=o("optional"),ik=o(`):
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 `),Yi=a("code"),lk=o(">= 7.5"),dk=o(` (Volta).
return_tensors (`),Ji=a("code"),ck=o("str"),pk=o(" or "),ws=a("a"),hk=o("TensorType"),uk=o(", "),Zi=a("em"),mk=o("optional"),fk=o(`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),gk=l(),el=a("li"),Dt=a("p"),tl=a("code"),_k=o("'tf'"),kk=o(": Return TensorFlow "),ol=a("code"),vk=o("tf.constant"),bk=o(" objects."),Mk=l(),nl=a("li"),Ot=a("p"),sl=a("code"),wk=o("'pt'"),yk=o(": Return PyTorch "),al=a("code"),xk=o("torch.Tensor"),Tk=o(" objects."),Ek=l(),rl=a("li"),At=a("p"),il=a("code"),Lk=o("'np'"),qk=o(": Return Numpy "),ll=a("code"),$k=o("np.ndarray"),Fk=o(" objects."),zk=l(),Ie=a("div"),k(Vo.$$.fragment),jk=l(),dl=a("p"),Ck=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),Pk=l(),Qo=a("ul"),ys=a("li"),Dk=o("single sequence: "),cl=a("code"),Ok=o("<s> X </s>"),Ak=l(),xs=a("li"),Ik=o("pair of sequences: "),pl=a("code"),Nk=o("<s> A </s></s> B </s>"),Sk=l(),It=a("div"),k(Xo.$$.fragment),Bk=l(),hl=a("p"),Rk=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),Wk=l(),Nt=a("div"),k(Go.$$.fragment),Uk=l(),Ko=a("p"),Hk=o(`Tokenize and prepare for the model a sequence or a pair of sequences. .. warning:: This method is deprecated,
`),ul=a("code"),Vk=o("__call__"),Qk=o(" should be used instead."),Xk=l(),St=a("div"),k(Yo.$$.fragment),Gk=l(),ml=a("p"),Kk=o(`Given the xpath expression of one particular node (like \u201C/html/body/div/li[1]/div/span[2]\u201D), return a list of
tag IDs and corresponding subscripts, taking into account max depth.`),tc=l(),Je=a("h2"),Bt=a("a"),fl=a("span"),k(Jo.$$.fragment),Yk=l(),gl=a("span"),Jk=o("MarkupLMProcessor"),oc=l(),te=a("div"),k(Zo.$$.fragment),Zk=l(),_l=a("p"),ev=o(`Constructs a MarkupLM processor which combines a MarkupLM feature extractor and a MarkupLM tokenizer into a single
processor.`),tv=l(),Ts=a("p"),Es=a("a"),ov=o("MarkupLMProcessor"),nv=o(" offers all the functionalities you need to prepare data for the model."),sv=l(),I=a("p"),av=o("It first uses "),Ls=a("a"),rv=o("MarkupLMFeatureExtractor"),iv=o(` to extract nodes and corresponding xpaths from one or more HTML strings.
Next, these are provided to `),qs=a("a"),lv=o("MarkupLMTokenizer"),dv=o(" or "),$s=a("a"),cv=o("MarkupLMTokenizerFast"),pv=o(`, which turns them into token-level
`),kl=a("code"),hv=o("input_ids"),uv=o(", "),vl=a("code"),mv=o("attention_mask"),fv=o(", "),bl=a("code"),gv=o("token_type_ids"),_v=o(", "),Ml=a("code"),kv=o("xpath_tags_seq"),vv=o(" and "),wl=a("code"),bv=o("xpath_subs_seq"),Mv=o("."),wv=l(),ge=a("div"),k(en.$$.fragment),yv=l(),oe=a("p"),xv=o("This method first forwards the "),yl=a("code"),Tv=o("html_strings"),Ev=o(" argument to "),tn=a("a"),xl=a("strong"),Lv=o("call"),qv=o("()"),$v=o(`. Next, it
passes the `),Tl=a("code"),Fv=o("nodes"),zv=o(" and "),El=a("code"),jv=o("xpaths"),Cv=o(" along with the additional arguments to "),Ll=a("code"),Pv=o("__call__()"),Dv=o(` and
returns the output.`),Ov=l(),on=a("p"),Av=o("Optionally, one can also provide a "),ql=a("code"),Iv=o("text"),Nv=o(" argument which is passed along as first sequence."),Sv=l(),$l=a("p"),Bv=o("Please refer to the docstring of the above two methods for more information."),nc=l(),Ze=a("h2"),Rt=a("a"),Fl=a("span"),k(nn.$$.fragment),Rv=l(),zl=a("span"),Wv=o("MarkupLMModel"),sc=l(),Ee=a("div"),k(sn.$$.fragment),Uv=l(),an=a("p"),Hv=o(`The bare MarkupLM Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),rn=a("a"),Vv=o("torch.nn.Module"),Qv=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xv=l(),_e=a("div"),k(ln.$$.fragment),Gv=l(),et=a("p"),Kv=o("The "),Fs=a("a"),Yv=o("MarkupLMModel"),Jv=o(" forward method, overrides the "),jl=a("code"),Zv=o("__call__"),eb=o(" special method."),tb=l(),k(Wt.$$.fragment),ob=l(),k(Ut.$$.fragment),ac=l(),tt=a("h2"),Ht=a("a"),Cl=a("span"),k(dn.$$.fragment),nb=l(),Pl=a("span"),sb=o("MarkupLMForSequenceClassification"),rc=l(),he=a("div"),k(cn.$$.fragment),ab=l(),Dl=a("p"),rb=o(`MarkupLM Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),ib=l(),pn=a("p"),lb=o("This model is a PyTorch "),hn=a("a"),db=o("torch.nn.Module"),cb=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),pb=l(),ke=a("div"),k(un.$$.fragment),hb=l(),ot=a("p"),ub=o("The "),zs=a("a"),mb=o("MarkupLMForSequenceClassification"),fb=o(" forward method, overrides the "),Ol=a("code"),gb=o("__call__"),_b=o(" special method."),kb=l(),k(Vt.$$.fragment),vb=l(),k(Qt.$$.fragment),ic=l(),nt=a("h2"),Xt=a("a"),Al=a("span"),k(mn.$$.fragment),bb=l(),Il=a("span"),Mb=o("MarkupLMForTokenClassification"),lc=l(),Le=a("div"),k(fn.$$.fragment),wb=l(),st=a("p"),yb=o("MarkupLM Model with a "),Nl=a("code"),xb=o("token_classification"),Tb=o(` head on top.
This model is a PyTorch `),gn=a("a"),Eb=o("torch.nn.Module"),Lb=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),qb=l(),ve=a("div"),k(_n.$$.fragment),$b=l(),at=a("p"),Fb=o("The "),js=a("a"),zb=o("MarkupLMForTokenClassification"),jb=o(" forward method, overrides the "),Sl=a("code"),Cb=o("__call__"),Pb=o(" special method."),Db=l(),k(Gt.$$.fragment),Ob=l(),k(Kt.$$.fragment),dc=l(),rt=a("h2"),Yt=a("a"),Bl=a("span"),k(kn.$$.fragment),Ab=l(),Rl=a("span"),Ib=o("MarkupLMForQuestionAnswering"),cc=l(),ue=a("div"),k(vn.$$.fragment),Nb=l(),it=a("p"),Sb=o(`MarkupLM Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Wl=a("code"),Bb=o("span start logits"),Rb=o(" and "),Ul=a("code"),Wb=o("span end logits"),Ub=o(")."),Hb=l(),bn=a("p"),Vb=o("This model is a PyTorch "),Mn=a("a"),Qb=o("torch.nn.Module"),Xb=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Gb=l(),be=a("div"),k(wn.$$.fragment),Kb=l(),lt=a("p"),Yb=o("The "),Cs=a("a"),Jb=o("MarkupLMForQuestionAnswering"),Zb=o(" forward method, overrides the "),Hl=a("code"),eM=o("__call__"),tM=o(" special method."),oM=l(),k(Jt.$$.fragment),nM=l(),k(Zt.$$.fragment),this.h()},l(s){const p=qx('[data-svelte="svelte-1phssyn"]',document.head);m=r(p,"META",{name:!0,content:!0}),p.forEach(t),T=d(s),_=r(s,"H1",{class:!0});var yn=i(_);g=r(yn,"A",{id:!0,class:!0,href:!0});var Vl=i(g);x=r(Vl,"SPAN",{});var Ql=i(x);v(h.$$.fragment,Ql),Ql.forEach(t),Vl.forEach(t),f=d(yn),G=r(yn,"SPAN",{});var Xl=i(G);Ic=n(Xl,"MarkupLM"),Xl.forEach(t),yn.forEach(t),ud=d(s),Be=r(s,"H2",{class:!0});var xn=i(Be);ht=r(xn,"A",{id:!0,class:!0,href:!0});var Gl=i(ht);oa=r(Gl,"SPAN",{});var Kl=i(oa);v(co.$$.fragment,Kl),Kl.forEach(t),Gl.forEach(t),Nc=d(xn),na=r(xn,"SPAN",{});var Yl=i(na);Sc=n(Yl,"Overview"),Yl.forEach(t),xn.forEach(t),md=d(s),qe=r(s,"P",{});var dt=i(qe);Bc=n(dt,"The MarkupLM model was proposed in "),po=r(dt,"A",{href:!0,rel:!0});var Jl=i(po);Rc=n(Jl,`MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document
Understanding`),Jl.forEach(t),Wc=n(dt,` by Junlong Li, Yiheng Xu, Lei Cui, Furu Wei. MarkupLM is BERT, but
applied to HTML pages instead of raw text documents. The model incorporates additional embedding layers to improve
performance, similar to `),Ln=r(dt,"A",{href:!0});var mM=i(Ln);Uc=n(mM,"LayoutLM"),mM.forEach(t),Hc=n(dt,"."),dt.forEach(t),fd=d(s),qn=r(s,"P",{});var fM=i(qn);Vc=n(fM,`The model can be used for tasks like question answering on web pages or information extraction from web pages. It obtains
state-of-the-art results on 2 important benchmarks:`),fM.forEach(t),gd=d(s),ut=r(s,"UL",{});var hc=i(ut);$n=r(hc,"LI",{});var sM=i($n);ho=r(sM,"A",{href:!0,rel:!0});var gM=i(ho);Qc=n(gM,"WebSRC"),gM.forEach(t),Xc=n(sM,", a dataset for Web-Based Structural Reading Comprehension (a bit like SQuAD but for web pages)"),sM.forEach(t),Gc=d(hc),Fn=r(hc,"LI",{});var aM=i(Fn);uo=r(aM,"A",{href:!0,rel:!0});var _M=i(uo);Kc=n(_M,"SWDE"),_M.forEach(t),Yc=n(aM,`, a dataset
for information extraction from web pages (basically named-entity recogntion on web pages)`),aM.forEach(t),hc.forEach(t),_d=d(s),zn=r(s,"P",{});var kM=i(zn);Jc=n(kM,"The abstract from the paper is the following:"),kM.forEach(t),kd=d(s),jn=r(s,"P",{});var vM=i(jn);sa=r(vM,"EM",{});var bM=i(sa);Zc=n(bM,`Multimodal pre-training with text, layout, and image has made significant progress for Visually-rich Document
Understanding (VrDU), especially the fixed-layout documents such as scanned document images. While, there are still a
large number of digital documents where the layout information is not fixed and needs to be interactively and
dynamically rendered for visualization, making existing layout-based pre-training approaches not easy to apply. In this
paper, we propose MarkupLM for document understanding tasks with markup languages as the backbone such as
HTML/XML-based documents, where text and markup information is jointly pre-trained. Experiment results show that the
pre-trained MarkupLM significantly outperforms the existing strong baseline models on several document understanding
tasks. The pre-trained model and code will be publicly available.`),bM.forEach(t),vM.forEach(t),vd=d(s),Cn=r(s,"P",{});var MM=i(Cn);ep=n(MM,"Tips:"),MM.forEach(t),bd=d(s),$e=r(s,"UL",{});var Ps=i($e);le=r(Ps,"LI",{});var Ne=i(le);tp=n(Ne,"In addition to "),aa=r(Ne,"CODE",{});var wM=i(aa);op=n(wM,"input_ids"),wM.forEach(t),np=n(Ne,", "),Pn=r(Ne,"A",{href:!0});var yM=i(Pn);sp=n(yM,"forward()"),yM.forEach(t),ap=n(Ne," expects 2 additional inputs, namely "),ra=r(Ne,"CODE",{});var xM=i(ra);rp=n(xM,"xpath_tags_seq"),xM.forEach(t),ip=n(Ne," and "),ia=r(Ne,"CODE",{});var TM=i(ia);lp=n(TM,"xpath_subs_seq"),TM.forEach(t),dp=n(Ne,`.
These are the XPATH tags and subscripts respectively for each token in the input sequence.`),Ne.forEach(t),cp=d(Ps),Re=r(Ps,"LI",{});var Ds=i(Re);pp=n(Ds,"One can use "),Dn=r(Ds,"A",{href:!0});var EM=i(Dn);hp=n(EM,"MarkupLMProcessor"),EM.forEach(t),up=n(Ds," to prepare all data for the model. Refer to the "),On=r(Ds,"A",{href:!0});var LM=i(On);mp=n(LM,"usage guide"),LM.forEach(t),fp=n(Ds," for more info."),Ds.forEach(t),gp=d(Ps),mo=r(Ps,"LI",{});var uc=i(mo);_p=n(uc,"Demo notebooks can be found "),fo=r(uc,"A",{href:!0,rel:!0});var qM=i(fo);kp=n(qM,"here"),qM.forEach(t),vp=n(uc,"."),uc.forEach(t),Ps.forEach(t),Md=d(s),mt=r(s,"IMG",{src:!0,alt:!0,width:!0}),wd=d(s),go=r(s,"SMALL",{});var rM=i(go);bp=n(rM,"MarkupLM architecture. Taken from the "),An=r(rM,"A",{href:!0});var $M=i(An);Mp=n($M,"original paper."),$M.forEach(t),rM.forEach(t),yd=d(s),Fe=r(s,"P",{});var Os=i(Fe);wp=n(Os,"This model was contributed by "),_o=r(Os,"A",{href:!0,rel:!0});var FM=i(_o);yp=n(FM,"nielsr"),FM.forEach(t),xp=n(Os,". The original code can be found "),ko=r(Os,"A",{href:!0,rel:!0});var zM=i(ko);Tp=n(zM,"here"),zM.forEach(t),Ep=n(Os,"."),Os.forEach(t),xd=d(s),We=r(s,"H2",{class:!0});var mc=i(We);ft=r(mc,"A",{id:!0,class:!0,href:!0});var jM=i(ft);la=r(jM,"SPAN",{});var CM=i(la);v(vo.$$.fragment,CM),CM.forEach(t),jM.forEach(t),Lp=d(mc),da=r(mc,"SPAN",{});var PM=i(da);qp=n(PM,"Usage: MarkupLMProcessor"),PM.forEach(t),mc.forEach(t),Td=d(s),J=r(s,"P",{});var Me=i(J);$p=n(Me,"The easiest way to prepare data for the model is to use "),In=r(Me,"A",{href:!0});var DM=i(In);Fp=n(DM,"MarkupLMProcessor"),DM.forEach(t),zp=n(Me,`, which internally combines a feature extractor
(`),Nn=r(Me,"A",{href:!0});var OM=i(Nn);jp=n(OM,"MarkupLMFeatureExtractor"),OM.forEach(t),Cp=n(Me,") and a tokenizer ("),Sn=r(Me,"A",{href:!0});var AM=i(Sn);Pp=n(AM,"MarkupLMTokenizer"),AM.forEach(t),Dp=n(Me," or "),Bn=r(Me,"A",{href:!0});var IM=i(Bn);Op=n(IM,"MarkupLMTokenizerFast"),IM.forEach(t),Ap=n(Me,`). The feature extractor is
used to extract all nodes and xpaths from the HTML strings, which are then provided to the tokenizer, which turns them into the
token-level inputs of the model (`),ca=r(Me,"CODE",{});var NM=i(ca);Ip=n(NM,"input_ids"),NM.forEach(t),Np=n(Me,` etc.). Note that you can still use the feature extractor and tokenizer separately,
if you only want to handle one of the two tasks.`),Me.forEach(t),Ed=d(s),v(bo.$$.fragment,s),Ld=d(s),F=r(s,"P",{});var D=i(F);Sp=n(D,"In short, one can provide HTML strings (and possibly additional data) to "),Rn=r(D,"A",{href:!0});var SM=i(Rn);Bp=n(SM,"MarkupLMProcessor"),SM.forEach(t),Rp=n(D,`,
and it will create the inputs expected by the model. Internally, the processor first uses
`),Wn=r(D,"A",{href:!0});var BM=i(Wn);Wp=n(BM,"MarkupLMFeatureExtractor"),BM.forEach(t),Up=n(D,` to get a list of nodes and corresponding xpaths. The nodes and
xpaths are then provided to `),Un=r(D,"A",{href:!0});var RM=i(Un);Hp=n(RM,"MarkupLMTokenizer"),RM.forEach(t),Vp=n(D," or "),Hn=r(D,"A",{href:!0});var WM=i(Hn);Qp=n(WM,"MarkupLMTokenizerFast"),WM.forEach(t),Xp=n(D,`, which converts them
to token-level `),pa=r(D,"CODE",{});var UM=i(pa);Gp=n(UM,"input_ids"),UM.forEach(t),Kp=n(D,", "),ha=r(D,"CODE",{});var HM=i(ha);Yp=n(HM,"attention_mask"),HM.forEach(t),Jp=n(D,", "),ua=r(D,"CODE",{});var VM=i(ua);Zp=n(VM,"token_type_ids"),VM.forEach(t),eh=n(D,", "),ma=r(D,"CODE",{});var QM=i(ma);th=n(QM,"xpath_subs_seq"),QM.forEach(t),oh=n(D,", "),fa=r(D,"CODE",{});var XM=i(fa);nh=n(XM,"xpath_tags_seq"),XM.forEach(t),sh=n(D,`.
Optionally, one can provide node labels to the processor, which are turned into token-level `),ga=r(D,"CODE",{});var GM=i(ga);ah=n(GM,"labels"),GM.forEach(t),rh=n(D,"."),D.forEach(t),qd=d(s),de=r(s,"P",{});var ct=i(de);Vn=r(ct,"A",{href:!0});var KM=i(Vn);ih=n(KM,"MarkupLMFeatureExtractor"),KM.forEach(t),lh=n(ct," uses "),Mo=r(ct,"A",{href:!0,rel:!0});var YM=i(Mo);dh=n(YM,"Beautiful Soup"),YM.forEach(t),ch=n(ct,`, a Python library for
pulling data out of HTML and XML files, under the hood. Note that you can still use your own parsing solution of
choice, and provide the nodes and xpaths yourself to `),Qn=r(ct,"A",{href:!0});var JM=i(Qn);ph=n(JM,"MarkupLMTokenizer"),JM.forEach(t),hh=n(ct," or "),Xn=r(ct,"A",{href:!0});var ZM=i(Xn);uh=n(ZM,"MarkupLMTokenizerFast"),ZM.forEach(t),mh=n(ct,"."),ct.forEach(t),$d=d(s),Gn=r(s,"P",{});var e1=i(Gn);fh=n(e1,`In total, there are 5 use cases that are supported by the processor. Below, we list them all. Note that each of these
use cases work for both batched and non-batched inputs (we illustrate them for non-batched inputs).`),e1.forEach(t),Fd=d(s),Kn=r(s,"P",{});var t1=i(Kn);_a=r(t1,"STRONG",{});var o1=i(_a);gh=n(o1,"Use case 1: web page classification (training, inference) + token classification (inference), parse_html = True"),o1.forEach(t),t1.forEach(t),zd=d(s),Yn=r(s,"P",{});var n1=i(Yn);_h=n(n1,"This is the simplest case, in which the processor will use the feature extractor to get all nodes and xpaths from the HTML."),n1.forEach(t),jd=d(s),v(wo.$$.fragment,s),Cd=d(s),Jn=r(s,"P",{});var s1=i(Jn);ka=r(s1,"STRONG",{});var a1=i(ka);kh=n(a1,"Use case 2: web page classification (training, inference) + token classification (inference), parse_html=False"),a1.forEach(t),s1.forEach(t),Pd=d(s),ze=r(s,"P",{});var As=i(ze);vh=n(As,`In case one already has obtained all nodes and xpaths, one doesn\u2019t need the feature extractor. In that case, one should
provide the nodes and corresponding xpaths themselves to the processor, and make sure to set `),va=r(As,"CODE",{});var r1=i(va);bh=n(r1,"parse_html"),r1.forEach(t),Mh=n(As," to "),ba=r(As,"CODE",{});var i1=i(ba);wh=n(i1,"False"),i1.forEach(t),yh=n(As,"."),As.forEach(t),Dd=d(s),v(yo.$$.fragment,s),Od=d(s),Zn=r(s,"P",{});var l1=i(Zn);Ma=r(l1,"STRONG",{});var d1=i(Ma);xh=n(d1,"Use case 3: token classification (training), parse_html=False"),d1.forEach(t),l1.forEach(t),Ad=d(s),Z=r(s,"P",{});var we=i(Z);Th=n(we,"For token classification tasks (such as "),xo=r(we,"A",{href:!0,rel:!0});var c1=i(xo);Eh=n(c1,"SWDE"),c1.forEach(t),Lh=n(we,`), one can also provide the
corresponding node labels in order to train a model. The processor will then convert these into token-level `),wa=r(we,"CODE",{});var p1=i(wa);qh=n(p1,"labels"),p1.forEach(t),$h=n(we,`.
By default, it will only label the first wordpiece of a word, and label the remaining wordpieces with -100, which is the
`),ya=r(we,"CODE",{});var h1=i(ya);Fh=n(h1,"ignore_index"),h1.forEach(t),zh=n(we,` of PyTorch\u2019s CrossEntropyLoss. In case you want all wordpieces of a word to be labeled, you can
initialize the tokenizer with `),xa=r(we,"CODE",{});var u1=i(xa);jh=n(u1,"only_label_first_subword"),u1.forEach(t),Ch=n(we," set to "),Ta=r(we,"CODE",{});var m1=i(Ta);Ph=n(m1,"False"),m1.forEach(t),Dh=n(we,"."),we.forEach(t),Id=d(s),v(To.$$.fragment,s),Nd=d(s),es=r(s,"P",{});var f1=i(es);Ea=r(f1,"STRONG",{});var g1=i(Ea);Oh=n(g1,"Use case 4: web page question answering (inference), parse_html=True"),g1.forEach(t),f1.forEach(t),Sd=d(s),ts=r(s,"P",{});var _1=i(ts);Ah=n(_1,`For question answering tasks on web pages, you can provide a question to the processor. By default, the
processor will use the feature extractor to get all nodes and xpaths, and create [CLS] question tokens [SEP] word tokens [SEP].`),_1.forEach(t),Bd=d(s),v(Eo.$$.fragment,s),Rd=d(s),os=r(s,"P",{});var k1=i(os);La=r(k1,"STRONG",{});var v1=i(La);Ih=n(v1,"Use case 5: web page question answering (inference), parse_html=False"),v1.forEach(t),k1.forEach(t),Wd=d(s),je=r(s,"P",{});var Is=i(je);Nh=n(Is,`For question answering tasks (such as WebSRC), you can provide a question to the processor. If you have extracted
all nodes and xpaths yourself, you can provide them directly to the processor. Make sure to set `),qa=r(Is,"CODE",{});var b1=i(qa);Sh=n(b1,"parse_html"),b1.forEach(t),Bh=n(Is," to "),$a=r(Is,"CODE",{});var M1=i($a);Rh=n(M1,"False"),M1.forEach(t),Wh=n(Is,"."),Is.forEach(t),Ud=d(s),v(Lo.$$.fragment,s),Hd=d(s),Ue=r(s,"H2",{class:!0});var fc=i(Ue);gt=r(fc,"A",{id:!0,class:!0,href:!0});var w1=i(gt);Fa=r(w1,"SPAN",{});var y1=i(Fa);v(qo.$$.fragment,y1),y1.forEach(t),w1.forEach(t),Uh=d(fc),za=r(fc,"SPAN",{});var x1=i(za);Hh=n(x1,"Documentation resources"),x1.forEach(t),fc.forEach(t),Vd=d(s),Ce=r(s,"UL",{});var Ns=i(Ce);ja=r(Ns,"LI",{});var T1=i(ja);ns=r(T1,"A",{href:!0});var E1=i(ns);Vh=n(E1,"Text classification task guide"),E1.forEach(t),T1.forEach(t),Qh=d(Ns),Ca=r(Ns,"LI",{});var L1=i(Ca);ss=r(L1,"A",{href:!0});var q1=i(ss);Xh=n(q1,"Token classification task guide"),q1.forEach(t),L1.forEach(t),Gh=d(Ns),Pa=r(Ns,"LI",{});var $1=i(Pa);as=r($1,"A",{href:!0});var F1=i(as);Kh=n(F1,"Question answering task guide"),F1.forEach(t),$1.forEach(t),Ns.forEach(t),Qd=d(s),He=r(s,"H2",{class:!0});var gc=i(He);_t=r(gc,"A",{id:!0,class:!0,href:!0});var z1=i(_t);Da=r(z1,"SPAN",{});var j1=i(Da);v($o.$$.fragment,j1),j1.forEach(t),z1.forEach(t),Yh=d(gc),Oa=r(gc,"SPAN",{});var C1=i(Oa);Jh=n(C1,"MarkupLMConfig"),C1.forEach(t),gc.forEach(t),Xd=d(s),ce=r(s,"DIV",{class:!0});var eo=i(ce);v(Fo.$$.fragment,eo),Zh=d(eo),Ve=r(eo,"P",{});var Ss=i(Ve);eu=n(Ss,"This is the configuration class to store the configuration of a "),rs=r(Ss,"A",{href:!0});var P1=i(rs);tu=n(P1,"MarkupLMModel"),P1.forEach(t),ou=n(Ss,`. It is used to instantiate a
MarkupLM model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the MarkupLM
`),zo=r(Ss,"A",{href:!0,rel:!0});var D1=i(zo);nu=n(D1,"microsoft/markuplm-base"),D1.forEach(t),su=n(Ss," architecture."),Ss.forEach(t),au=d(eo),Qe=r(eo,"P",{});var Bs=i(Qe);ru=n(Bs,"Configuration objects inherit from "),is=r(Bs,"A",{href:!0});var O1=i(is);iu=n(O1,"BertConfig"),O1.forEach(t),lu=n(Bs,` and can be used to control the model outputs. Read the
documentation from `),ls=r(Bs,"A",{href:!0});var A1=i(ls);du=n(A1,"BertConfig"),A1.forEach(t),cu=n(Bs," for more information."),Bs.forEach(t),pu=d(eo),v(kt.$$.fragment,eo),eo.forEach(t),Gd=d(s),Xe=r(s,"H2",{class:!0});var _c=i(Xe);vt=r(_c,"A",{id:!0,class:!0,href:!0});var I1=i(vt);Aa=r(I1,"SPAN",{});var N1=i(Aa);v(jo.$$.fragment,N1),N1.forEach(t),I1.forEach(t),hu=d(_c),Ia=r(_c,"SPAN",{});var S1=i(Ia);uu=n(S1,"MarkupLMFeatureExtractor"),S1.forEach(t),_c.forEach(t),Kd=d(s),pe=r(s,"DIV",{class:!0});var to=i(pe);v(Co.$$.fragment,to),mu=d(to),Na=r(to,"P",{});var B1=i(Na);fu=n(B1,`Constructs a MarkupLM feature extractor. This can be used to get a list of nodes and corresponding xpaths from HTML
strings.`),B1.forEach(t),gu=d(to),Po=r(to,"P",{});var kc=i(Po);_u=n(kc,"This feature extractor inherits from "),Sa=r(kc,"CODE",{});var R1=i(Sa);ku=n(R1,"PreTrainedFeatureExtractor()"),R1.forEach(t),vu=n(kc,` which contains most
of the main methods. Users should refer to this superclass for more information regarding those methods.`),kc.forEach(t),bu=d(to),Pe=r(to,"DIV",{class:!0});var Rs=i(Pe);v(Do.$$.fragment,Rs),Mu=d(Rs),Ba=r(Rs,"P",{});var W1=i(Ba);wu=n(W1,"Main method to prepare for the model one or several HTML strings."),W1.forEach(t),yu=d(Rs),v(bt.$$.fragment,Rs),Rs.forEach(t),to.forEach(t),Yd=d(s),Ge=r(s,"H2",{class:!0});var vc=i(Ge);Mt=r(vc,"A",{id:!0,class:!0,href:!0});var U1=i(Mt);Ra=r(U1,"SPAN",{});var H1=i(Ra);v(Oo.$$.fragment,H1),H1.forEach(t),U1.forEach(t),xu=d(vc),Wa=r(vc,"SPAN",{});var V1=i(Wa);Tu=n(V1,"MarkupLMTokenizer"),V1.forEach(t),vc.forEach(t),Jd=d(s),K=r(s,"DIV",{class:!0});var ye=i(K);v(Ao.$$.fragment,ye),Eu=d(ye),S=r(ye,"P",{});var ee=i(S);Lu=n(ee,"Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE). "),ds=r(ee,"A",{href:!0});var Q1=i(ds);qu=n(Q1,"MarkupLMTokenizer"),Q1.forEach(t),$u=n(ee,` can be used to
turn HTML strings into to token-level `),Ua=r(ee,"CODE",{});var X1=i(Ua);Fu=n(X1,"input_ids"),X1.forEach(t),zu=n(ee,", "),Ha=r(ee,"CODE",{});var G1=i(Ha);ju=n(G1,"attention_mask"),G1.forEach(t),Cu=n(ee,", "),Va=r(ee,"CODE",{});var K1=i(Va);Pu=n(K1,"token_type_ids"),K1.forEach(t),Du=n(ee,", "),Qa=r(ee,"CODE",{});var Y1=i(Qa);Ou=n(Y1,"xpath_tags_seq"),Y1.forEach(t),Au=n(ee,` and
`),Xa=r(ee,"CODE",{});var J1=i(Xa);Iu=n(J1,"xpath_tags_seq"),J1.forEach(t),Nu=n(ee,". This tokenizer inherits from "),cs=r(ee,"A",{href:!0});var Z1=i(cs);Su=n(Z1,"PreTrainedTokenizer"),Z1.forEach(t),Bu=n(ee,` which contains most of the main methods.
Users should refer to this superclass for more information regarding those methods.`),ee.forEach(t),Ru=d(ye),De=r(ye,"DIV",{class:!0});var Ws=i(De);v(Io.$$.fragment,Ws),Wu=d(Ws),Ga=r(Ws,"P",{});var e2=i(Ga);Uu=n(e2,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),e2.forEach(t),Hu=d(Ws),No=r(Ws,"UL",{});var bc=i(No);ps=r(bc,"LI",{});var iM=i(ps);Vu=n(iM,"single sequence: "),Ka=r(iM,"CODE",{});var t2=i(Ka);Qu=n(t2,"<s> X </s>"),t2.forEach(t),iM.forEach(t),Xu=d(bc),hs=r(bc,"LI",{});var lM=i(hs);Gu=n(lM,"pair of sequences: "),Ya=r(lM,"CODE",{});var o2=i(Ya);Ku=n(o2,"<s> A </s></s> B </s>"),o2.forEach(t),lM.forEach(t),bc.forEach(t),Ws.forEach(t),Yu=d(ye),us=r(ye,"DIV",{class:!0});var n2=i(us);v(So.$$.fragment,n2),n2.forEach(t),Ju=d(ye),wt=r(ye,"DIV",{class:!0});var Mc=i(wt);v(Bo.$$.fragment,Mc),Zu=d(Mc),Ja=r(Mc,"P",{});var s2=i(Ja);em=n(s2,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),s2.forEach(t),Mc.forEach(t),tm=d(ye),ms=r(ye,"DIV",{class:!0});var a2=i(ms);v(Ro.$$.fragment,a2),a2.forEach(t),ye.forEach(t),Zd=d(s),Ke=r(s,"H2",{class:!0});var wc=i(Ke);yt=r(wc,"A",{id:!0,class:!0,href:!0});var r2=i(yt);Za=r(r2,"SPAN",{});var i2=i(Za);v(Wo.$$.fragment,i2),i2.forEach(t),r2.forEach(t),om=d(wc),er=r(wc,"SPAN",{});var l2=i(er);nm=n(l2,"MarkupLMTokenizerFast"),l2.forEach(t),wc.forEach(t),ec=d(s),j=r(s,"DIV",{class:!0});var H=i(j);v(Uo.$$.fragment,H),sm=d(H),tr=r(H,"P",{});var d2=i(tr);am=n(d2,"Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE)."),d2.forEach(t),rm=d(H),B=r(H,"P",{});var ne=i(B);fs=r(ne,"A",{href:!0});var c2=i(fs);im=n(c2,"MarkupLMTokenizerFast"),c2.forEach(t),lm=n(ne," can be used to turn HTML strings into to token-level "),or=r(ne,"CODE",{});var p2=i(or);dm=n(p2,"input_ids"),p2.forEach(t),cm=n(ne,", "),nr=r(ne,"CODE",{});var h2=i(nr);pm=n(h2,"attention_mask"),h2.forEach(t),hm=n(ne,`,
`),sr=r(ne,"CODE",{});var u2=i(sr);um=n(u2,"token_type_ids"),u2.forEach(t),mm=n(ne,", "),ar=r(ne,"CODE",{});var m2=i(ar);fm=n(m2,"xpath_tags_seq"),m2.forEach(t),gm=n(ne," and "),rr=r(ne,"CODE",{});var f2=i(rr);_m=n(f2,"xpath_tags_seq"),f2.forEach(t),km=n(ne,". This tokenizer inherits from "),gs=r(ne,"A",{href:!0});var g2=i(gs);vm=n(g2,"PreTrainedTokenizer"),g2.forEach(t),bm=n(ne,` which
contains most of the main methods.`),ne.forEach(t),Mm=d(H),ir=r(H,"P",{});var _2=i(ir);wm=n(_2,"Users should refer to this superclass for more information regarding those methods."),_2.forEach(t),ym=d(H),R=r(H,"DIV",{class:!0});var re=i(R);v(Ho.$$.fragment,re),xm=d(re),O=r(re,"P",{});var V=i(O);Tm=n(V,"add_special_tokens ("),lr=r(V,"CODE",{});var k2=i(lr);Em=n(k2,"bool"),k2.forEach(t),Lm=n(V,", "),dr=r(V,"EM",{});var v2=i(dr);qm=n(v2,"optional"),v2.forEach(t),$m=n(V,", defaults to "),cr=r(V,"CODE",{});var b2=i(cr);Fm=n(b2,"True"),b2.forEach(t),zm=n(V,`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),pr=r(V,"CODE",{});var M2=i(pr);jm=n(M2,"bool"),M2.forEach(t),Cm=n(V,", "),hr=r(V,"CODE",{});var w2=i(hr);Pm=n(w2,"str"),w2.forEach(t),Dm=n(V," or "),_s=r(V,"A",{href:!0});var y2=i(_s);Om=n(y2,"PaddingStrategy"),y2.forEach(t),Am=n(V,", "),ur=r(V,"EM",{});var x2=i(ur);Im=n(x2,"optional"),x2.forEach(t),Nm=n(V,", defaults to "),mr=r(V,"CODE",{});var T2=i(mr);Sm=n(T2,"False"),T2.forEach(t),Bm=n(V,`):
Activates and controls padding. Accepts the following values:`),V.forEach(t),Rm=d(re),Y=r(re,"UL",{});var ie=i(Y);fr=r(ie,"LI",{});var E2=i(fr);xt=r(E2,"P",{});var Zl=i(xt);gr=r(Zl,"CODE",{});var L2=i(gr);Wm=n(L2,"True"),L2.forEach(t),Um=n(Zl," or "),_r=r(Zl,"CODE",{});var q2=i(_r);Hm=n(q2,"'longest'"),q2.forEach(t),Vm=n(Zl,`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),Zl.forEach(t),E2.forEach(t),Qm=d(ie),kr=r(ie,"LI",{});var $2=i(kr);Tt=r($2,"P",{});var ed=i(Tt);vr=r(ed,"CODE",{});var F2=i(vr);Xm=n(F2,"'max_length'"),F2.forEach(t),Gm=n(ed,": Pad to a maximum length specified with the argument "),br=r(ed,"CODE",{});var z2=i(br);Km=n(z2,"max_length"),z2.forEach(t),Ym=n(ed,` or to the maximum
acceptable input length for the model if that argument is not provided.`),ed.forEach(t),$2.forEach(t),Jm=d(ie),Mr=r(ie,"LI",{});var j2=i(Mr);W=r(j2,"P",{});var se=i(W);wr=r(se,"CODE",{});var C2=i(wr);Zm=n(C2,"False"),C2.forEach(t),ef=n(se," or "),yr=r(se,"CODE",{});var P2=i(yr);tf=n(P2,"'do_not_pad'"),P2.forEach(t),of=n(se,` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),xr=r(se,"CODE",{});var D2=i(xr);nf=n(D2,"bool"),D2.forEach(t),sf=n(se,", "),Tr=r(se,"CODE",{});var O2=i(Tr);af=n(O2,"str"),O2.forEach(t),rf=n(se," or "),ks=r(se,"A",{href:!0});var A2=i(ks);lf=n(A2,"TruncationStrategy"),A2.forEach(t),df=n(se,", "),Er=r(se,"EM",{});var I2=i(Er);cf=n(I2,"optional"),I2.forEach(t),pf=n(se,", defaults to "),Lr=r(se,"CODE",{});var N2=i(Lr);hf=n(N2,"False"),N2.forEach(t),uf=n(se,`):
Activates and controls truncation. Accepts the following values:`),se.forEach(t),j2.forEach(t),mf=d(ie),qr=r(ie,"LI",{});var S2=i(qr);Oe=r(S2,"P",{});var Tn=i(Oe);$r=r(Tn,"CODE",{});var B2=i($r);ff=n(B2,"True"),B2.forEach(t),gf=n(Tn," or "),Fr=r(Tn,"CODE",{});var R2=i(Fr);_f=n(R2,"'longest_first'"),R2.forEach(t),kf=n(Tn,": Truncate to a maximum length specified with the argument "),zr=r(Tn,"CODE",{});var W2=i(zr);vf=n(W2,"max_length"),W2.forEach(t),bf=n(Tn,` 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.`),Tn.forEach(t),S2.forEach(t),Mf=d(ie),jr=r(ie,"LI",{});var U2=i(jr);Et=r(U2,"P",{});var td=i(Et);Cr=r(td,"CODE",{});var H2=i(Cr);wf=n(H2,"'only_first'"),H2.forEach(t),yf=n(td,": Truncate to a maximum length specified with the argument "),Pr=r(td,"CODE",{});var V2=i(Pr);xf=n(V2,"max_length"),V2.forEach(t),Tf=n(td,` 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.`),td.forEach(t),U2.forEach(t),Ef=d(ie),Dr=r(ie,"LI",{});var Q2=i(Dr);Lt=r(Q2,"P",{});var od=i(Lt);Or=r(od,"CODE",{});var X2=i(Or);Lf=n(X2,"'only_second'"),X2.forEach(t),qf=n(od,": Truncate to a maximum length specified with the argument "),Ar=r(od,"CODE",{});var G2=i(Ar);$f=n(G2,"max_length"),G2.forEach(t),Ff=n(od,` 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.`),od.forEach(t),Q2.forEach(t),zf=d(ie),Ir=r(ie,"LI",{});var K2=i(Ir);fe=r(K2,"P",{});var pt=i(fe);Nr=r(pt,"CODE",{});var Y2=i(Nr);jf=n(Y2,"False"),Y2.forEach(t),Cf=n(pt," or "),Sr=r(pt,"CODE",{});var J2=i(Sr);Pf=n(J2,"'do_not_truncate'"),J2.forEach(t),Df=n(pt,` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Br=r(pt,"CODE",{});var Z2=i(Br);Of=n(Z2,"int"),Z2.forEach(t),Af=n(pt,", "),Rr=r(pt,"EM",{});var ew=i(Rr);If=n(ew,"optional"),ew.forEach(t),Nf=n(pt,`):
Controls the maximum length to use by one of the truncation/padding parameters.`),pt.forEach(t),K2.forEach(t),ie.forEach(t),Sf=d(re),E=r(re,"P",{});var q=i(E);Bf=n(q,"If left unset or set to "),Wr=r(q,"CODE",{});var tw=i(Wr);Rf=n(tw,"None"),tw.forEach(t),Wf=n(q,`, 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.
stride (`),Ur=r(q,"CODE",{});var ow=i(Ur);Uf=n(ow,"int"),ow.forEach(t),Hf=n(q,", "),Hr=r(q,"EM",{});var nw=i(Hr);Vf=n(nw,"optional"),nw.forEach(t),Qf=n(q,`, defaults to 0):
If set to a number along with `),Vr=r(q,"CODE",{});var sw=i(Vr);Xf=n(sw,"max_length"),sw.forEach(t),Gf=n(q,`, the overflowing tokens returned when
`),Qr=r(q,"CODE",{});var aw=i(Qr);Kf=n(aw,"return_overflowing_tokens=True"),aw.forEach(t),Yf=n(q,` 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.
is_split_into_words (`),Xr=r(q,"CODE",{});var rw=i(Xr);Jf=n(rw,"bool"),rw.forEach(t),Zf=n(q,", "),Gr=r(q,"EM",{});var iw=i(Gr);eg=n(iw,"optional"),iw.forEach(t),tg=n(q,", defaults to "),Kr=r(q,"CODE",{});var lw=i(Kr);og=n(lw,"False"),lw.forEach(t),ng=n(q,`):
Whether or not the input is already pre-tokenized (e.g., split into words). If set to `),Yr=r(q,"CODE",{});var dw=i(Yr);sg=n(dw,"True"),dw.forEach(t),ag=n(q,`, 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.
pad_to_multiple_of (`),Jr=r(q,"CODE",{});var cw=i(Jr);rg=n(cw,"int"),cw.forEach(t),ig=n(q,", "),Zr=r(q,"EM",{});var pw=i(Zr);lg=n(pw,"optional"),pw.forEach(t),dg=n(q,`):
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 `),ei=r(q,"CODE",{});var hw=i(ei);cg=n(hw,">= 7.5"),hw.forEach(t),pg=n(q,` (Volta).
return_tensors (`),ti=r(q,"CODE",{});var uw=i(ti);hg=n(uw,"str"),uw.forEach(t),ug=n(q," or "),vs=r(q,"A",{href:!0});var mw=i(vs);mg=n(mw,"TensorType"),mw.forEach(t),fg=n(q,", "),oi=r(q,"EM",{});var fw=i(oi);gg=n(fw,"optional"),fw.forEach(t),_g=n(q,`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),q.forEach(t),kg=d(re),Ye=r(re,"UL",{});var Us=i(Ye);qt=r(Us,"LI",{});var nd=i(qt);ni=r(nd,"CODE",{});var gw=i(ni);vg=n(gw,"'tf'"),gw.forEach(t),bg=n(nd,": Return TensorFlow "),si=r(nd,"CODE",{});var _w=i(si);Mg=n(_w,"tf.constant"),_w.forEach(t),wg=n(nd," objects."),nd.forEach(t),yg=d(Us),$t=r(Us,"LI",{});var sd=i($t);ai=r(sd,"CODE",{});var kw=i(ai);xg=n(kw,"'pt'"),kw.forEach(t),Tg=n(sd,": Return PyTorch "),ri=r(sd,"CODE",{});var vw=i(ri);Eg=n(vw,"torch.Tensor"),vw.forEach(t),Lg=n(sd," objects."),sd.forEach(t),qg=d(Us),Ft=r(Us,"LI",{});var ad=i(Ft);ii=r(ad,"CODE",{});var bw=i(ii);$g=n(bw,"'np'"),bw.forEach(t),Fg=n(ad,": Return Numpy "),li=r(ad,"CODE",{});var Mw=i(li);zg=n(Mw,"np.ndarray"),Mw.forEach(t),jg=n(ad," objects."),ad.forEach(t),Us.forEach(t),Cg=d(re),A=r(re,"P",{});var Q=i(A);Pg=n(Q,"add_special_tokens ("),di=r(Q,"CODE",{});var ww=i(di);Dg=n(ww,"bool"),ww.forEach(t),Og=n(Q,", "),ci=r(Q,"EM",{});var yw=i(ci);Ag=n(yw,"optional"),yw.forEach(t),Ig=n(Q,", defaults to "),pi=r(Q,"CODE",{});var xw=i(pi);Ng=n(xw,"True"),xw.forEach(t),Sg=n(Q,`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),hi=r(Q,"CODE",{});var Tw=i(hi);Bg=n(Tw,"bool"),Tw.forEach(t),Rg=n(Q,", "),ui=r(Q,"CODE",{});var Ew=i(ui);Wg=n(Ew,"str"),Ew.forEach(t),Ug=n(Q," or "),bs=r(Q,"A",{href:!0});var Lw=i(bs);Hg=n(Lw,"PaddingStrategy"),Lw.forEach(t),Vg=n(Q,", "),mi=r(Q,"EM",{});var qw=i(mi);Qg=n(qw,"optional"),qw.forEach(t),Xg=n(Q,", defaults to "),fi=r(Q,"CODE",{});var $w=i(fi);Gg=n($w,"False"),$w.forEach(t),Kg=n(Q,`):
Activates and controls padding. Accepts the following values:`),Q.forEach(t),Yg=d(re),C=r(re,"UL",{});var N=i(C);gi=r(N,"LI",{});var Fw=i(gi);zt=r(Fw,"P",{});var rd=i(zt);_i=r(rd,"CODE",{});var zw=i(_i);Jg=n(zw,"True"),zw.forEach(t),Zg=n(rd," or "),ki=r(rd,"CODE",{});var jw=i(ki);e_=n(jw,"'longest'"),jw.forEach(t),t_=n(rd,`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),rd.forEach(t),Fw.forEach(t),o_=d(N),vi=r(N,"LI",{});var Cw=i(vi);jt=r(Cw,"P",{});var id=i(jt);bi=r(id,"CODE",{});var Pw=i(bi);n_=n(Pw,"'max_length'"),Pw.forEach(t),s_=n(id,": Pad to a maximum length specified with the argument "),Mi=r(id,"CODE",{});var Dw=i(Mi);a_=n(Dw,"max_length"),Dw.forEach(t),r_=n(id,` or to the maximum
acceptable input length for the model if that argument is not provided.`),id.forEach(t),Cw.forEach(t),i_=d(N),wi=r(N,"LI",{});var Ow=i(wi);U=r(Ow,"P",{});var ae=i(U);yi=r(ae,"CODE",{});var Aw=i(yi);l_=n(Aw,"False"),Aw.forEach(t),d_=n(ae," or "),xi=r(ae,"CODE",{});var Iw=i(xi);c_=n(Iw,"'do_not_pad'"),Iw.forEach(t),p_=n(ae,` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),Ti=r(ae,"CODE",{});var Nw=i(Ti);h_=n(Nw,"bool"),Nw.forEach(t),u_=n(ae,", "),Ei=r(ae,"CODE",{});var Sw=i(Ei);m_=n(Sw,"str"),Sw.forEach(t),f_=n(ae," or "),Ms=r(ae,"A",{href:!0});var Bw=i(Ms);g_=n(Bw,"TruncationStrategy"),Bw.forEach(t),__=n(ae,", "),Li=r(ae,"EM",{});var Rw=i(Li);k_=n(Rw,"optional"),Rw.forEach(t),v_=n(ae,", defaults to "),qi=r(ae,"CODE",{});var Ww=i(qi);b_=n(Ww,"False"),Ww.forEach(t),M_=n(ae,`):
Activates and controls truncation. Accepts the following values:`),ae.forEach(t),Ow.forEach(t),w_=d(N),$i=r(N,"LI",{});var Uw=i($i);Ae=r(Uw,"P",{});var En=i(Ae);Fi=r(En,"CODE",{});var Hw=i(Fi);y_=n(Hw,"True"),Hw.forEach(t),x_=n(En," or "),zi=r(En,"CODE",{});var Vw=i(zi);T_=n(Vw,"'longest_first'"),Vw.forEach(t),E_=n(En,": Truncate to a maximum length specified with the argument "),ji=r(En,"CODE",{});var Qw=i(ji);L_=n(Qw,"max_length"),Qw.forEach(t),q_=n(En,` 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.`),En.forEach(t),Uw.forEach(t),$_=d(N),Ci=r(N,"LI",{});var Xw=i(Ci);Ct=r(Xw,"P",{});var ld=i(Ct);Pi=r(ld,"CODE",{});var Gw=i(Pi);F_=n(Gw,"'only_first'"),Gw.forEach(t),z_=n(ld,": Truncate to a maximum length specified with the argument "),Di=r(ld,"CODE",{});var Kw=i(Di);j_=n(Kw,"max_length"),Kw.forEach(t),C_=n(ld,` 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.`),ld.forEach(t),Xw.forEach(t),P_=d(N),Oi=r(N,"LI",{});var Yw=i(Oi);Pt=r(Yw,"P",{});var dd=i(Pt);Ai=r(dd,"CODE",{});var Jw=i(Ai);D_=n(Jw,"'only_second'"),Jw.forEach(t),O_=n(dd,": Truncate to a maximum length specified with the argument "),Ii=r(dd,"CODE",{});var Zw=i(Ii);A_=n(Zw,"max_length"),Zw.forEach(t),I_=n(dd,` 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.`),dd.forEach(t),Yw.forEach(t),N_=d(N),Ni=r(N,"LI",{});var ey=i(Ni);L=r(ey,"P",{});var $=i(L);Si=r($,"CODE",{});var ty=i(Si);S_=n(ty,"False"),ty.forEach(t),B_=n($," or "),Bi=r($,"CODE",{});var oy=i(Bi);R_=n(oy,"'do_not_truncate'"),oy.forEach(t),W_=n($,` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Ri=r($,"CODE",{});var ny=i(Ri);U_=n(ny,"int"),ny.forEach(t),H_=n($,", "),Wi=r($,"EM",{});var sy=i(Wi);V_=n(sy,"optional"),sy.forEach(t),Q_=n($,`):
Controls the maximum length to use by one of the truncation/padding parameters. If left unset or set to
`),Ui=r($,"CODE",{});var ay=i(Ui);X_=n(ay,"None"),ay.forEach(t),G_=n($,`, 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.
stride (`),Hi=r($,"CODE",{});var ry=i(Hi);K_=n(ry,"int"),ry.forEach(t),Y_=n($,", "),Vi=r($,"EM",{});var iy=i(Vi);J_=n(iy,"optional"),iy.forEach(t),Z_=n($,`, defaults to 0):
If set to a number along with `),Qi=r($,"CODE",{});var ly=i(Qi);ek=n(ly,"max_length"),ly.forEach(t),tk=n($,`, the overflowing tokens returned when
`),Xi=r($,"CODE",{});var dy=i(Xi);ok=n(dy,"return_overflowing_tokens=True"),dy.forEach(t),nk=n($,` 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.
pad_to_multiple_of (`),Gi=r($,"CODE",{});var cy=i(Gi);sk=n(cy,"int"),cy.forEach(t),ak=n($,", "),Ki=r($,"EM",{});var py=i(Ki);rk=n(py,"optional"),py.forEach(t),ik=n($,`):
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 `),Yi=r($,"CODE",{});var hy=i(Yi);lk=n(hy,">= 7.5"),hy.forEach(t),dk=n($,` (Volta).
return_tensors (`),Ji=r($,"CODE",{});var uy=i(Ji);ck=n(uy,"str"),uy.forEach(t),pk=n($," or "),ws=r($,"A",{href:!0});var my=i(ws);hk=n(my,"TensorType"),my.forEach(t),uk=n($,", "),Zi=r($,"EM",{});var fy=i(Zi);mk=n(fy,"optional"),fy.forEach(t),fk=n($,`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),$.forEach(t),ey.forEach(t),gk=d(N),el=r(N,"LI",{});var gy=i(el);Dt=r(gy,"P",{});var cd=i(Dt);tl=r(cd,"CODE",{});var _y=i(tl);_k=n(_y,"'tf'"),_y.forEach(t),kk=n(cd,": Return TensorFlow "),ol=r(cd,"CODE",{});var ky=i(ol);vk=n(ky,"tf.constant"),ky.forEach(t),bk=n(cd," objects."),cd.forEach(t),gy.forEach(t),Mk=d(N),nl=r(N,"LI",{});var vy=i(nl);Ot=r(vy,"P",{});var pd=i(Ot);sl=r(pd,"CODE",{});var by=i(sl);wk=n(by,"'pt'"),by.forEach(t),yk=n(pd,": Return PyTorch "),al=r(pd,"CODE",{});var My=i(al);xk=n(My,"torch.Tensor"),My.forEach(t),Tk=n(pd," objects."),pd.forEach(t),vy.forEach(t),Ek=d(N),rl=r(N,"LI",{});var wy=i(rl);At=r(wy,"P",{});var hd=i(At);il=r(hd,"CODE",{});var yy=i(il);Lk=n(yy,"'np'"),yy.forEach(t),qk=n(hd,": Return Numpy "),ll=r(hd,"CODE",{});var xy=i(ll);$k=n(xy,"np.ndarray"),xy.forEach(t),Fk=n(hd," objects."),hd.forEach(t),wy.forEach(t),N.forEach(t),re.forEach(t),zk=d(H),Ie=r(H,"DIV",{class:!0});var Hs=i(Ie);v(Vo.$$.fragment,Hs),jk=d(Hs),dl=r(Hs,"P",{});var Ty=i(dl);Ck=n(Ty,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RoBERTa sequence has the following format:`),Ty.forEach(t),Pk=d(Hs),Qo=r(Hs,"UL",{});var yc=i(Qo);ys=r(yc,"LI",{});var dM=i(ys);Dk=n(dM,"single sequence: "),cl=r(dM,"CODE",{});var Ey=i(cl);Ok=n(Ey,"<s> X </s>"),Ey.forEach(t),dM.forEach(t),Ak=d(yc),xs=r(yc,"LI",{});var cM=i(xs);Ik=n(cM,"pair of sequences: "),pl=r(cM,"CODE",{});var Ly=i(pl);Nk=n(Ly,"<s> A </s></s> B </s>"),Ly.forEach(t),cM.forEach(t),yc.forEach(t),Hs.forEach(t),Sk=d(H),It=r(H,"DIV",{class:!0});var xc=i(It);v(Xo.$$.fragment,xc),Bk=d(xc),hl=r(xc,"P",{});var qy=i(hl);Rk=n(qy,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. RoBERTa does not
make use of token type ids, therefore a list of zeros is returned.`),qy.forEach(t),xc.forEach(t),Wk=d(H),Nt=r(H,"DIV",{class:!0});var Tc=i(Nt);v(Go.$$.fragment,Tc),Uk=d(Tc),Ko=r(Tc,"P",{});var Ec=i(Ko);Hk=n(Ec,`Tokenize and prepare for the model a sequence or a pair of sequences. .. warning:: This method is deprecated,
`),ul=r(Ec,"CODE",{});var $y=i(ul);Vk=n($y,"__call__"),$y.forEach(t),Qk=n(Ec," should be used instead."),Ec.forEach(t),Tc.forEach(t),Xk=d(H),St=r(H,"DIV",{class:!0});var Lc=i(St);v(Yo.$$.fragment,Lc),Gk=d(Lc),ml=r(Lc,"P",{});var Fy=i(ml);Kk=n(Fy,`Given the xpath expression of one particular node (like \u201C/html/body/div/li[1]/div/span[2]\u201D), return a list of
tag IDs and corresponding subscripts, taking into account max depth.`),Fy.forEach(t),Lc.forEach(t),H.forEach(t),tc=d(s),Je=r(s,"H2",{class:!0});var qc=i(Je);Bt=r(qc,"A",{id:!0,class:!0,href:!0});var zy=i(Bt);fl=r(zy,"SPAN",{});var jy=i(fl);v(Jo.$$.fragment,jy),jy.forEach(t),zy.forEach(t),Yk=d(qc),gl=r(qc,"SPAN",{});var Cy=i(gl);Jk=n(Cy,"MarkupLMProcessor"),Cy.forEach(t),qc.forEach(t),oc=d(s),te=r(s,"DIV",{class:!0});var Se=i(te);v(Zo.$$.fragment,Se),Zk=d(Se),_l=r(Se,"P",{});var Py=i(_l);ev=n(Py,`Constructs a MarkupLM processor which combines a MarkupLM feature extractor and a MarkupLM tokenizer into a single
processor.`),Py.forEach(t),tv=d(Se),Ts=r(Se,"P",{});var pM=i(Ts);Es=r(pM,"A",{href:!0});var Dy=i(Es);ov=n(Dy,"MarkupLMProcessor"),Dy.forEach(t),nv=n(pM," offers all the functionalities you need to prepare data for the model."),pM.forEach(t),sv=d(Se),I=r(Se,"P",{});var X=i(I);av=n(X,"It first uses "),Ls=r(X,"A",{href:!0});var Oy=i(Ls);rv=n(Oy,"MarkupLMFeatureExtractor"),Oy.forEach(t),iv=n(X,` to extract nodes and corresponding xpaths from one or more HTML strings.
Next, these are provided to `),qs=r(X,"A",{href:!0});var Ay=i(qs);lv=n(Ay,"MarkupLMTokenizer"),Ay.forEach(t),dv=n(X," or "),$s=r(X,"A",{href:!0});var Iy=i($s);cv=n(Iy,"MarkupLMTokenizerFast"),Iy.forEach(t),pv=n(X,`, which turns them into token-level
`),kl=r(X,"CODE",{});var Ny=i(kl);hv=n(Ny,"input_ids"),Ny.forEach(t),uv=n(X,", "),vl=r(X,"CODE",{});var Sy=i(vl);mv=n(Sy,"attention_mask"),Sy.forEach(t),fv=n(X,", "),bl=r(X,"CODE",{});var By=i(bl);gv=n(By,"token_type_ids"),By.forEach(t),_v=n(X,", "),Ml=r(X,"CODE",{});var Ry=i(Ml);kv=n(Ry,"xpath_tags_seq"),Ry.forEach(t),vv=n(X," and "),wl=r(X,"CODE",{});var Wy=i(wl);bv=n(Wy,"xpath_subs_seq"),Wy.forEach(t),Mv=n(X,"."),X.forEach(t),wv=d(Se),ge=r(Se,"DIV",{class:!0});var oo=i(ge);v(en.$$.fragment,oo),yv=d(oo),oe=r(oo,"P",{});var xe=i(oe);xv=n(xe,"This method first forwards the "),yl=r(xe,"CODE",{});var Uy=i(yl);Tv=n(Uy,"html_strings"),Uy.forEach(t),Ev=n(xe," argument to "),tn=r(xe,"A",{href:!0});var hM=i(tn);xl=r(hM,"STRONG",{});var Hy=i(xl);Lv=n(Hy,"call"),Hy.forEach(t),qv=n(hM,"()"),hM.forEach(t),$v=n(xe,`. Next, it
passes the `),Tl=r(xe,"CODE",{});var Vy=i(Tl);Fv=n(Vy,"nodes"),Vy.forEach(t),zv=n(xe," and "),El=r(xe,"CODE",{});var Qy=i(El);jv=n(Qy,"xpaths"),Qy.forEach(t),Cv=n(xe," along with the additional arguments to "),Ll=r(xe,"CODE",{});var Xy=i(Ll);Pv=n(Xy,"__call__()"),Xy.forEach(t),Dv=n(xe,` and
returns the output.`),xe.forEach(t),Ov=d(oo),on=r(oo,"P",{});var $c=i(on);Av=n($c,"Optionally, one can also provide a "),ql=r($c,"CODE",{});var Gy=i(ql);Iv=n(Gy,"text"),Gy.forEach(t),Nv=n($c," argument which is passed along as first sequence."),$c.forEach(t),Sv=d(oo),$l=r(oo,"P",{});var Ky=i($l);Bv=n(Ky,"Please refer to the docstring of the above two methods for more information."),Ky.forEach(t),oo.forEach(t),Se.forEach(t),nc=d(s),Ze=r(s,"H2",{class:!0});var Fc=i(Ze);Rt=r(Fc,"A",{id:!0,class:!0,href:!0});var Yy=i(Rt);Fl=r(Yy,"SPAN",{});var Jy=i(Fl);v(nn.$$.fragment,Jy),Jy.forEach(t),Yy.forEach(t),Rv=d(Fc),zl=r(Fc,"SPAN",{});var Zy=i(zl);Wv=n(Zy,"MarkupLMModel"),Zy.forEach(t),Fc.forEach(t),sc=d(s),Ee=r(s,"DIV",{class:!0});var Vs=i(Ee);v(sn.$$.fragment,Vs),Uv=d(Vs),an=r(Vs,"P",{});var zc=i(an);Hv=n(zc,`The bare MarkupLM Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),rn=r(zc,"A",{href:!0,rel:!0});var ex=i(rn);Vv=n(ex,"torch.nn.Module"),ex.forEach(t),Qv=n(zc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),zc.forEach(t),Xv=d(Vs),_e=r(Vs,"DIV",{class:!0});var no=i(_e);v(ln.$$.fragment,no),Gv=d(no),et=r(no,"P",{});var Qs=i(et);Kv=n(Qs,"The "),Fs=r(Qs,"A",{href:!0});var tx=i(Fs);Yv=n(tx,"MarkupLMModel"),tx.forEach(t),Jv=n(Qs," forward method, overrides the "),jl=r(Qs,"CODE",{});var ox=i(jl);Zv=n(ox,"__call__"),ox.forEach(t),eb=n(Qs," special method."),Qs.forEach(t),tb=d(no),v(Wt.$$.fragment,no),ob=d(no),v(Ut.$$.fragment,no),no.forEach(t),Vs.forEach(t),ac=d(s),tt=r(s,"H2",{class:!0});var jc=i(tt);Ht=r(jc,"A",{id:!0,class:!0,href:!0});var nx=i(Ht);Cl=r(nx,"SPAN",{});var sx=i(Cl);v(dn.$$.fragment,sx),sx.forEach(t),nx.forEach(t),nb=d(jc),Pl=r(jc,"SPAN",{});var ax=i(Pl);sb=n(ax,"MarkupLMForSequenceClassification"),ax.forEach(t),jc.forEach(t),rc=d(s),he=r(s,"DIV",{class:!0});var so=i(he);v(cn.$$.fragment,so),ab=d(so),Dl=r(so,"P",{});var rx=i(Dl);rb=n(rx,`MarkupLM Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),rx.forEach(t),ib=d(so),pn=r(so,"P",{});var Cc=i(pn);lb=n(Cc,"This model is a PyTorch "),hn=r(Cc,"A",{href:!0,rel:!0});var ix=i(hn);db=n(ix,"torch.nn.Module"),ix.forEach(t),cb=n(Cc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Cc.forEach(t),pb=d(so),ke=r(so,"DIV",{class:!0});var ao=i(ke);v(un.$$.fragment,ao),hb=d(ao),ot=r(ao,"P",{});var Xs=i(ot);ub=n(Xs,"The "),zs=r(Xs,"A",{href:!0});var lx=i(zs);mb=n(lx,"MarkupLMForSequenceClassification"),lx.forEach(t),fb=n(Xs," forward method, overrides the "),Ol=r(Xs,"CODE",{});var dx=i(Ol);gb=n(dx,"__call__"),dx.forEach(t),_b=n(Xs," special method."),Xs.forEach(t),kb=d(ao),v(Vt.$$.fragment,ao),vb=d(ao),v(Qt.$$.fragment,ao),ao.forEach(t),so.forEach(t),ic=d(s),nt=r(s,"H2",{class:!0});var Pc=i(nt);Xt=r(Pc,"A",{id:!0,class:!0,href:!0});var cx=i(Xt);Al=r(cx,"SPAN",{});var px=i(Al);v(mn.$$.fragment,px),px.forEach(t),cx.forEach(t),bb=d(Pc),Il=r(Pc,"SPAN",{});var hx=i(Il);Mb=n(hx,"MarkupLMForTokenClassification"),hx.forEach(t),Pc.forEach(t),lc=d(s),Le=r(s,"DIV",{class:!0});var Gs=i(Le);v(fn.$$.fragment,Gs),wb=d(Gs),st=r(Gs,"P",{});var Ks=i(st);yb=n(Ks,"MarkupLM Model with a "),Nl=r(Ks,"CODE",{});var ux=i(Nl);xb=n(ux,"token_classification"),ux.forEach(t),Tb=n(Ks,` head on top.
This model is a PyTorch `),gn=r(Ks,"A",{href:!0,rel:!0});var mx=i(gn);Eb=n(mx,"torch.nn.Module"),mx.forEach(t),Lb=n(Ks,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ks.forEach(t),qb=d(Gs),ve=r(Gs,"DIV",{class:!0});var ro=i(ve);v(_n.$$.fragment,ro),$b=d(ro),at=r(ro,"P",{});var Ys=i(at);Fb=n(Ys,"The "),js=r(Ys,"A",{href:!0});var fx=i(js);zb=n(fx,"MarkupLMForTokenClassification"),fx.forEach(t),jb=n(Ys," forward method, overrides the "),Sl=r(Ys,"CODE",{});var gx=i(Sl);Cb=n(gx,"__call__"),gx.forEach(t),Pb=n(Ys," special method."),Ys.forEach(t),Db=d(ro),v(Gt.$$.fragment,ro),Ob=d(ro),v(Kt.$$.fragment,ro),ro.forEach(t),Gs.forEach(t),dc=d(s),rt=r(s,"H2",{class:!0});var Dc=i(rt);Yt=r(Dc,"A",{id:!0,class:!0,href:!0});var _x=i(Yt);Bl=r(_x,"SPAN",{});var kx=i(Bl);v(kn.$$.fragment,kx),kx.forEach(t),_x.forEach(t),Ab=d(Dc),Rl=r(Dc,"SPAN",{});var vx=i(Rl);Ib=n(vx,"MarkupLMForQuestionAnswering"),vx.forEach(t),Dc.forEach(t),cc=d(s),ue=r(s,"DIV",{class:!0});var io=i(ue);v(vn.$$.fragment,io),Nb=d(io),it=r(io,"P",{});var Js=i(it);Sb=n(Js,`MarkupLM Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Wl=r(Js,"CODE",{});var bx=i(Wl);Bb=n(bx,"span start logits"),bx.forEach(t),Rb=n(Js," and "),Ul=r(Js,"CODE",{});var Mx=i(Ul);Wb=n(Mx,"span end logits"),Mx.forEach(t),Ub=n(Js,")."),Js.forEach(t),Hb=d(io),bn=r(io,"P",{});var Oc=i(bn);Vb=n(Oc,"This model is a PyTorch "),Mn=r(Oc,"A",{href:!0,rel:!0});var wx=i(Mn);Qb=n(wx,"torch.nn.Module"),wx.forEach(t),Xb=n(Oc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Oc.forEach(t),Gb=d(io),be=r(io,"DIV",{class:!0});var lo=i(be);v(wn.$$.fragment,lo),Kb=d(lo),lt=r(lo,"P",{});var Zs=i(lt);Yb=n(Zs,"The "),Cs=r(Zs,"A",{href:!0});var yx=i(Cs);Jb=n(yx,"MarkupLMForQuestionAnswering"),yx.forEach(t),Zb=n(Zs," forward method, overrides the "),Hl=r(Zs,"CODE",{});var xx=i(Hl);eM=n(xx,"__call__"),xx.forEach(t),tM=n(Zs," special method."),Zs.forEach(t),oM=d(lo),v(Jt.$$.fragment,lo),nM=d(lo),v(Zt.$$.fragment,lo),lo.forEach(t),io.forEach(t),this.h()},h(){c(m,"name","hf:doc:metadata"),c(m,"content",JSON.stringify(Rx)),c(g,"id","markuplm"),c(g,"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"),c(g,"href","#markuplm"),c(_,"class","relative group"),c(ht,"id","overview"),c(ht,"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"),c(ht,"href","#overview"),c(Be,"class","relative group"),c(po,"href","https://arxiv.org/abs/2110.08518"),c(po,"rel","nofollow"),c(Ln,"href","layoutlm"),c(ho,"href","https://x-lance.github.io/WebSRC/"),c(ho,"rel","nofollow"),c(uo,"href","https://www.researchgate.net/publication/221299838_From_one_tree_to_a_forest_a_unified_solution_for_structured_web_data_extraction"),c(uo,"rel","nofollow"),c(Pn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMModel.forward"),c(Dn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMProcessor"),c(On,"href","#usage-markuplmprocessor"),c(fo,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/MarkupLM"),c(fo,"rel","nofollow"),$x(mt.src,uM="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/markuplm_architecture.jpg")||c(mt,"src",uM),c(mt,"alt","drawing"),c(mt,"width","600"),c(An,"href","https://arxiv.org/abs/2110.08518"),c(_o,"href","https://huggingface.co/nielsr"),c(_o,"rel","nofollow"),c(ko,"href","https://github.com/microsoft/unilm/tree/master/markuplm"),c(ko,"rel","nofollow"),c(ft,"id","usage-markuplmprocessor"),c(ft,"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"),c(ft,"href","#usage-markuplmprocessor"),c(We,"class","relative group"),c(In,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMProcessor"),c(Nn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor"),c(Sn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(Bn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(Rn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMProcessor"),c(Wn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor"),c(Un,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(Hn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(Vn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor"),c(Mo,"href","https://www.crummy.com/software/BeautifulSoup/bs4/doc/"),c(Mo,"rel","nofollow"),c(Qn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(Xn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(xo,"href","https://paperswithcode.com/dataset/swde"),c(xo,"rel","nofollow"),c(gt,"id","documentation-resources"),c(gt,"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"),c(gt,"href","#documentation-resources"),c(Ue,"class","relative group"),c(ns,"href","./tasks/sequence_classification"),c(ss,"href","./tasks/token_classification"),c(as,"href","./tasks/question_answering"),c(_t,"id","transformers.MarkupLMConfig"),c(_t,"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"),c(_t,"href","#transformers.MarkupLMConfig"),c(He,"class","relative group"),c(rs,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMModel"),c(zo,"href","https://huggingface.co/microsoft/markuplm-base"),c(zo,"rel","nofollow"),c(is,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertConfig"),c(ls,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertConfig"),c(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vt,"id","transformers.MarkupLMFeatureExtractor"),c(vt,"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"),c(vt,"href","#transformers.MarkupLMFeatureExtractor"),c(Xe,"class","relative group"),c(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Mt,"id","transformers.MarkupLMTokenizer"),c(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"),c(Mt,"href","#transformers.MarkupLMTokenizer"),c(Ge,"class","relative group"),c(ds,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(cs,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(us,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ms,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(yt,"id","transformers.MarkupLMTokenizerFast"),c(yt,"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"),c(yt,"href","#transformers.MarkupLMTokenizerFast"),c(Ke,"class","relative group"),c(fs,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(gs,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(_s,"href","/docs/transformers/v4.27.1/en/internal/file_utils#transformers.utils.PaddingStrategy"),c(ks,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy"),c(vs,"href","/docs/transformers/v4.27.1/en/internal/file_utils#transformers.TensorType"),c(bs,"href","/docs/transformers/v4.27.1/en/internal/file_utils#transformers.utils.PaddingStrategy"),c(Ms,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy"),c(ws,"href","/docs/transformers/v4.27.1/en/internal/file_utils#transformers.TensorType"),c(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Bt,"id","transformers.MarkupLMProcessor"),c(Bt,"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"),c(Bt,"href","#transformers.MarkupLMProcessor"),c(Je,"class","relative group"),c(Es,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMProcessor"),c(Ls,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor"),c(qs,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c($s,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(tn,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor.__call__"),c(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Rt,"id","transformers.MarkupLMModel"),c(Rt,"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"),c(Rt,"href","#transformers.MarkupLMModel"),c(Ze,"class","relative group"),c(rn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(rn,"rel","nofollow"),c(Fs,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMModel"),c(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ht,"id","transformers.MarkupLMForSequenceClassification"),c(Ht,"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"),c(Ht,"href","#transformers.MarkupLMForSequenceClassification"),c(tt,"class","relative group"),c(hn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(hn,"rel","nofollow"),c(zs,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMForSequenceClassification"),c(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Xt,"id","transformers.MarkupLMForTokenClassification"),c(Xt,"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"),c(Xt,"href","#transformers.MarkupLMForTokenClassification"),c(nt,"class","relative group"),c(gn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(gn,"rel","nofollow"),c(js,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMForTokenClassification"),c(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Yt,"id","transformers.MarkupLMForQuestionAnswering"),c(Yt,"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"),c(Yt,"href","#transformers.MarkupLMForQuestionAnswering"),c(rt,"class","relative group"),c(Mn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Mn,"rel","nofollow"),c(Cs,"href","/docs/transformers/v4.27.1/en/model_doc/markuplm#transformers.MarkupLMForQuestionAnswering"),c(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,p){e(document.head,m),u(s,T,p),u(s,_,p),e(_,g),e(g,x),b(h,x,null),e(_,f),e(_,G),e(G,Ic),u(s,ud,p),u(s,Be,p),e(Be,ht),e(ht,oa),b(co,oa,null),e(Be,Nc),e(Be,na),e(na,Sc),u(s,md,p),u(s,qe,p),e(qe,Bc),e(qe,po),e(po,Rc),e(qe,Wc),e(qe,Ln),e(Ln,Uc),e(qe,Hc),u(s,fd,p),u(s,qn,p),e(qn,Vc),u(s,gd,p),u(s,ut,p),e(ut,$n),e($n,ho),e(ho,Qc),e($n,Xc),e(ut,Gc),e(ut,Fn),e(Fn,uo),e(uo,Kc),e(Fn,Yc),u(s,_d,p),u(s,zn,p),e(zn,Jc),u(s,kd,p),u(s,jn,p),e(jn,sa),e(sa,Zc),u(s,vd,p),u(s,Cn,p),e(Cn,ep),u(s,bd,p),u(s,$e,p),e($e,le),e(le,tp),e(le,aa),e(aa,op),e(le,np),e(le,Pn),e(Pn,sp),e(le,ap),e(le,ra),e(ra,rp),e(le,ip),e(le,ia),e(ia,lp),e(le,dp),e($e,cp),e($e,Re),e(Re,pp),e(Re,Dn),e(Dn,hp),e(Re,up),e(Re,On),e(On,mp),e(Re,fp),e($e,gp),e($e,mo),e(mo,_p),e(mo,fo),e(fo,kp),e(mo,vp),u(s,Md,p),u(s,mt,p),u(s,wd,p),u(s,go,p),e(go,bp),e(go,An),e(An,Mp),u(s,yd,p),u(s,Fe,p),e(Fe,wp),e(Fe,_o),e(_o,yp),e(Fe,xp),e(Fe,ko),e(ko,Tp),e(Fe,Ep),u(s,xd,p),u(s,We,p),e(We,ft),e(ft,la),b(vo,la,null),e(We,Lp),e(We,da),e(da,qp),u(s,Td,p),u(s,J,p),e(J,$p),e(J,In),e(In,Fp),e(J,zp),e(J,Nn),e(Nn,jp),e(J,Cp),e(J,Sn),e(Sn,Pp),e(J,Dp),e(J,Bn),e(Bn,Op),e(J,Ap),e(J,ca),e(ca,Ip),e(J,Np),u(s,Ed,p),b(bo,s,p),u(s,Ld,p),u(s,F,p),e(F,Sp),e(F,Rn),e(Rn,Bp),e(F,Rp),e(F,Wn),e(Wn,Wp),e(F,Up),e(F,Un),e(Un,Hp),e(F,Vp),e(F,Hn),e(Hn,Qp),e(F,Xp),e(F,pa),e(pa,Gp),e(F,Kp),e(F,ha),e(ha,Yp),e(F,Jp),e(F,ua),e(ua,Zp),e(F,eh),e(F,ma),e(ma,th),e(F,oh),e(F,fa),e(fa,nh),e(F,sh),e(F,ga),e(ga,ah),e(F,rh),u(s,qd,p),u(s,de,p),e(de,Vn),e(Vn,ih),e(de,lh),e(de,Mo),e(Mo,dh),e(de,ch),e(de,Qn),e(Qn,ph),e(de,hh),e(de,Xn),e(Xn,uh),e(de,mh),u(s,$d,p),u(s,Gn,p),e(Gn,fh),u(s,Fd,p),u(s,Kn,p),e(Kn,_a),e(_a,gh),u(s,zd,p),u(s,Yn,p),e(Yn,_h),u(s,jd,p),b(wo,s,p),u(s,Cd,p),u(s,Jn,p),e(Jn,ka),e(ka,kh),u(s,Pd,p),u(s,ze,p),e(ze,vh),e(ze,va),e(va,bh),e(ze,Mh),e(ze,ba),e(ba,wh),e(ze,yh),u(s,Dd,p),b(yo,s,p),u(s,Od,p),u(s,Zn,p),e(Zn,Ma),e(Ma,xh),u(s,Ad,p),u(s,Z,p),e(Z,Th),e(Z,xo),e(xo,Eh),e(Z,Lh),e(Z,wa),e(wa,qh),e(Z,$h),e(Z,ya),e(ya,Fh),e(Z,zh),e(Z,xa),e(xa,jh),e(Z,Ch),e(Z,Ta),e(Ta,Ph),e(Z,Dh),u(s,Id,p),b(To,s,p),u(s,Nd,p),u(s,es,p),e(es,Ea),e(Ea,Oh),u(s,Sd,p),u(s,ts,p),e(ts,Ah),u(s,Bd,p),b(Eo,s,p),u(s,Rd,p),u(s,os,p),e(os,La),e(La,Ih),u(s,Wd,p),u(s,je,p),e(je,Nh),e(je,qa),e(qa,Sh),e(je,Bh),e(je,$a),e($a,Rh),e(je,Wh),u(s,Ud,p),b(Lo,s,p),u(s,Hd,p),u(s,Ue,p),e(Ue,gt),e(gt,Fa),b(qo,Fa,null),e(Ue,Uh),e(Ue,za),e(za,Hh),u(s,Vd,p),u(s,Ce,p),e(Ce,ja),e(ja,ns),e(ns,Vh),e(Ce,Qh),e(Ce,Ca),e(Ca,ss),e(ss,Xh),e(Ce,Gh),e(Ce,Pa),e(Pa,as),e(as,Kh),u(s,Qd,p),u(s,He,p),e(He,_t),e(_t,Da),b($o,Da,null),e(He,Yh),e(He,Oa),e(Oa,Jh),u(s,Xd,p),u(s,ce,p),b(Fo,ce,null),e(ce,Zh),e(ce,Ve),e(Ve,eu),e(Ve,rs),e(rs,tu),e(Ve,ou),e(Ve,zo),e(zo,nu),e(Ve,su),e(ce,au),e(ce,Qe),e(Qe,ru),e(Qe,is),e(is,iu),e(Qe,lu),e(Qe,ls),e(ls,du),e(Qe,cu),e(ce,pu),b(kt,ce,null),u(s,Gd,p),u(s,Xe,p),e(Xe,vt),e(vt,Aa),b(jo,Aa,null),e(Xe,hu),e(Xe,Ia),e(Ia,uu),u(s,Kd,p),u(s,pe,p),b(Co,pe,null),e(pe,mu),e(pe,Na),e(Na,fu),e(pe,gu),e(pe,Po),e(Po,_u),e(Po,Sa),e(Sa,ku),e(Po,vu),e(pe,bu),e(pe,Pe),b(Do,Pe,null),e(Pe,Mu),e(Pe,Ba),e(Ba,wu),e(Pe,yu),b(bt,Pe,null),u(s,Yd,p),u(s,Ge,p),e(Ge,Mt),e(Mt,Ra),b(Oo,Ra,null),e(Ge,xu),e(Ge,Wa),e(Wa,Tu),u(s,Jd,p),u(s,K,p),b(Ao,K,null),e(K,Eu),e(K,S),e(S,Lu),e(S,ds),e(ds,qu),e(S,$u),e(S,Ua),e(Ua,Fu),e(S,zu),e(S,Ha),e(Ha,ju),e(S,Cu),e(S,Va),e(Va,Pu),e(S,Du),e(S,Qa),e(Qa,Ou),e(S,Au),e(S,Xa),e(Xa,Iu),e(S,Nu),e(S,cs),e(cs,Su),e(S,Bu),e(K,Ru),e(K,De),b(Io,De,null),e(De,Wu),e(De,Ga),e(Ga,Uu),e(De,Hu),e(De,No),e(No,ps),e(ps,Vu),e(ps,Ka),e(Ka,Qu),e(No,Xu),e(No,hs),e(hs,Gu),e(hs,Ya),e(Ya,Ku),e(K,Yu),e(K,us),b(So,us,null),e(K,Ju),e(K,wt),b(Bo,wt,null),e(wt,Zu),e(wt,Ja),e(Ja,em),e(K,tm),e(K,ms),b(Ro,ms,null),u(s,Zd,p),u(s,Ke,p),e(Ke,yt),e(yt,Za),b(Wo,Za,null),e(Ke,om),e(Ke,er),e(er,nm),u(s,ec,p),u(s,j,p),b(Uo,j,null),e(j,sm),e(j,tr),e(tr,am),e(j,rm),e(j,B),e(B,fs),e(fs,im),e(B,lm),e(B,or),e(or,dm),e(B,cm),e(B,nr),e(nr,pm),e(B,hm),e(B,sr),e(sr,um),e(B,mm),e(B,ar),e(ar,fm),e(B,gm),e(B,rr),e(rr,_m),e(B,km),e(B,gs),e(gs,vm),e(B,bm),e(j,Mm),e(j,ir),e(ir,wm),e(j,ym),e(j,R),b(Ho,R,null),e(R,xm),e(R,O),e(O,Tm),e(O,lr),e(lr,Em),e(O,Lm),e(O,dr),e(dr,qm),e(O,$m),e(O,cr),e(cr,Fm),e(O,zm),e(O,pr),e(pr,jm),e(O,Cm),e(O,hr),e(hr,Pm),e(O,Dm),e(O,_s),e(_s,Om),e(O,Am),e(O,ur),e(ur,Im),e(O,Nm),e(O,mr),e(mr,Sm),e(O,Bm),e(R,Rm),e(R,Y),e(Y,fr),e(fr,xt),e(xt,gr),e(gr,Wm),e(xt,Um),e(xt,_r),e(_r,Hm),e(xt,Vm),e(Y,Qm),e(Y,kr),e(kr,Tt),e(Tt,vr),e(vr,Xm),e(Tt,Gm),e(Tt,br),e(br,Km),e(Tt,Ym),e(Y,Jm),e(Y,Mr),e(Mr,W),e(W,wr),e(wr,Zm),e(W,ef),e(W,yr),e(yr,tf),e(W,of),e(W,xr),e(xr,nf),e(W,sf),e(W,Tr),e(Tr,af),e(W,rf),e(W,ks),e(ks,lf),e(W,df),e(W,Er),e(Er,cf),e(W,pf),e(W,Lr),e(Lr,hf),e(W,uf),e(Y,mf),e(Y,qr),e(qr,Oe),e(Oe,$r),e($r,ff),e(Oe,gf),e(Oe,Fr),e(Fr,_f),e(Oe,kf),e(Oe,zr),e(zr,vf),e(Oe,bf),e(Y,Mf),e(Y,jr),e(jr,Et),e(Et,Cr),e(Cr,wf),e(Et,yf),e(Et,Pr),e(Pr,xf),e(Et,Tf),e(Y,Ef),e(Y,Dr),e(Dr,Lt),e(Lt,Or),e(Or,Lf),e(Lt,qf),e(Lt,Ar),e(Ar,$f),e(Lt,Ff),e(Y,zf),e(Y,Ir),e(Ir,fe),e(fe,Nr),e(Nr,jf),e(fe,Cf),e(fe,Sr),e(Sr,Pf),e(fe,Df),e(fe,Br),e(Br,Of),e(fe,Af),e(fe,Rr),e(Rr,If),e(fe,Nf),e(R,Sf),e(R,E),e(E,Bf),e(E,Wr),e(Wr,Rf),e(E,Wf),e(E,Ur),e(Ur,Uf),e(E,Hf),e(E,Hr),e(Hr,Vf),e(E,Qf),e(E,Vr),e(Vr,Xf),e(E,Gf),e(E,Qr),e(Qr,Kf),e(E,Yf),e(E,Xr),e(Xr,Jf),e(E,Zf),e(E,Gr),e(Gr,eg),e(E,tg),e(E,Kr),e(Kr,og),e(E,ng),e(E,Yr),e(Yr,sg),e(E,ag),e(E,Jr),e(Jr,rg),e(E,ig),e(E,Zr),e(Zr,lg),e(E,dg),e(E,ei),e(ei,cg),e(E,pg),e(E,ti),e(ti,hg),e(E,ug),e(E,vs),e(vs,mg),e(E,fg),e(E,oi),e(oi,gg),e(E,_g),e(R,kg),e(R,Ye),e(Ye,qt),e(qt,ni),e(ni,vg),e(qt,bg),e(qt,si),e(si,Mg),e(qt,wg),e(Ye,yg),e(Ye,$t),e($t,ai),e(ai,xg),e($t,Tg),e($t,ri),e(ri,Eg),e($t,Lg),e(Ye,qg),e(Ye,Ft),e(Ft,ii),e(ii,$g),e(Ft,Fg),e(Ft,li),e(li,zg),e(Ft,jg),e(R,Cg),e(R,A),e(A,Pg),e(A,di),e(di,Dg),e(A,Og),e(A,ci),e(ci,Ag),e(A,Ig),e(A,pi),e(pi,Ng),e(A,Sg),e(A,hi),e(hi,Bg),e(A,Rg),e(A,ui),e(ui,Wg),e(A,Ug),e(A,bs),e(bs,Hg),e(A,Vg),e(A,mi),e(mi,Qg),e(A,Xg),e(A,fi),e(fi,Gg),e(A,Kg),e(R,Yg),e(R,C),e(C,gi),e(gi,zt),e(zt,_i),e(_i,Jg),e(zt,Zg),e(zt,ki),e(ki,e_),e(zt,t_),e(C,o_),e(C,vi),e(vi,jt),e(jt,bi),e(bi,n_),e(jt,s_),e(jt,Mi),e(Mi,a_),e(jt,r_),e(C,i_),e(C,wi),e(wi,U),e(U,yi),e(yi,l_),e(U,d_),e(U,xi),e(xi,c_),e(U,p_),e(U,Ti),e(Ti,h_),e(U,u_),e(U,Ei),e(Ei,m_),e(U,f_),e(U,Ms),e(Ms,g_),e(U,__),e(U,Li),e(Li,k_),e(U,v_),e(U,qi),e(qi,b_),e(U,M_),e(C,w_),e(C,$i),e($i,Ae),e(Ae,Fi),e(Fi,y_),e(Ae,x_),e(Ae,zi),e(zi,T_),e(Ae,E_),e(Ae,ji),e(ji,L_),e(Ae,q_),e(C,$_),e(C,Ci),e(Ci,Ct),e(Ct,Pi),e(Pi,F_),e(Ct,z_),e(Ct,Di),e(Di,j_),e(Ct,C_),e(C,P_),e(C,Oi),e(Oi,Pt),e(Pt,Ai),e(Ai,D_),e(Pt,O_),e(Pt,Ii),e(Ii,A_),e(Pt,I_),e(C,N_),e(C,Ni),e(Ni,L),e(L,Si),e(Si,S_),e(L,B_),e(L,Bi),e(Bi,R_),e(L,W_),e(L,Ri),e(Ri,U_),e(L,H_),e(L,Wi),e(Wi,V_),e(L,Q_),e(L,Ui),e(Ui,X_),e(L,G_),e(L,Hi),e(Hi,K_),e(L,Y_),e(L,Vi),e(Vi,J_),e(L,Z_),e(L,Qi),e(Qi,ek),e(L,tk),e(L,Xi),e(Xi,ok),e(L,nk),e(L,Gi),e(Gi,sk),e(L,ak),e(L,Ki),e(Ki,rk),e(L,ik),e(L,Yi),e(Yi,lk),e(L,dk),e(L,Ji),e(Ji,ck),e(L,pk),e(L,ws),e(ws,hk),e(L,uk),e(L,Zi),e(Zi,mk),e(L,fk),e(C,gk),e(C,el),e(el,Dt),e(Dt,tl),e(tl,_k),e(Dt,kk),e(Dt,ol),e(ol,vk),e(Dt,bk),e(C,Mk),e(C,nl),e(nl,Ot),e(Ot,sl),e(sl,wk),e(Ot,yk),e(Ot,al),e(al,xk),e(Ot,Tk),e(C,Ek),e(C,rl),e(rl,At),e(At,il),e(il,Lk),e(At,qk),e(At,ll),e(ll,$k),e(At,Fk),e(j,zk),e(j,Ie),b(Vo,Ie,null),e(Ie,jk),e(Ie,dl),e(dl,Ck),e(Ie,Pk),e(Ie,Qo),e(Qo,ys),e(ys,Dk),e(ys,cl),e(cl,Ok),e(Qo,Ak),e(Qo,xs),e(xs,Ik),e(xs,pl),e(pl,Nk),e(j,Sk),e(j,It),b(Xo,It,null),e(It,Bk),e(It,hl),e(hl,Rk),e(j,Wk),e(j,Nt),b(Go,Nt,null),e(Nt,Uk),e(Nt,Ko),e(Ko,Hk),e(Ko,ul),e(ul,Vk),e(Ko,Qk),e(j,Xk),e(j,St),b(Yo,St,null),e(St,Gk),e(St,ml),e(ml,Kk),u(s,tc,p),u(s,Je,p),e(Je,Bt),e(Bt,fl),b(Jo,fl,null),e(Je,Yk),e(Je,gl),e(gl,Jk),u(s,oc,p),u(s,te,p),b(Zo,te,null),e(te,Zk),e(te,_l),e(_l,ev),e(te,tv),e(te,Ts),e(Ts,Es),e(Es,ov),e(Ts,nv),e(te,sv),e(te,I),e(I,av),e(I,Ls),e(Ls,rv),e(I,iv),e(I,qs),e(qs,lv),e(I,dv),e(I,$s),e($s,cv),e(I,pv),e(I,kl),e(kl,hv),e(I,uv),e(I,vl),e(vl,mv),e(I,fv),e(I,bl),e(bl,gv),e(I,_v),e(I,Ml),e(Ml,kv),e(I,vv),e(I,wl),e(wl,bv),e(I,Mv),e(te,wv),e(te,ge),b(en,ge,null),e(ge,yv),e(ge,oe),e(oe,xv),e(oe,yl),e(yl,Tv),e(oe,Ev),e(oe,tn),e(tn,xl),e(xl,Lv),e(tn,qv),e(oe,$v),e(oe,Tl),e(Tl,Fv),e(oe,zv),e(oe,El),e(El,jv),e(oe,Cv),e(oe,Ll),e(Ll,Pv),e(oe,Dv),e(ge,Ov),e(ge,on),e(on,Av),e(on,ql),e(ql,Iv),e(on,Nv),e(ge,Sv),e(ge,$l),e($l,Bv),u(s,nc,p),u(s,Ze,p),e(Ze,Rt),e(Rt,Fl),b(nn,Fl,null),e(Ze,Rv),e(Ze,zl),e(zl,Wv),u(s,sc,p),u(s,Ee,p),b(sn,Ee,null),e(Ee,Uv),e(Ee,an),e(an,Hv),e(an,rn),e(rn,Vv),e(an,Qv),e(Ee,Xv),e(Ee,_e),b(ln,_e,null),e(_e,Gv),e(_e,et),e(et,Kv),e(et,Fs),e(Fs,Yv),e(et,Jv),e(et,jl),e(jl,Zv),e(et,eb),e(_e,tb),b(Wt,_e,null),e(_e,ob),b(Ut,_e,null),u(s,ac,p),u(s,tt,p),e(tt,Ht),e(Ht,Cl),b(dn,Cl,null),e(tt,nb),e(tt,Pl),e(Pl,sb),u(s,rc,p),u(s,he,p),b(cn,he,null),e(he,ab),e(he,Dl),e(Dl,rb),e(he,ib),e(he,pn),e(pn,lb),e(pn,hn),e(hn,db),e(pn,cb),e(he,pb),e(he,ke),b(un,ke,null),e(ke,hb),e(ke,ot),e(ot,ub),e(ot,zs),e(zs,mb),e(ot,fb),e(ot,Ol),e(Ol,gb),e(ot,_b),e(ke,kb),b(Vt,ke,null),e(ke,vb),b(Qt,ke,null),u(s,ic,p),u(s,nt,p),e(nt,Xt),e(Xt,Al),b(mn,Al,null),e(nt,bb),e(nt,Il),e(Il,Mb),u(s,lc,p),u(s,Le,p),b(fn,Le,null),e(Le,wb),e(Le,st),e(st,yb),e(st,Nl),e(Nl,xb),e(st,Tb),e(st,gn),e(gn,Eb),e(st,Lb),e(Le,qb),e(Le,ve),b(_n,ve,null),e(ve,$b),e(ve,at),e(at,Fb),e(at,js),e(js,zb),e(at,jb),e(at,Sl),e(Sl,Cb),e(at,Pb),e(ve,Db),b(Gt,ve,null),e(ve,Ob),b(Kt,ve,null),u(s,dc,p),u(s,rt,p),e(rt,Yt),e(Yt,Bl),b(kn,Bl,null),e(rt,Ab),e(rt,Rl),e(Rl,Ib),u(s,cc,p),u(s,ue,p),b(vn,ue,null),e(ue,Nb),e(ue,it),e(it,Sb),e(it,Wl),e(Wl,Bb),e(it,Rb),e(it,Ul),e(Ul,Wb),e(it,Ub),e(ue,Hb),e(ue,bn),e(bn,Vb),e(bn,Mn),e(Mn,Qb),e(bn,Xb),e(ue,Gb),e(ue,be),b(wn,be,null),e(be,Kb),e(be,lt),e(lt,Yb),e(lt,Cs),e(Cs,Jb),e(lt,Zb),e(lt,Hl),e(Hl,eM),e(lt,tM),e(be,oM),b(Jt,be,null),e(be,nM),b(Zt,be,null),pc=!0},p(s,[p]){const yn={};p&2&&(yn.$$scope={dirty:p,ctx:s}),kt.$set(yn);const Vl={};p&2&&(Vl.$$scope={dirty:p,ctx:s}),bt.$set(Vl);const Ql={};p&2&&(Ql.$$scope={dirty:p,ctx:s}),Wt.$set(Ql);const Xl={};p&2&&(Xl.$$scope={dirty:p,ctx:s}),Ut.$set(Xl);const xn={};p&2&&(xn.$$scope={dirty:p,ctx:s}),Vt.$set(xn);const Gl={};p&2&&(Gl.$$scope={dirty:p,ctx:s}),Qt.$set(Gl);const Kl={};p&2&&(Kl.$$scope={dirty:p,ctx:s}),Gt.$set(Kl);const Yl={};p&2&&(Yl.$$scope={dirty:p,ctx:s}),Kt.$set(Yl);const dt={};p&2&&(dt.$$scope={dirty:p,ctx:s}),Jt.$set(dt);const Jl={};p&2&&(Jl.$$scope={dirty:p,ctx:s}),Zt.$set(Jl)},i(s){pc||(M(h.$$.fragment,s),M(co.$$.fragment,s),M(vo.$$.fragment,s),M(bo.$$.fragment,s),M(wo.$$.fragment,s),M(yo.$$.fragment,s),M(To.$$.fragment,s),M(Eo.$$.fragment,s),M(Lo.$$.fragment,s),M(qo.$$.fragment,s),M($o.$$.fragment,s),M(Fo.$$.fragment,s),M(kt.$$.fragment,s),M(jo.$$.fragment,s),M(Co.$$.fragment,s),M(Do.$$.fragment,s),M(bt.$$.fragment,s),M(Oo.$$.fragment,s),M(Ao.$$.fragment,s),M(Io.$$.fragment,s),M(So.$$.fragment,s),M(Bo.$$.fragment,s),M(Ro.$$.fragment,s),M(Wo.$$.fragment,s),M(Uo.$$.fragment,s),M(Ho.$$.fragment,s),M(Vo.$$.fragment,s),M(Xo.$$.fragment,s),M(Go.$$.fragment,s),M(Yo.$$.fragment,s),M(Jo.$$.fragment,s),M(Zo.$$.fragment,s),M(en.$$.fragment,s),M(nn.$$.fragment,s),M(sn.$$.fragment,s),M(ln.$$.fragment,s),M(Wt.$$.fragment,s),M(Ut.$$.fragment,s),M(dn.$$.fragment,s),M(cn.$$.fragment,s),M(un.$$.fragment,s),M(Vt.$$.fragment,s),M(Qt.$$.fragment,s),M(mn.$$.fragment,s),M(fn.$$.fragment,s),M(_n.$$.fragment,s),M(Gt.$$.fragment,s),M(Kt.$$.fragment,s),M(kn.$$.fragment,s),M(vn.$$.fragment,s),M(wn.$$.fragment,s),M(Jt.$$.fragment,s),M(Zt.$$.fragment,s),pc=!0)},o(s){w(h.$$.fragment,s),w(co.$$.fragment,s),w(vo.$$.fragment,s),w(bo.$$.fragment,s),w(wo.$$.fragment,s),w(yo.$$.fragment,s),w(To.$$.fragment,s),w(Eo.$$.fragment,s),w(Lo.$$.fragment,s),w(qo.$$.fragment,s),w($o.$$.fragment,s),w(Fo.$$.fragment,s),w(kt.$$.fragment,s),w(jo.$$.fragment,s),w(Co.$$.fragment,s),w(Do.$$.fragment,s),w(bt.$$.fragment,s),w(Oo.$$.fragment,s),w(Ao.$$.fragment,s),w(Io.$$.fragment,s),w(So.$$.fragment,s),w(Bo.$$.fragment,s),w(Ro.$$.fragment,s),w(Wo.$$.fragment,s),w(Uo.$$.fragment,s),w(Ho.$$.fragment,s),w(Vo.$$.fragment,s),w(Xo.$$.fragment,s),w(Go.$$.fragment,s),w(Yo.$$.fragment,s),w(Jo.$$.fragment,s),w(Zo.$$.fragment,s),w(en.$$.fragment,s),w(nn.$$.fragment,s),w(sn.$$.fragment,s),w(ln.$$.fragment,s),w(Wt.$$.fragment,s),w(Ut.$$.fragment,s),w(dn.$$.fragment,s),w(cn.$$.fragment,s),w(un.$$.fragment,s),w(Vt.$$.fragment,s),w(Qt.$$.fragment,s),w(mn.$$.fragment,s),w(fn.$$.fragment,s),w(_n.$$.fragment,s),w(Gt.$$.fragment,s),w(Kt.$$.fragment,s),w(kn.$$.fragment,s),w(vn.$$.fragment,s),w(wn.$$.fragment,s),w(Jt.$$.fragment,s),w(Zt.$$.fragment,s),pc=!1},d(s){t(m),s&&t(T),s&&t(_),y(h),s&&t(ud),s&&t(Be),y(co),s&&t(md),s&&t(qe),s&&t(fd),s&&t(qn),s&&t(gd),s&&t(ut),s&&t(_d),s&&t(zn),s&&t(kd),s&&t(jn),s&&t(vd),s&&t(Cn),s&&t(bd),s&&t($e),s&&t(Md),s&&t(mt),s&&t(wd),s&&t(go),s&&t(yd),s&&t(Fe),s&&t(xd),s&&t(We),y(vo),s&&t(Td),s&&t(J),s&&t(Ed),y(bo,s),s&&t(Ld),s&&t(F),s&&t(qd),s&&t(de),s&&t($d),s&&t(Gn),s&&t(Fd),s&&t(Kn),s&&t(zd),s&&t(Yn),s&&t(jd),y(wo,s),s&&t(Cd),s&&t(Jn),s&&t(Pd),s&&t(ze),s&&t(Dd),y(yo,s),s&&t(Od),s&&t(Zn),s&&t(Ad),s&&t(Z),s&&t(Id),y(To,s),s&&t(Nd),s&&t(es),s&&t(Sd),s&&t(ts),s&&t(Bd),y(Eo,s),s&&t(Rd),s&&t(os),s&&t(Wd),s&&t(je),s&&t(Ud),y(Lo,s),s&&t(Hd),s&&t(Ue),y(qo),s&&t(Vd),s&&t(Ce),s&&t(Qd),s&&t(He),y($o),s&&t(Xd),s&&t(ce),y(Fo),y(kt),s&&t(Gd),s&&t(Xe),y(jo),s&&t(Kd),s&&t(pe),y(Co),y(Do),y(bt),s&&t(Yd),s&&t(Ge),y(Oo),s&&t(Jd),s&&t(K),y(Ao),y(Io),y(So),y(Bo),y(Ro),s&&t(Zd),s&&t(Ke),y(Wo),s&&t(ec),s&&t(j),y(Uo),y(Ho),y(Vo),y(Xo),y(Go),y(Yo),s&&t(tc),s&&t(Je),y(Jo),s&&t(oc),s&&t(te),y(Zo),y(en),s&&t(nc),s&&t(Ze),y(nn),s&&t(sc),s&&t(Ee),y(sn),y(ln),y(Wt),y(Ut),s&&t(ac),s&&t(tt),y(dn),s&&t(rc),s&&t(he),y(cn),y(un),y(Vt),y(Qt),s&&t(ic),s&&t(nt),y(mn),s&&t(lc),s&&t(Le),y(fn),y(_n),y(Gt),y(Kt),s&&t(dc),s&&t(rt),y(kn),s&&t(cc),s&&t(ue),y(vn),y(wn),y(Jt),y(Zt)}}}const Rx={local:"markuplm",sections:[{local:"overview",title:"Overview"},{local:"usage-markuplmprocessor",title:"Usage: MarkupLMProcessor"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.MarkupLMConfig",title:"MarkupLMConfig"},{local:"transformers.MarkupLMFeatureExtractor",title:"MarkupLMFeatureExtractor"},{local:"transformers.MarkupLMTokenizer",title:"MarkupLMTokenizer"},{local:"transformers.MarkupLMTokenizerFast",title:"MarkupLMTokenizerFast"},{local:"transformers.MarkupLMProcessor",title:"MarkupLMProcessor"},{local:"transformers.MarkupLMModel",title:"MarkupLMModel"},{local:"transformers.MarkupLMForSequenceClassification",title:"MarkupLMForSequenceClassification"},{local:"transformers.MarkupLMForTokenClassification",title:"MarkupLMForTokenClassification"},{local:"transformers.MarkupLMForQuestionAnswering",title:"MarkupLMForQuestionAnswering"}],title:"MarkupLM"};function Wx(P){return Fx(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kx extends Tx{constructor(m){super();Ex(this,m,Wx,Bx,Lx,{})}}export{Kx as default,Rx as metadata};
