import{S as $x,i as Fx,s as zx,e as a,k as l,w as k,t as o,M as Cx,c as r,d as t,m as d,a as i,x as v,h as n,b as c,N as jx,G as e,g as u,y as b,q as M,o as w,B as y,v as Px,L as ta}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ic}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 Dx(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 Ox(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 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, 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 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, 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 Rx(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 Bx(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 Wx(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 Ux(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 Hx(P){let m,T,_,g,x,h,f,G,Nc,md,Re,ht,oa,co,Sc,na,Rc,fd,qe,Bc,po,Wc,Uc,Ln,Hc,Vc,gd,qn,Qc,_d,ut,$n,ho,Xc,Gc,Kc,Fn,uo,Yc,Jc,kd,zn,Zc,vd,Cn,sa,ep,bd,jn,tp,Md,$e,le,op,aa,np,sp,Pn,ap,rp,ra,ip,lp,ia,dp,cp,pp,Be,hp,Dn,up,mp,On,fp,gp,_p,mo,kp,fo,vp,bp,wd,mt,gM,yd,go,Mp,An,wp,xd,Fe,yp,_o,xp,Tp,ko,Ep,Lp,Td,We,ft,la,vo,qp,da,$p,Ed,J,Fp,In,zp,Cp,Nn,jp,Pp,Sn,Dp,Op,Rn,Ap,Ip,ca,Np,Sp,Ld,bo,qd,F,Rp,Bn,Bp,Wp,Wn,Up,Hp,Un,Vp,Qp,Hn,Xp,Gp,pa,Kp,Yp,ha,Jp,Zp,ua,eh,th,ma,oh,nh,fa,sh,ah,ga,rh,ih,$d,de,Vn,lh,dh,Mo,ch,ph,Qn,hh,uh,Xn,mh,fh,Fd,Gn,gh,zd,Kn,_a,_h,Cd,Yn,kh,jd,wo,Pd,Jn,ka,vh,Dd,ze,bh,va,Mh,wh,ba,yh,xh,Od,yo,Ad,Zn,Ma,Th,Id,Z,Eh,xo,Lh,qh,wa,$h,Fh,ya,zh,Ch,xa,jh,Ph,Ta,Dh,Oh,Nd,To,Sd,es,Ea,Ah,Rd,ts,Ih,Bd,Eo,Wd,os,La,Nh,Ud,Ce,Sh,qa,Rh,Bh,$a,Wh,Uh,Hd,Lo,Vd,Ue,gt,Fa,qo,Hh,za,Vh,Qd,je,Ca,ns,Qh,Xh,ja,ss,Gh,Kh,Pa,as,Yh,Xd,He,_t,Da,$o,Jh,Oa,Zh,Gd,ce,Fo,eu,Ve,tu,rs,ou,nu,zo,su,au,ru,Qe,iu,is,lu,du,ls,cu,pu,hu,kt,Kd,Xe,vt,Aa,Co,uu,Ia,mu,Yd,pe,jo,fu,Na,gu,_u,Po,ku,Sa,vu,bu,Mu,Pe,Do,wu,Ra,yu,xu,bt,Jd,Ge,Mt,Ba,Oo,Tu,Wa,Eu,Zd,K,Ao,Lu,S,qu,ds,$u,Fu,Ua,zu,Cu,Ha,ju,Pu,Va,Du,Ou,Qa,Au,Iu,Xa,Nu,Su,cs,Ru,Bu,Wu,De,Io,Uu,Ga,Hu,Vu,No,ps,Qu,Ka,Xu,Gu,hs,Ku,Ya,Yu,Ju,us,So,Zu,wt,Ro,em,Ja,tm,om,ms,Bo,ec,Ke,yt,Za,Wo,nm,er,sm,tc,C,Uo,am,tr,rm,im,R,fs,lm,dm,or,cm,pm,nr,hm,um,sr,mm,fm,ar,gm,_m,rr,km,vm,gs,bm,Mm,wm,ir,ym,xm,B,Ho,Tm,O,Em,lr,Lm,qm,dr,$m,Fm,cr,zm,Cm,pr,jm,Pm,hr,Dm,Om,_s,Am,Im,ur,Nm,Sm,mr,Rm,Bm,Wm,Y,fr,xt,gr,Um,Hm,_r,Vm,Qm,Xm,kr,Tt,vr,Gm,Km,br,Ym,Jm,Zm,Mr,W,wr,ef,tf,yr,of,nf,xr,sf,af,Tr,rf,lf,ks,df,cf,Er,pf,hf,Lr,uf,mf,ff,qr,Oe,$r,gf,_f,Fr,kf,vf,zr,bf,Mf,wf,Cr,Et,jr,yf,xf,Pr,Tf,Ef,Lf,Dr,Lt,Or,qf,$f,Ar,Ff,zf,Cf,Ir,fe,Nr,jf,Pf,Sr,Df,Of,Rr,Af,If,Br,Nf,Sf,Rf,E,Bf,Wr,Wf,Uf,Ur,Hf,Vf,Hr,Qf,Xf,Vr,Gf,Kf,Qr,Yf,Jf,Xr,Zf,eg,Gr,tg,og,Kr,ng,sg,Yr,ag,rg,Jr,ig,lg,Zr,dg,cg,ei,pg,hg,ti,ug,mg,oi,fg,gg,vs,_g,kg,ni,vg,bg,Mg,Ye,qt,si,wg,yg,ai,xg,Tg,Eg,$t,ri,Lg,qg,ii,$g,Fg,zg,Ft,li,Cg,jg,di,Pg,Dg,Og,A,Ag,ci,Ig,Ng,pi,Sg,Rg,hi,Bg,Wg,ui,Ug,Hg,mi,Vg,Qg,bs,Xg,Gg,fi,Kg,Yg,gi,Jg,Zg,e_,j,_i,zt,ki,t_,o_,vi,n_,s_,a_,bi,Ct,Mi,r_,i_,wi,l_,d_,c_,yi,U,xi,p_,h_,Ti,u_,m_,Ei,f_,g_,Li,__,k_,Ms,v_,b_,qi,M_,w_,$i,y_,x_,T_,Fi,Ae,zi,E_,L_,Ci,q_,$_,ji,F_,z_,C_,Pi,jt,Di,j_,P_,Oi,D_,O_,A_,Ai,Pt,Ii,I_,N_,Ni,S_,R_,B_,Si,L,Ri,W_,U_,Bi,H_,V_,Wi,Q_,X_,Ui,G_,K_,Hi,Y_,J_,Vi,Z_,ek,Qi,tk,ok,Xi,nk,sk,Gi,ak,rk,Ki,ik,lk,Yi,dk,ck,Ji,pk,hk,Zi,uk,mk,ws,fk,gk,el,_k,kk,vk,tl,Dt,ol,bk,Mk,nl,wk,yk,xk,sl,Ot,al,Tk,Ek,rl,Lk,qk,$k,il,At,ll,Fk,zk,dl,Ck,jk,Pk,Ie,Vo,Dk,cl,Ok,Ak,Qo,ys,Ik,pl,Nk,Sk,xs,Rk,hl,Bk,Wk,It,Xo,Uk,ul,Hk,Vk,Nt,Go,Qk,Ko,Xk,ml,Gk,Kk,Yk,St,Yo,Jk,fl,Zk,oc,Je,Rt,gl,Jo,ev,_l,tv,nc,te,Zo,ov,kl,nv,sv,Ts,Es,av,rv,iv,I,lv,Ls,dv,cv,qs,pv,hv,$s,uv,mv,vl,fv,gv,bl,_v,kv,Ml,vv,bv,wl,Mv,wv,yl,yv,xv,Tv,ge,en,Ev,oe,Lv,xl,qv,$v,tn,Tl,Fv,zv,Cv,El,jv,Pv,Ll,Dv,Ov,ql,Av,Iv,Nv,on,Sv,$l,Rv,Bv,Wv,Fl,Uv,sc,Ze,Bt,zl,nn,Hv,Cl,Vv,ac,Ee,sn,Qv,an,Xv,rn,Gv,Kv,Yv,_e,ln,Jv,et,Zv,Fs,eb,tb,jl,ob,nb,sb,Wt,ab,Ut,rc,tt,Ht,Pl,dn,rb,Dl,ib,ic,he,cn,lb,Ol,db,cb,pn,pb,hn,hb,ub,mb,ke,un,fb,ot,gb,zs,_b,kb,Al,vb,bb,Mb,Vt,wb,Qt,lc,nt,Xt,Il,mn,yb,Nl,xb,dc,Le,fn,Tb,st,Eb,Sl,Lb,qb,gn,$b,Fb,zb,ve,_n,Cb,at,jb,Cs,Pb,Db,Rl,Ob,Ab,Ib,Gt,Nb,Kt,cc,rt,Yt,Bl,kn,Sb,Wl,Rb,pc,ue,vn,Bb,it,Wb,Ul,Ub,Hb,Hl,Vb,Qb,Xb,bn,Gb,Mn,Kb,Yb,Jb,be,wn,Zb,lt,eM,js,tM,oM,Vl,nM,sM,aM,Jt,rM,Zt,hc;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.29.0/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.29.0/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.29.0/src/transformers/models/markuplm/configuration_markuplm.py#L29"}}),kt=new ea({props:{anchor:"transformers.MarkupLMConfig.example",$$slots:{default:[Dx]},$$scope:{ctx:P}}}),Co=new me({}),jo=new z({props:{name:"class transformers.MarkupLMFeatureExtractor",anchor:"transformers.MarkupLMFeatureExtractor",parameters:[{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/src/transformers/models/markuplm/feature_extraction_markuplm.py#L99",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/feature_extractor#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.29.0/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),bt=new ea({props:{anchor:"transformers.MarkupLMFeatureExtractor.__call__.example",$$slots:{default:[Ox]},$$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.29.0/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.29.0/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.29.0/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>
`}}),Ro=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.29.0/src/transformers/models/markuplm/tokenization_markuplm.py#L487",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Bo=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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.MarkupLMTokenizerFast.encode_plus.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.29.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.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. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.MarkupLMTokenizerFast.encode_plus.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.29.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.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.29.0/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.MarkupLMTokenizerFast.encode_plus.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.29.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.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.29.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/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.29.0/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.29.0/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.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizer">MarkupLMTokenizer</a> or <a href="/docs/transformers/v4.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.0/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.29.0/src/transformers/models/markuplm/modeling_markuplm.py#L834",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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.29.0/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.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wt=new Ic({props:{$$slots:{default:[Ax]},$$scope:{ctx:P}}}),Ut=new ea({props:{anchor:"transformers.MarkupLMModel.forward.example",$$slots:{default:[Ix]},$$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.29.0/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.29.0/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.29.0/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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.0/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.29.0/src/transformers/models/markuplm/modeling_markuplm.py#L1218",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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.29.0/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.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vt=new Ic({props:{$$slots:{default:[Nx]},$$scope:{ctx:P}}}),Qt=new ea({props:{anchor:"transformers.MarkupLMForSequenceClassification.forward.example",$$slots:{default:[Sx]},$$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.29.0/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.29.0/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.29.0/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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.0/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.29.0/src/transformers/models/markuplm/modeling_markuplm.py#L1111",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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.29.0/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.29.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gt=new Ic({props:{$$slots:{default:[Rx]},$$scope:{ctx:P}}}),Kt=new ea({props:{anchor:"transformers.MarkupLMForTokenClassification.forward.example",$$slots:{default:[Bx]},$$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.29.0/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.29.0/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.29.0/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.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.0/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.29.0/src/transformers/models/markuplm/modeling_markuplm.py#L987",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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.29.0/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.29.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jt=new Ic({props:{$$slots:{default:[Wx]},$$scope:{ctx:P}}}),Zt=new ea({props:{anchor:"transformers.MarkupLMForQuestionAnswering.forward.example",$$slots:{default:[Ux]},$$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"),Nc=o("MarkupLM"),md=l(),Re=a("h2"),ht=a("a"),oa=a("span"),k(co.$$.fragment),Sc=l(),na=a("span"),Rc=o("Overview"),fd=l(),qe=a("p"),Bc=o("The MarkupLM model was proposed in "),po=a("a"),Wc=o(`MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document
Understanding`),Uc=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"),Hc=o("LayoutLM"),Vc=o("."),gd=l(),qn=a("p"),Qc=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:`),_d=l(),ut=a("ul"),$n=a("li"),ho=a("a"),Xc=o("WebSRC"),Gc=o(", a dataset for Web-Based Structural Reading Comprehension (a bit like SQuAD but for web pages)"),Kc=l(),Fn=a("li"),uo=a("a"),Yc=o("SWDE"),Jc=o(`, a dataset
for information extraction from web pages (basically named-entity recogntion on web pages)`),kd=l(),zn=a("p"),Zc=o("The abstract from the paper is the following:"),vd=l(),Cn=a("p"),sa=a("em"),ep=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.`),bd=l(),jn=a("p"),tp=o("Tips:"),Md=l(),$e=a("ul"),le=a("li"),op=o("In addition to "),aa=a("code"),np=o("input_ids"),sp=o(", "),Pn=a("a"),ap=o("forward()"),rp=o(" expects 2 additional inputs, namely "),ra=a("code"),ip=o("xpath_tags_seq"),lp=o(" and "),ia=a("code"),dp=o("xpath_subs_seq"),cp=o(`.
These are the XPATH tags and subscripts respectively for each token in the input sequence.`),pp=l(),Be=a("li"),hp=o("One can use "),Dn=a("a"),up=o("MarkupLMProcessor"),mp=o(" to prepare all data for the model. Refer to the "),On=a("a"),fp=o("usage guide"),gp=o(" for more info."),_p=l(),mo=a("li"),kp=o("Demo notebooks can be found "),fo=a("a"),vp=o("here"),bp=o("."),wd=l(),mt=a("img"),yd=l(),go=a("small"),Mp=o("MarkupLM architecture. Taken from the "),An=a("a"),wp=o("original paper."),xd=l(),Fe=a("p"),yp=o("This model was contributed by "),_o=a("a"),xp=o("nielsr"),Tp=o(". The original code can be found "),ko=a("a"),Ep=o("here"),Lp=o("."),Td=l(),We=a("h2"),ft=a("a"),la=a("span"),k(vo.$$.fragment),qp=l(),da=a("span"),$p=o("Usage: MarkupLMProcessor"),Ed=l(),J=a("p"),Fp=o("The easiest way to prepare data for the model is to use "),In=a("a"),zp=o("MarkupLMProcessor"),Cp=o(`, which internally combines a feature extractor
(`),Nn=a("a"),jp=o("MarkupLMFeatureExtractor"),Pp=o(") and a tokenizer ("),Sn=a("a"),Dp=o("MarkupLMTokenizer"),Op=o(" or "),Rn=a("a"),Ap=o("MarkupLMTokenizerFast"),Ip=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"),Np=o("input_ids"),Sp=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.`),Ld=l(),k(bo.$$.fragment),qd=l(),F=a("p"),Rp=o("In short, one can provide HTML strings (and possibly additional data) to "),Bn=a("a"),Bp=o("MarkupLMProcessor"),Wp=o(`,
and it will create the inputs expected by the model. Internally, the processor first uses
`),Wn=a("a"),Up=o("MarkupLMFeatureExtractor"),Hp=o(` to get a list of nodes and corresponding xpaths. The nodes and
xpaths are then provided to `),Un=a("a"),Vp=o("MarkupLMTokenizer"),Qp=o(" or "),Hn=a("a"),Xp=o("MarkupLMTokenizerFast"),Gp=o(`, which converts them
to token-level `),pa=a("code"),Kp=o("input_ids"),Yp=o(", "),ha=a("code"),Jp=o("attention_mask"),Zp=o(", "),ua=a("code"),eh=o("token_type_ids"),th=o(", "),ma=a("code"),oh=o("xpath_subs_seq"),nh=o(", "),fa=a("code"),sh=o("xpath_tags_seq"),ah=o(`.
Optionally, one can provide node labels to the processor, which are turned into token-level `),ga=a("code"),rh=o("labels"),ih=o("."),$d=l(),de=a("p"),Vn=a("a"),lh=o("MarkupLMFeatureExtractor"),dh=o(" uses "),Mo=a("a"),ch=o("Beautiful Soup"),ph=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"),hh=o("MarkupLMTokenizer"),uh=o(" or "),Xn=a("a"),mh=o("MarkupLMTokenizerFast"),fh=o("."),Fd=l(),Gn=a("p"),gh=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).`),zd=l(),Kn=a("p"),_a=a("strong"),_h=o("Use case 1: web page classification (training, inference) + token classification (inference), parse_html = True"),Cd=l(),Yn=a("p"),kh=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),Pd=l(),Jn=a("p"),ka=a("strong"),vh=o("Use case 2: web page classification (training, inference) + token classification (inference), parse_html=False"),Dd=l(),ze=a("p"),bh=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"),Mh=o("parse_html"),wh=o(" to "),ba=a("code"),yh=o("False"),xh=o("."),Od=l(),k(yo.$$.fragment),Ad=l(),Zn=a("p"),Ma=a("strong"),Th=o("Use case 3: token classification (training), parse_html=False"),Id=l(),Z=a("p"),Eh=o("For token classification tasks (such as "),xo=a("a"),Lh=o("SWDE"),qh=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"),$h=o("labels"),Fh=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"),zh=o("ignore_index"),Ch=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"),Ph=o(" set to "),Ta=a("code"),Dh=o("False"),Oh=o("."),Nd=l(),k(To.$$.fragment),Sd=l(),es=a("p"),Ea=a("strong"),Ah=o("Use case 4: web page question answering (inference), parse_html=True"),Rd=l(),ts=a("p"),Ih=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),Wd=l(),os=a("p"),La=a("strong"),Nh=o("Use case 5: web page question answering (inference), parse_html=False"),Ud=l(),Ce=a("p"),Sh=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"),Rh=o("parse_html"),Bh=o(" to "),$a=a("code"),Wh=o("False"),Uh=o("."),Hd=l(),k(Lo.$$.fragment),Vd=l(),Ue=a("h2"),gt=a("a"),Fa=a("span"),k(qo.$$.fragment),Hh=l(),za=a("span"),Vh=o("Documentation resources"),Qd=l(),je=a("ul"),Ca=a("li"),ns=a("a"),Qh=o("Text classification task guide"),Xh=l(),ja=a("li"),ss=a("a"),Gh=o("Token classification task guide"),Kh=l(),Pa=a("li"),as=a("a"),Yh=o("Question answering task guide"),Xd=l(),He=a("h2"),_t=a("a"),Da=a("span"),k($o.$$.fragment),Jh=l(),Oa=a("span"),Zh=o("MarkupLMConfig"),Gd=l(),ce=a("div"),k(Fo.$$.fragment),eu=l(),Ve=a("p"),tu=o("This is the configuration class to store the configuration of a "),rs=a("a"),ou=o("MarkupLMModel"),nu=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"),su=o("microsoft/markuplm-base"),au=o(" architecture."),ru=l(),Qe=a("p"),iu=o("Configuration objects inherit from "),is=a("a"),lu=o("BertConfig"),du=o(` and can be used to control the model outputs. Read the
documentation from `),ls=a("a"),cu=o("BertConfig"),pu=o(" for more information."),hu=l(),k(kt.$$.fragment),Kd=l(),Xe=a("h2"),vt=a("a"),Aa=a("span"),k(Co.$$.fragment),uu=l(),Ia=a("span"),mu=o("MarkupLMFeatureExtractor"),Yd=l(),pe=a("div"),k(jo.$$.fragment),fu=l(),Na=a("p"),gu=o(`Constructs a MarkupLM feature extractor. This can be used to get a list of nodes and corresponding xpaths from HTML
strings.`),_u=l(),Po=a("p"),ku=o("This feature extractor inherits from "),Sa=a("code"),vu=o("PreTrainedFeatureExtractor()"),bu=o(` which contains most
of the main methods. Users should refer to this superclass for more information regarding those methods.`),Mu=l(),Pe=a("div"),k(Do.$$.fragment),wu=l(),Ra=a("p"),yu=o("Main method to prepare for the model one or several HTML strings."),xu=l(),k(bt.$$.fragment),Jd=l(),Ge=a("h2"),Mt=a("a"),Ba=a("span"),k(Oo.$$.fragment),Tu=l(),Wa=a("span"),Eu=o("MarkupLMTokenizer"),Zd=l(),K=a("div"),k(Ao.$$.fragment),Lu=l(),S=a("p"),qu=o("Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE). "),ds=a("a"),$u=o("MarkupLMTokenizer"),Fu=o(` can be used to
turn HTML strings into to token-level `),Ua=a("code"),zu=o("input_ids"),Cu=o(", "),Ha=a("code"),ju=o("attention_mask"),Pu=o(", "),Va=a("code"),Du=o("token_type_ids"),Ou=o(", "),Qa=a("code"),Au=o("xpath_tags_seq"),Iu=o(` and
`),Xa=a("code"),Nu=o("xpath_tags_seq"),Su=o(". This tokenizer inherits from "),cs=a("a"),Ru=o("PreTrainedTokenizer"),Bu=o(` which contains most of the main methods.
Users should refer to this superclass for more information regarding those methods.`),Wu=l(),De=a("div"),k(Io.$$.fragment),Uu=l(),Ga=a("p"),Hu=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:`),Vu=l(),No=a("ul"),ps=a("li"),Qu=o("single sequence: "),Ka=a("code"),Xu=o("<s> X </s>"),Gu=l(),hs=a("li"),Ku=o("pair of sequences: "),Ya=a("code"),Yu=o("<s> A </s></s> B </s>"),Ju=l(),us=a("div"),k(So.$$.fragment),Zu=l(),wt=a("div"),k(Ro.$$.fragment),em=l(),Ja=a("p"),tm=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.`),om=l(),ms=a("div"),k(Bo.$$.fragment),ec=l(),Ke=a("h2"),yt=a("a"),Za=a("span"),k(Wo.$$.fragment),nm=l(),er=a("span"),sm=o("MarkupLMTokenizerFast"),tc=l(),C=a("div"),k(Uo.$$.fragment),am=l(),tr=a("p"),rm=o("Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE)."),im=l(),R=a("p"),fs=a("a"),lm=o("MarkupLMTokenizerFast"),dm=o(" can be used to turn HTML strings into to token-level "),or=a("code"),cm=o("input_ids"),pm=o(", "),nr=a("code"),hm=o("attention_mask"),um=o(`,
`),sr=a("code"),mm=o("token_type_ids"),fm=o(", "),ar=a("code"),gm=o("xpath_tags_seq"),_m=o(" and "),rr=a("code"),km=o("xpath_tags_seq"),vm=o(". This tokenizer inherits from "),gs=a("a"),bm=o("PreTrainedTokenizer"),Mm=o(` which
contains most of the main methods.`),wm=l(),ir=a("p"),ym=o("Users should refer to this superclass for more information regarding those methods."),xm=l(),B=a("div"),k(Ho.$$.fragment),Tm=l(),O=a("p"),Em=o("add_special_tokens ("),lr=a("code"),Lm=o("bool"),qm=o(", "),dr=a("em"),$m=o("optional"),Fm=o(", defaults to "),cr=a("code"),zm=o("True"),Cm=o(`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),pr=a("code"),jm=o("bool"),Pm=o(", "),hr=a("code"),Dm=o("str"),Om=o(" or "),_s=a("a"),Am=o("PaddingStrategy"),Im=o(", "),ur=a("em"),Nm=o("optional"),Sm=o(", defaults to "),mr=a("code"),Rm=o("False"),Bm=o(`):
Activates and controls padding. Accepts the following values:`),Wm=l(),Y=a("ul"),fr=a("li"),xt=a("p"),gr=a("code"),Um=o("True"),Hm=o(" or "),_r=a("code"),Vm=o("'longest'"),Qm=o(`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),Xm=l(),kr=a("li"),Tt=a("p"),vr=a("code"),Gm=o("'max_length'"),Km=o(": Pad to a maximum length specified with the argument "),br=a("code"),Ym=o("max_length"),Jm=o(` or to the maximum
acceptable input length for the model if that argument is not provided.`),Zm=l(),Mr=a("li"),W=a("p"),wr=a("code"),ef=o("False"),tf=o(" or "),yr=a("code"),of=o("'do_not_pad'"),nf=o(` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),xr=a("code"),sf=o("bool"),af=o(", "),Tr=a("code"),rf=o("str"),lf=o(" or "),ks=a("a"),df=o("TruncationStrategy"),cf=o(", "),Er=a("em"),pf=o("optional"),hf=o(", defaults to "),Lr=a("code"),uf=o("False"),mf=o(`):
Activates and controls truncation. Accepts the following values:`),ff=l(),qr=a("li"),Oe=a("p"),$r=a("code"),gf=o("True"),_f=o(" or "),Fr=a("code"),kf=o("'longest_first'"),vf=o(": Truncate to a maximum length specified with the argument "),zr=a("code"),bf=o("max_length"),Mf=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.`),wf=l(),Cr=a("li"),Et=a("p"),jr=a("code"),yf=o("'only_first'"),xf=o(": Truncate to a maximum length specified with the argument "),Pr=a("code"),Tf=o("max_length"),Ef=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.`),Lf=l(),Dr=a("li"),Lt=a("p"),Or=a("code"),qf=o("'only_second'"),$f=o(": Truncate to a maximum length specified with the argument "),Ar=a("code"),Ff=o("max_length"),zf=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.`),Cf=l(),Ir=a("li"),fe=a("p"),Nr=a("code"),jf=o("False"),Pf=o(" or "),Sr=a("code"),Df=o("'do_not_truncate'"),Of=o(` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Rr=a("code"),Af=o("int"),If=o(", "),Br=a("em"),Nf=o("optional"),Sf=o(`):
Controls the maximum length to use by one of the truncation/padding parameters.`),Rf=l(),E=a("p"),Bf=o("If left unset or set to "),Wr=a("code"),Wf=o("None"),Uf=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"),Hf=o("int"),Vf=o(", "),Hr=a("em"),Qf=o("optional"),Xf=o(`, defaults to 0):
If set to a number along with `),Vr=a("code"),Gf=o("max_length"),Kf=o(`, the overflowing tokens returned when
`),Qr=a("code"),Yf=o("return_overflowing_tokens=True"),Jf=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"),Zf=o("bool"),eg=o(", "),Gr=a("em"),tg=o("optional"),og=o(", defaults to "),Kr=a("code"),ng=o("False"),sg=o(`):
Whether or not the input is already pre-tokenized (e.g., split into words). If set to `),Yr=a("code"),ag=o("True"),rg=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"),ig=o("int"),lg=o(", "),Zr=a("em"),dg=o("optional"),cg=o(`):
If set will pad the sequence to a multiple of the provided value. Requires `),ei=a("code"),pg=o("padding"),hg=o(` to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
`),ti=a("code"),ug=o(">= 7.5"),mg=o(` (Volta).
return_tensors (`),oi=a("code"),fg=o("str"),gg=o(" or "),vs=a("a"),_g=o("TensorType"),kg=o(", "),ni=a("em"),vg=o("optional"),bg=o(`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),Mg=l(),Ye=a("ul"),qt=a("li"),si=a("code"),wg=o("'tf'"),yg=o(": Return TensorFlow "),ai=a("code"),xg=o("tf.constant"),Tg=o(" objects."),Eg=l(),$t=a("li"),ri=a("code"),Lg=o("'pt'"),qg=o(": Return PyTorch "),ii=a("code"),$g=o("torch.Tensor"),Fg=o(" objects."),zg=l(),Ft=a("li"),li=a("code"),Cg=o("'np'"),jg=o(": Return Numpy "),di=a("code"),Pg=o("np.ndarray"),Dg=o(" objects."),Og=l(),A=a("p"),Ag=o("add_special_tokens ("),ci=a("code"),Ig=o("bool"),Ng=o(", "),pi=a("em"),Sg=o("optional"),Rg=o(", defaults to "),hi=a("code"),Bg=o("True"),Wg=o(`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),ui=a("code"),Ug=o("bool"),Hg=o(", "),mi=a("code"),Vg=o("str"),Qg=o(" or "),bs=a("a"),Xg=o("PaddingStrategy"),Gg=o(", "),fi=a("em"),Kg=o("optional"),Yg=o(", defaults to "),gi=a("code"),Jg=o("False"),Zg=o(`):
Activates and controls padding. Accepts the following values:`),e_=l(),j=a("ul"),_i=a("li"),zt=a("p"),ki=a("code"),t_=o("True"),o_=o(" or "),vi=a("code"),n_=o("'longest'"),s_=o(`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),a_=l(),bi=a("li"),Ct=a("p"),Mi=a("code"),r_=o("'max_length'"),i_=o(": Pad to a maximum length specified with the argument "),wi=a("code"),l_=o("max_length"),d_=o(` or to the maximum
acceptable input length for the model if that argument is not provided.`),c_=l(),yi=a("li"),U=a("p"),xi=a("code"),p_=o("False"),h_=o(" or "),Ti=a("code"),u_=o("'do_not_pad'"),m_=o(` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),Ei=a("code"),f_=o("bool"),g_=o(", "),Li=a("code"),__=o("str"),k_=o(" or "),Ms=a("a"),v_=o("TruncationStrategy"),b_=o(", "),qi=a("em"),M_=o("optional"),w_=o(", defaults to "),$i=a("code"),y_=o("False"),x_=o(`):
Activates and controls truncation. Accepts the following values:`),T_=l(),Fi=a("li"),Ae=a("p"),zi=a("code"),E_=o("True"),L_=o(" or "),Ci=a("code"),q_=o("'longest_first'"),$_=o(": Truncate to a maximum length specified with the argument "),ji=a("code"),F_=o("max_length"),z_=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.`),C_=l(),Pi=a("li"),jt=a("p"),Di=a("code"),j_=o("'only_first'"),P_=o(": Truncate to a maximum length specified with the argument "),Oi=a("code"),D_=o("max_length"),O_=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.`),A_=l(),Ai=a("li"),Pt=a("p"),Ii=a("code"),I_=o("'only_second'"),N_=o(": Truncate to a maximum length specified with the argument "),Ni=a("code"),S_=o("max_length"),R_=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.`),B_=l(),Si=a("li"),L=a("p"),Ri=a("code"),W_=o("False"),U_=o(" or "),Bi=a("code"),H_=o("'do_not_truncate'"),V_=o(` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Wi=a("code"),Q_=o("int"),X_=o(", "),Ui=a("em"),G_=o("optional"),K_=o(`):
Controls the maximum length to use by one of the truncation/padding parameters. If left unset or set to
`),Hi=a("code"),Y_=o("None"),J_=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 (`),Vi=a("code"),Z_=o("int"),ek=o(", "),Qi=a("em"),tk=o("optional"),ok=o(`, defaults to 0):
If set to a number along with `),Xi=a("code"),nk=o("max_length"),sk=o(`, the overflowing tokens returned when
`),Gi=a("code"),ak=o("return_overflowing_tokens=True"),rk=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 (`),Ki=a("code"),ik=o("int"),lk=o(", "),Yi=a("em"),dk=o("optional"),ck=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 `),Ji=a("code"),pk=o(">= 7.5"),hk=o(` (Volta).
return_tensors (`),Zi=a("code"),uk=o("str"),mk=o(" or "),ws=a("a"),fk=o("TensorType"),gk=o(", "),el=a("em"),_k=o("optional"),kk=o(`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),vk=l(),tl=a("li"),Dt=a("p"),ol=a("code"),bk=o("'tf'"),Mk=o(": Return TensorFlow "),nl=a("code"),wk=o("tf.constant"),yk=o(" objects."),xk=l(),sl=a("li"),Ot=a("p"),al=a("code"),Tk=o("'pt'"),Ek=o(": Return PyTorch "),rl=a("code"),Lk=o("torch.Tensor"),qk=o(" objects."),$k=l(),il=a("li"),At=a("p"),ll=a("code"),Fk=o("'np'"),zk=o(": Return Numpy "),dl=a("code"),Ck=o("np.ndarray"),jk=o(" objects."),Pk=l(),Ie=a("div"),k(Vo.$$.fragment),Dk=l(),cl=a("p"),Ok=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:`),Ak=l(),Qo=a("ul"),ys=a("li"),Ik=o("single sequence: "),pl=a("code"),Nk=o("<s> X </s>"),Sk=l(),xs=a("li"),Rk=o("pair of sequences: "),hl=a("code"),Bk=o("<s> A </s></s> B </s>"),Wk=l(),It=a("div"),k(Xo.$$.fragment),Uk=l(),ul=a("p"),Hk=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.`),Vk=l(),Nt=a("div"),k(Go.$$.fragment),Qk=l(),Ko=a("p"),Xk=o(`Tokenize and prepare for the model a sequence or a pair of sequences. .. warning:: This method is deprecated,
`),ml=a("code"),Gk=o("__call__"),Kk=o(" should be used instead."),Yk=l(),St=a("div"),k(Yo.$$.fragment),Jk=l(),fl=a("p"),Zk=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.`),oc=l(),Je=a("h2"),Rt=a("a"),gl=a("span"),k(Jo.$$.fragment),ev=l(),_l=a("span"),tv=o("MarkupLMProcessor"),nc=l(),te=a("div"),k(Zo.$$.fragment),ov=l(),kl=a("p"),nv=o(`Constructs a MarkupLM processor which combines a MarkupLM feature extractor and a MarkupLM tokenizer into a single
processor.`),sv=l(),Ts=a("p"),Es=a("a"),av=o("MarkupLMProcessor"),rv=o(" offers all the functionalities you need to prepare data for the model."),iv=l(),I=a("p"),lv=o("It first uses "),Ls=a("a"),dv=o("MarkupLMFeatureExtractor"),cv=o(` to extract nodes and corresponding xpaths from one or more HTML strings.
Next, these are provided to `),qs=a("a"),pv=o("MarkupLMTokenizer"),hv=o(" or "),$s=a("a"),uv=o("MarkupLMTokenizerFast"),mv=o(`, which turns them into token-level
`),vl=a("code"),fv=o("input_ids"),gv=o(", "),bl=a("code"),_v=o("attention_mask"),kv=o(", "),Ml=a("code"),vv=o("token_type_ids"),bv=o(", "),wl=a("code"),Mv=o("xpath_tags_seq"),wv=o(" and "),yl=a("code"),yv=o("xpath_subs_seq"),xv=o("."),Tv=l(),ge=a("div"),k(en.$$.fragment),Ev=l(),oe=a("p"),Lv=o("This method first forwards the "),xl=a("code"),qv=o("html_strings"),$v=o(" argument to "),tn=a("a"),Tl=a("strong"),Fv=o("call"),zv=o("()"),Cv=o(`. Next, it
passes the `),El=a("code"),jv=o("nodes"),Pv=o(" and "),Ll=a("code"),Dv=o("xpaths"),Ov=o(" along with the additional arguments to "),ql=a("code"),Av=o("__call__()"),Iv=o(` and
returns the output.`),Nv=l(),on=a("p"),Sv=o("Optionally, one can also provide a "),$l=a("code"),Rv=o("text"),Bv=o(" argument which is passed along as first sequence."),Wv=l(),Fl=a("p"),Uv=o("Please refer to the docstring of the above two methods for more information."),sc=l(),Ze=a("h2"),Bt=a("a"),zl=a("span"),k(nn.$$.fragment),Hv=l(),Cl=a("span"),Vv=o("MarkupLMModel"),ac=l(),Ee=a("div"),k(sn.$$.fragment),Qv=l(),an=a("p"),Xv=o(`The bare MarkupLM Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),rn=a("a"),Gv=o("torch.nn.Module"),Kv=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.`),Yv=l(),_e=a("div"),k(ln.$$.fragment),Jv=l(),et=a("p"),Zv=o("The "),Fs=a("a"),eb=o("MarkupLMModel"),tb=o(" forward method, overrides the "),jl=a("code"),ob=o("__call__"),nb=o(" special method."),sb=l(),k(Wt.$$.fragment),ab=l(),k(Ut.$$.fragment),rc=l(),tt=a("h2"),Ht=a("a"),Pl=a("span"),k(dn.$$.fragment),rb=l(),Dl=a("span"),ib=o("MarkupLMForSequenceClassification"),ic=l(),he=a("div"),k(cn.$$.fragment),lb=l(),Ol=a("p"),db=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.`),cb=l(),pn=a("p"),pb=o("This model is a PyTorch "),hn=a("a"),hb=o("torch.nn.Module"),ub=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.`),mb=l(),ke=a("div"),k(un.$$.fragment),fb=l(),ot=a("p"),gb=o("The "),zs=a("a"),_b=o("MarkupLMForSequenceClassification"),kb=o(" forward method, overrides the "),Al=a("code"),vb=o("__call__"),bb=o(" special method."),Mb=l(),k(Vt.$$.fragment),wb=l(),k(Qt.$$.fragment),lc=l(),nt=a("h2"),Xt=a("a"),Il=a("span"),k(mn.$$.fragment),yb=l(),Nl=a("span"),xb=o("MarkupLMForTokenClassification"),dc=l(),Le=a("div"),k(fn.$$.fragment),Tb=l(),st=a("p"),Eb=o("MarkupLM Model with a "),Sl=a("code"),Lb=o("token_classification"),qb=o(` head on top.
This model is a PyTorch `),gn=a("a"),$b=o("torch.nn.Module"),Fb=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.`),zb=l(),ve=a("div"),k(_n.$$.fragment),Cb=l(),at=a("p"),jb=o("The "),Cs=a("a"),Pb=o("MarkupLMForTokenClassification"),Db=o(" forward method, overrides the "),Rl=a("code"),Ob=o("__call__"),Ab=o(" special method."),Ib=l(),k(Gt.$$.fragment),Nb=l(),k(Kt.$$.fragment),cc=l(),rt=a("h2"),Yt=a("a"),Bl=a("span"),k(kn.$$.fragment),Sb=l(),Wl=a("span"),Rb=o("MarkupLMForQuestionAnswering"),pc=l(),ue=a("div"),k(vn.$$.fragment),Bb=l(),it=a("p"),Wb=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 `),Ul=a("code"),Ub=o("span start logits"),Hb=o(" and "),Hl=a("code"),Vb=o("span end logits"),Qb=o(")."),Xb=l(),bn=a("p"),Gb=o("This model is a PyTorch "),Mn=a("a"),Kb=o("torch.nn.Module"),Yb=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.`),Jb=l(),be=a("div"),k(wn.$$.fragment),Zb=l(),lt=a("p"),eM=o("The "),js=a("a"),tM=o("MarkupLMForQuestionAnswering"),oM=o(" forward method, overrides the "),Vl=a("code"),nM=o("__call__"),sM=o(" special method."),aM=l(),k(Jt.$$.fragment),rM=l(),k(Zt.$$.fragment),this.h()},l(s){const p=Cx('[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 Ql=i(g);x=r(Ql,"SPAN",{});var Xl=i(x);v(h.$$.fragment,Xl),Xl.forEach(t),Ql.forEach(t),f=d(yn),G=r(yn,"SPAN",{});var Gl=i(G);Nc=n(Gl,"MarkupLM"),Gl.forEach(t),yn.forEach(t),md=d(s),Re=r(s,"H2",{class:!0});var xn=i(Re);ht=r(xn,"A",{id:!0,class:!0,href:!0});var Kl=i(ht);oa=r(Kl,"SPAN",{});var Yl=i(oa);v(co.$$.fragment,Yl),Yl.forEach(t),Kl.forEach(t),Sc=d(xn),na=r(xn,"SPAN",{});var Jl=i(na);Rc=n(Jl,"Overview"),Jl.forEach(t),xn.forEach(t),fd=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 Zl=i(po);Wc=n(Zl,`MarkupLM: Pre-training of Text and Markup Language for Visually-rich Document
Understanding`),Zl.forEach(t),Uc=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 _M=i(Ln);Hc=n(_M,"LayoutLM"),_M.forEach(t),Vc=n(dt,"."),dt.forEach(t),gd=d(s),qn=r(s,"P",{});var kM=i(qn);Qc=n(kM,`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:`),kM.forEach(t),_d=d(s),ut=r(s,"UL",{});var uc=i(ut);$n=r(uc,"LI",{});var iM=i($n);ho=r(iM,"A",{href:!0,rel:!0});var vM=i(ho);Xc=n(vM,"WebSRC"),vM.forEach(t),Gc=n(iM,", a dataset for Web-Based Structural Reading Comprehension (a bit like SQuAD but for web pages)"),iM.forEach(t),Kc=d(uc),Fn=r(uc,"LI",{});var lM=i(Fn);uo=r(lM,"A",{href:!0,rel:!0});var bM=i(uo);Yc=n(bM,"SWDE"),bM.forEach(t),Jc=n(lM,`, a dataset
for information extraction from web pages (basically named-entity recogntion on web pages)`),lM.forEach(t),uc.forEach(t),kd=d(s),zn=r(s,"P",{});var MM=i(zn);Zc=n(MM,"The abstract from the paper is the following:"),MM.forEach(t),vd=d(s),Cn=r(s,"P",{});var wM=i(Cn);sa=r(wM,"EM",{});var yM=i(sa);ep=n(yM,`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.`),yM.forEach(t),wM.forEach(t),bd=d(s),jn=r(s,"P",{});var xM=i(jn);tp=n(xM,"Tips:"),xM.forEach(t),Md=d(s),$e=r(s,"UL",{});var Ps=i($e);le=r(Ps,"LI",{});var Ne=i(le);op=n(Ne,"In addition to "),aa=r(Ne,"CODE",{});var TM=i(aa);np=n(TM,"input_ids"),TM.forEach(t),sp=n(Ne,", "),Pn=r(Ne,"A",{href:!0});var EM=i(Pn);ap=n(EM,"forward()"),EM.forEach(t),rp=n(Ne," expects 2 additional inputs, namely "),ra=r(Ne,"CODE",{});var LM=i(ra);ip=n(LM,"xpath_tags_seq"),LM.forEach(t),lp=n(Ne," and "),ia=r(Ne,"CODE",{});var qM=i(ia);dp=n(qM,"xpath_subs_seq"),qM.forEach(t),cp=n(Ne,`.
These are the XPATH tags and subscripts respectively for each token in the input sequence.`),Ne.forEach(t),pp=d(Ps),Be=r(Ps,"LI",{});var Ds=i(Be);hp=n(Ds,"One can use "),Dn=r(Ds,"A",{href:!0});var $M=i(Dn);up=n($M,"MarkupLMProcessor"),$M.forEach(t),mp=n(Ds," to prepare all data for the model. Refer to the "),On=r(Ds,"A",{href:!0});var FM=i(On);fp=n(FM,"usage guide"),FM.forEach(t),gp=n(Ds," for more info."),Ds.forEach(t),_p=d(Ps),mo=r(Ps,"LI",{});var mc=i(mo);kp=n(mc,"Demo notebooks can be found "),fo=r(mc,"A",{href:!0,rel:!0});var zM=i(fo);vp=n(zM,"here"),zM.forEach(t),bp=n(mc,"."),mc.forEach(t),Ps.forEach(t),wd=d(s),mt=r(s,"IMG",{src:!0,alt:!0,width:!0}),yd=d(s),go=r(s,"SMALL",{});var dM=i(go);Mp=n(dM,"MarkupLM architecture. Taken from the "),An=r(dM,"A",{href:!0});var CM=i(An);wp=n(CM,"original paper."),CM.forEach(t),dM.forEach(t),xd=d(s),Fe=r(s,"P",{});var Os=i(Fe);yp=n(Os,"This model was contributed by "),_o=r(Os,"A",{href:!0,rel:!0});var jM=i(_o);xp=n(jM,"nielsr"),jM.forEach(t),Tp=n(Os,". The original code can be found "),ko=r(Os,"A",{href:!0,rel:!0});var PM=i(ko);Ep=n(PM,"here"),PM.forEach(t),Lp=n(Os,"."),Os.forEach(t),Td=d(s),We=r(s,"H2",{class:!0});var fc=i(We);ft=r(fc,"A",{id:!0,class:!0,href:!0});var DM=i(ft);la=r(DM,"SPAN",{});var OM=i(la);v(vo.$$.fragment,OM),OM.forEach(t),DM.forEach(t),qp=d(fc),da=r(fc,"SPAN",{});var AM=i(da);$p=n(AM,"Usage: MarkupLMProcessor"),AM.forEach(t),fc.forEach(t),Ed=d(s),J=r(s,"P",{});var Me=i(J);Fp=n(Me,"The easiest way to prepare data for the model is to use "),In=r(Me,"A",{href:!0});var IM=i(In);zp=n(IM,"MarkupLMProcessor"),IM.forEach(t),Cp=n(Me,`, which internally combines a feature extractor
(`),Nn=r(Me,"A",{href:!0});var NM=i(Nn);jp=n(NM,"MarkupLMFeatureExtractor"),NM.forEach(t),Pp=n(Me,") and a tokenizer ("),Sn=r(Me,"A",{href:!0});var SM=i(Sn);Dp=n(SM,"MarkupLMTokenizer"),SM.forEach(t),Op=n(Me," or "),Rn=r(Me,"A",{href:!0});var RM=i(Rn);Ap=n(RM,"MarkupLMTokenizerFast"),RM.forEach(t),Ip=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 BM=i(ca);Np=n(BM,"input_ids"),BM.forEach(t),Sp=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),Ld=d(s),v(bo.$$.fragment,s),qd=d(s),F=r(s,"P",{});var D=i(F);Rp=n(D,"In short, one can provide HTML strings (and possibly additional data) to "),Bn=r(D,"A",{href:!0});var WM=i(Bn);Bp=n(WM,"MarkupLMProcessor"),WM.forEach(t),Wp=n(D,`,
and it will create the inputs expected by the model. Internally, the processor first uses
`),Wn=r(D,"A",{href:!0});var UM=i(Wn);Up=n(UM,"MarkupLMFeatureExtractor"),UM.forEach(t),Hp=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 HM=i(Un);Vp=n(HM,"MarkupLMTokenizer"),HM.forEach(t),Qp=n(D," or "),Hn=r(D,"A",{href:!0});var VM=i(Hn);Xp=n(VM,"MarkupLMTokenizerFast"),VM.forEach(t),Gp=n(D,`, which converts them
to token-level `),pa=r(D,"CODE",{});var QM=i(pa);Kp=n(QM,"input_ids"),QM.forEach(t),Yp=n(D,", "),ha=r(D,"CODE",{});var XM=i(ha);Jp=n(XM,"attention_mask"),XM.forEach(t),Zp=n(D,", "),ua=r(D,"CODE",{});var GM=i(ua);eh=n(GM,"token_type_ids"),GM.forEach(t),th=n(D,", "),ma=r(D,"CODE",{});var KM=i(ma);oh=n(KM,"xpath_subs_seq"),KM.forEach(t),nh=n(D,", "),fa=r(D,"CODE",{});var YM=i(fa);sh=n(YM,"xpath_tags_seq"),YM.forEach(t),ah=n(D,`.
Optionally, one can provide node labels to the processor, which are turned into token-level `),ga=r(D,"CODE",{});var JM=i(ga);rh=n(JM,"labels"),JM.forEach(t),ih=n(D,"."),D.forEach(t),$d=d(s),de=r(s,"P",{});var ct=i(de);Vn=r(ct,"A",{href:!0});var ZM=i(Vn);lh=n(ZM,"MarkupLMFeatureExtractor"),ZM.forEach(t),dh=n(ct," uses "),Mo=r(ct,"A",{href:!0,rel:!0});var e2=i(Mo);ch=n(e2,"Beautiful Soup"),e2.forEach(t),ph=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 t2=i(Qn);hh=n(t2,"MarkupLMTokenizer"),t2.forEach(t),uh=n(ct," or "),Xn=r(ct,"A",{href:!0});var o2=i(Xn);mh=n(o2,"MarkupLMTokenizerFast"),o2.forEach(t),fh=n(ct,"."),ct.forEach(t),Fd=d(s),Gn=r(s,"P",{});var n2=i(Gn);gh=n(n2,`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).`),n2.forEach(t),zd=d(s),Kn=r(s,"P",{});var s2=i(Kn);_a=r(s2,"STRONG",{});var a2=i(_a);_h=n(a2,"Use case 1: web page classification (training, inference) + token classification (inference), parse_html = True"),a2.forEach(t),s2.forEach(t),Cd=d(s),Yn=r(s,"P",{});var r2=i(Yn);kh=n(r2,"This is the simplest case, in which the processor will use the feature extractor to get all nodes and xpaths from the HTML."),r2.forEach(t),jd=d(s),v(wo.$$.fragment,s),Pd=d(s),Jn=r(s,"P",{});var i2=i(Jn);ka=r(i2,"STRONG",{});var l2=i(ka);vh=n(l2,"Use case 2: web page classification (training, inference) + token classification (inference), parse_html=False"),l2.forEach(t),i2.forEach(t),Dd=d(s),ze=r(s,"P",{});var As=i(ze);bh=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 d2=i(va);Mh=n(d2,"parse_html"),d2.forEach(t),wh=n(As," to "),ba=r(As,"CODE",{});var c2=i(ba);yh=n(c2,"False"),c2.forEach(t),xh=n(As,"."),As.forEach(t),Od=d(s),v(yo.$$.fragment,s),Ad=d(s),Zn=r(s,"P",{});var p2=i(Zn);Ma=r(p2,"STRONG",{});var h2=i(Ma);Th=n(h2,"Use case 3: token classification (training), parse_html=False"),h2.forEach(t),p2.forEach(t),Id=d(s),Z=r(s,"P",{});var we=i(Z);Eh=n(we,"For token classification tasks (such as "),xo=r(we,"A",{href:!0,rel:!0});var u2=i(xo);Lh=n(u2,"SWDE"),u2.forEach(t),qh=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 m2=i(wa);$h=n(m2,"labels"),m2.forEach(t),Fh=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 f2=i(ya);zh=n(f2,"ignore_index"),f2.forEach(t),Ch=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 g2=i(xa);jh=n(g2,"only_label_first_subword"),g2.forEach(t),Ph=n(we," set to "),Ta=r(we,"CODE",{});var _2=i(Ta);Dh=n(_2,"False"),_2.forEach(t),Oh=n(we,"."),we.forEach(t),Nd=d(s),v(To.$$.fragment,s),Sd=d(s),es=r(s,"P",{});var k2=i(es);Ea=r(k2,"STRONG",{});var v2=i(Ea);Ah=n(v2,"Use case 4: web page question answering (inference), parse_html=True"),v2.forEach(t),k2.forEach(t),Rd=d(s),ts=r(s,"P",{});var b2=i(ts);Ih=n(b2,`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].`),b2.forEach(t),Bd=d(s),v(Eo.$$.fragment,s),Wd=d(s),os=r(s,"P",{});var M2=i(os);La=r(M2,"STRONG",{});var w2=i(La);Nh=n(w2,"Use case 5: web page question answering (inference), parse_html=False"),w2.forEach(t),M2.forEach(t),Ud=d(s),Ce=r(s,"P",{});var Is=i(Ce);Sh=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 y2=i(qa);Rh=n(y2,"parse_html"),y2.forEach(t),Bh=n(Is," to "),$a=r(Is,"CODE",{});var x2=i($a);Wh=n(x2,"False"),x2.forEach(t),Uh=n(Is,"."),Is.forEach(t),Hd=d(s),v(Lo.$$.fragment,s),Vd=d(s),Ue=r(s,"H2",{class:!0});var gc=i(Ue);gt=r(gc,"A",{id:!0,class:!0,href:!0});var T2=i(gt);Fa=r(T2,"SPAN",{});var E2=i(Fa);v(qo.$$.fragment,E2),E2.forEach(t),T2.forEach(t),Hh=d(gc),za=r(gc,"SPAN",{});var L2=i(za);Vh=n(L2,"Documentation resources"),L2.forEach(t),gc.forEach(t),Qd=d(s),je=r(s,"UL",{});var Ns=i(je);Ca=r(Ns,"LI",{});var q2=i(Ca);ns=r(q2,"A",{href:!0});var $2=i(ns);Qh=n($2,"Text classification task guide"),$2.forEach(t),q2.forEach(t),Xh=d(Ns),ja=r(Ns,"LI",{});var F2=i(ja);ss=r(F2,"A",{href:!0});var z2=i(ss);Gh=n(z2,"Token classification task guide"),z2.forEach(t),F2.forEach(t),Kh=d(Ns),Pa=r(Ns,"LI",{});var C2=i(Pa);as=r(C2,"A",{href:!0});var j2=i(as);Yh=n(j2,"Question answering task guide"),j2.forEach(t),C2.forEach(t),Ns.forEach(t),Xd=d(s),He=r(s,"H2",{class:!0});var _c=i(He);_t=r(_c,"A",{id:!0,class:!0,href:!0});var P2=i(_t);Da=r(P2,"SPAN",{});var D2=i(Da);v($o.$$.fragment,D2),D2.forEach(t),P2.forEach(t),Jh=d(_c),Oa=r(_c,"SPAN",{});var O2=i(Oa);Zh=n(O2,"MarkupLMConfig"),O2.forEach(t),_c.forEach(t),Gd=d(s),ce=r(s,"DIV",{class:!0});var eo=i(ce);v(Fo.$$.fragment,eo),eu=d(eo),Ve=r(eo,"P",{});var Ss=i(Ve);tu=n(Ss,"This is the configuration class to store the configuration of a "),rs=r(Ss,"A",{href:!0});var A2=i(rs);ou=n(A2,"MarkupLMModel"),A2.forEach(t),nu=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 I2=i(zo);su=n(I2,"microsoft/markuplm-base"),I2.forEach(t),au=n(Ss," architecture."),Ss.forEach(t),ru=d(eo),Qe=r(eo,"P",{});var Rs=i(Qe);iu=n(Rs,"Configuration objects inherit from "),is=r(Rs,"A",{href:!0});var N2=i(is);lu=n(N2,"BertConfig"),N2.forEach(t),du=n(Rs,` and can be used to control the model outputs. Read the
documentation from `),ls=r(Rs,"A",{href:!0});var S2=i(ls);cu=n(S2,"BertConfig"),S2.forEach(t),pu=n(Rs," for more information."),Rs.forEach(t),hu=d(eo),v(kt.$$.fragment,eo),eo.forEach(t),Kd=d(s),Xe=r(s,"H2",{class:!0});var kc=i(Xe);vt=r(kc,"A",{id:!0,class:!0,href:!0});var R2=i(vt);Aa=r(R2,"SPAN",{});var B2=i(Aa);v(Co.$$.fragment,B2),B2.forEach(t),R2.forEach(t),uu=d(kc),Ia=r(kc,"SPAN",{});var W2=i(Ia);mu=n(W2,"MarkupLMFeatureExtractor"),W2.forEach(t),kc.forEach(t),Yd=d(s),pe=r(s,"DIV",{class:!0});var to=i(pe);v(jo.$$.fragment,to),fu=d(to),Na=r(to,"P",{});var U2=i(Na);gu=n(U2,`Constructs a MarkupLM feature extractor. This can be used to get a list of nodes and corresponding xpaths from HTML
strings.`),U2.forEach(t),_u=d(to),Po=r(to,"P",{});var vc=i(Po);ku=n(vc,"This feature extractor inherits from "),Sa=r(vc,"CODE",{});var H2=i(Sa);vu=n(H2,"PreTrainedFeatureExtractor()"),H2.forEach(t),bu=n(vc,` which contains most
of the main methods. Users should refer to this superclass for more information regarding those methods.`),vc.forEach(t),Mu=d(to),Pe=r(to,"DIV",{class:!0});var Bs=i(Pe);v(Do.$$.fragment,Bs),wu=d(Bs),Ra=r(Bs,"P",{});var V2=i(Ra);yu=n(V2,"Main method to prepare for the model one or several HTML strings."),V2.forEach(t),xu=d(Bs),v(bt.$$.fragment,Bs),Bs.forEach(t),to.forEach(t),Jd=d(s),Ge=r(s,"H2",{class:!0});var bc=i(Ge);Mt=r(bc,"A",{id:!0,class:!0,href:!0});var Q2=i(Mt);Ba=r(Q2,"SPAN",{});var X2=i(Ba);v(Oo.$$.fragment,X2),X2.forEach(t),Q2.forEach(t),Tu=d(bc),Wa=r(bc,"SPAN",{});var G2=i(Wa);Eu=n(G2,"MarkupLMTokenizer"),G2.forEach(t),bc.forEach(t),Zd=d(s),K=r(s,"DIV",{class:!0});var ye=i(K);v(Ao.$$.fragment,ye),Lu=d(ye),S=r(ye,"P",{});var ee=i(S);qu=n(ee,"Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE). "),ds=r(ee,"A",{href:!0});var K2=i(ds);$u=n(K2,"MarkupLMTokenizer"),K2.forEach(t),Fu=n(ee,` can be used to
turn HTML strings into to token-level `),Ua=r(ee,"CODE",{});var Y2=i(Ua);zu=n(Y2,"input_ids"),Y2.forEach(t),Cu=n(ee,", "),Ha=r(ee,"CODE",{});var J2=i(Ha);ju=n(J2,"attention_mask"),J2.forEach(t),Pu=n(ee,", "),Va=r(ee,"CODE",{});var Z2=i(Va);Du=n(Z2,"token_type_ids"),Z2.forEach(t),Ou=n(ee,", "),Qa=r(ee,"CODE",{});var e1=i(Qa);Au=n(e1,"xpath_tags_seq"),e1.forEach(t),Iu=n(ee,` and
`),Xa=r(ee,"CODE",{});var t1=i(Xa);Nu=n(t1,"xpath_tags_seq"),t1.forEach(t),Su=n(ee,". This tokenizer inherits from "),cs=r(ee,"A",{href:!0});var o1=i(cs);Ru=n(o1,"PreTrainedTokenizer"),o1.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),Wu=d(ye),De=r(ye,"DIV",{class:!0});var Ws=i(De);v(Io.$$.fragment,Ws),Uu=d(Ws),Ga=r(Ws,"P",{});var n1=i(Ga);Hu=n(n1,`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:`),n1.forEach(t),Vu=d(Ws),No=r(Ws,"UL",{});var Mc=i(No);ps=r(Mc,"LI",{});var cM=i(ps);Qu=n(cM,"single sequence: "),Ka=r(cM,"CODE",{});var s1=i(Ka);Xu=n(s1,"<s> X </s>"),s1.forEach(t),cM.forEach(t),Gu=d(Mc),hs=r(Mc,"LI",{});var pM=i(hs);Ku=n(pM,"pair of sequences: "),Ya=r(pM,"CODE",{});var a1=i(Ya);Yu=n(a1,"<s> A </s></s> B </s>"),a1.forEach(t),pM.forEach(t),Mc.forEach(t),Ws.forEach(t),Ju=d(ye),us=r(ye,"DIV",{class:!0});var r1=i(us);v(So.$$.fragment,r1),r1.forEach(t),Zu=d(ye),wt=r(ye,"DIV",{class:!0});var wc=i(wt);v(Ro.$$.fragment,wc),em=d(wc),Ja=r(wc,"P",{});var i1=i(Ja);tm=n(i1,`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.`),i1.forEach(t),wc.forEach(t),om=d(ye),ms=r(ye,"DIV",{class:!0});var l1=i(ms);v(Bo.$$.fragment,l1),l1.forEach(t),ye.forEach(t),ec=d(s),Ke=r(s,"H2",{class:!0});var yc=i(Ke);yt=r(yc,"A",{id:!0,class:!0,href:!0});var d1=i(yt);Za=r(d1,"SPAN",{});var c1=i(Za);v(Wo.$$.fragment,c1),c1.forEach(t),d1.forEach(t),nm=d(yc),er=r(yc,"SPAN",{});var p1=i(er);sm=n(p1,"MarkupLMTokenizerFast"),p1.forEach(t),yc.forEach(t),tc=d(s),C=r(s,"DIV",{class:!0});var H=i(C);v(Uo.$$.fragment,H),am=d(H),tr=r(H,"P",{});var h1=i(tr);rm=n(h1,"Construct a MarkupLM tokenizer. Based on byte-level Byte-Pair-Encoding (BPE)."),h1.forEach(t),im=d(H),R=r(H,"P",{});var ne=i(R);fs=r(ne,"A",{href:!0});var u1=i(fs);lm=n(u1,"MarkupLMTokenizerFast"),u1.forEach(t),dm=n(ne," can be used to turn HTML strings into to token-level "),or=r(ne,"CODE",{});var m1=i(or);cm=n(m1,"input_ids"),m1.forEach(t),pm=n(ne,", "),nr=r(ne,"CODE",{});var f1=i(nr);hm=n(f1,"attention_mask"),f1.forEach(t),um=n(ne,`,
`),sr=r(ne,"CODE",{});var g1=i(sr);mm=n(g1,"token_type_ids"),g1.forEach(t),fm=n(ne,", "),ar=r(ne,"CODE",{});var _1=i(ar);gm=n(_1,"xpath_tags_seq"),_1.forEach(t),_m=n(ne," and "),rr=r(ne,"CODE",{});var k1=i(rr);km=n(k1,"xpath_tags_seq"),k1.forEach(t),vm=n(ne,". This tokenizer inherits from "),gs=r(ne,"A",{href:!0});var v1=i(gs);bm=n(v1,"PreTrainedTokenizer"),v1.forEach(t),Mm=n(ne,` which
contains most of the main methods.`),ne.forEach(t),wm=d(H),ir=r(H,"P",{});var b1=i(ir);ym=n(b1,"Users should refer to this superclass for more information regarding those methods."),b1.forEach(t),xm=d(H),B=r(H,"DIV",{class:!0});var re=i(B);v(Ho.$$.fragment,re),Tm=d(re),O=r(re,"P",{});var V=i(O);Em=n(V,"add_special_tokens ("),lr=r(V,"CODE",{});var M1=i(lr);Lm=n(M1,"bool"),M1.forEach(t),qm=n(V,", "),dr=r(V,"EM",{});var w1=i(dr);$m=n(w1,"optional"),w1.forEach(t),Fm=n(V,", defaults to "),cr=r(V,"CODE",{});var y1=i(cr);zm=n(y1,"True"),y1.forEach(t),Cm=n(V,`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),pr=r(V,"CODE",{});var x1=i(pr);jm=n(x1,"bool"),x1.forEach(t),Pm=n(V,", "),hr=r(V,"CODE",{});var T1=i(hr);Dm=n(T1,"str"),T1.forEach(t),Om=n(V," or "),_s=r(V,"A",{href:!0});var E1=i(_s);Am=n(E1,"PaddingStrategy"),E1.forEach(t),Im=n(V,", "),ur=r(V,"EM",{});var L1=i(ur);Nm=n(L1,"optional"),L1.forEach(t),Sm=n(V,", defaults to "),mr=r(V,"CODE",{});var q1=i(mr);Rm=n(q1,"False"),q1.forEach(t),Bm=n(V,`):
Activates and controls padding. Accepts the following values:`),V.forEach(t),Wm=d(re),Y=r(re,"UL",{});var ie=i(Y);fr=r(ie,"LI",{});var $1=i(fr);xt=r($1,"P",{});var ed=i(xt);gr=r(ed,"CODE",{});var F1=i(gr);Um=n(F1,"True"),F1.forEach(t),Hm=n(ed," or "),_r=r(ed,"CODE",{});var z1=i(_r);Vm=n(z1,"'longest'"),z1.forEach(t),Qm=n(ed,`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),ed.forEach(t),$1.forEach(t),Xm=d(ie),kr=r(ie,"LI",{});var C1=i(kr);Tt=r(C1,"P",{});var td=i(Tt);vr=r(td,"CODE",{});var j1=i(vr);Gm=n(j1,"'max_length'"),j1.forEach(t),Km=n(td,": Pad to a maximum length specified with the argument "),br=r(td,"CODE",{});var P1=i(br);Ym=n(P1,"max_length"),P1.forEach(t),Jm=n(td,` or to the maximum
acceptable input length for the model if that argument is not provided.`),td.forEach(t),C1.forEach(t),Zm=d(ie),Mr=r(ie,"LI",{});var D1=i(Mr);W=r(D1,"P",{});var se=i(W);wr=r(se,"CODE",{});var O1=i(wr);ef=n(O1,"False"),O1.forEach(t),tf=n(se," or "),yr=r(se,"CODE",{});var A1=i(yr);of=n(A1,"'do_not_pad'"),A1.forEach(t),nf=n(se,` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),xr=r(se,"CODE",{});var I1=i(xr);sf=n(I1,"bool"),I1.forEach(t),af=n(se,", "),Tr=r(se,"CODE",{});var N1=i(Tr);rf=n(N1,"str"),N1.forEach(t),lf=n(se," or "),ks=r(se,"A",{href:!0});var S1=i(ks);df=n(S1,"TruncationStrategy"),S1.forEach(t),cf=n(se,", "),Er=r(se,"EM",{});var R1=i(Er);pf=n(R1,"optional"),R1.forEach(t),hf=n(se,", defaults to "),Lr=r(se,"CODE",{});var B1=i(Lr);uf=n(B1,"False"),B1.forEach(t),mf=n(se,`):
Activates and controls truncation. Accepts the following values:`),se.forEach(t),D1.forEach(t),ff=d(ie),qr=r(ie,"LI",{});var W1=i(qr);Oe=r(W1,"P",{});var Tn=i(Oe);$r=r(Tn,"CODE",{});var U1=i($r);gf=n(U1,"True"),U1.forEach(t),_f=n(Tn," or "),Fr=r(Tn,"CODE",{});var H1=i(Fr);kf=n(H1,"'longest_first'"),H1.forEach(t),vf=n(Tn,": Truncate to a maximum length specified with the argument "),zr=r(Tn,"CODE",{});var V1=i(zr);bf=n(V1,"max_length"),V1.forEach(t),Mf=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),W1.forEach(t),wf=d(ie),Cr=r(ie,"LI",{});var Q1=i(Cr);Et=r(Q1,"P",{});var od=i(Et);jr=r(od,"CODE",{});var X1=i(jr);yf=n(X1,"'only_first'"),X1.forEach(t),xf=n(od,": Truncate to a maximum length specified with the argument "),Pr=r(od,"CODE",{});var G1=i(Pr);Tf=n(G1,"max_length"),G1.forEach(t),Ef=n(od,` 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.`),od.forEach(t),Q1.forEach(t),Lf=d(ie),Dr=r(ie,"LI",{});var K1=i(Dr);Lt=r(K1,"P",{});var nd=i(Lt);Or=r(nd,"CODE",{});var Y1=i(Or);qf=n(Y1,"'only_second'"),Y1.forEach(t),$f=n(nd,": Truncate to a maximum length specified with the argument "),Ar=r(nd,"CODE",{});var J1=i(Ar);Ff=n(J1,"max_length"),J1.forEach(t),zf=n(nd,` 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.`),nd.forEach(t),K1.forEach(t),Cf=d(ie),Ir=r(ie,"LI",{});var Z1=i(Ir);fe=r(Z1,"P",{});var pt=i(fe);Nr=r(pt,"CODE",{});var ew=i(Nr);jf=n(ew,"False"),ew.forEach(t),Pf=n(pt," or "),Sr=r(pt,"CODE",{});var tw=i(Sr);Df=n(tw,"'do_not_truncate'"),tw.forEach(t),Of=n(pt,` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Rr=r(pt,"CODE",{});var ow=i(Rr);Af=n(ow,"int"),ow.forEach(t),If=n(pt,", "),Br=r(pt,"EM",{});var nw=i(Br);Nf=n(nw,"optional"),nw.forEach(t),Sf=n(pt,`):
Controls the maximum length to use by one of the truncation/padding parameters.`),pt.forEach(t),Z1.forEach(t),ie.forEach(t),Rf=d(re),E=r(re,"P",{});var q=i(E);Bf=n(q,"If left unset or set to "),Wr=r(q,"CODE",{});var sw=i(Wr);Wf=n(sw,"None"),sw.forEach(t),Uf=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 aw=i(Ur);Hf=n(aw,"int"),aw.forEach(t),Vf=n(q,", "),Hr=r(q,"EM",{});var rw=i(Hr);Qf=n(rw,"optional"),rw.forEach(t),Xf=n(q,`, defaults to 0):
If set to a number along with `),Vr=r(q,"CODE",{});var iw=i(Vr);Gf=n(iw,"max_length"),iw.forEach(t),Kf=n(q,`, the overflowing tokens returned when
`),Qr=r(q,"CODE",{});var lw=i(Qr);Yf=n(lw,"return_overflowing_tokens=True"),lw.forEach(t),Jf=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 dw=i(Xr);Zf=n(dw,"bool"),dw.forEach(t),eg=n(q,", "),Gr=r(q,"EM",{});var cw=i(Gr);tg=n(cw,"optional"),cw.forEach(t),og=n(q,", defaults to "),Kr=r(q,"CODE",{});var pw=i(Kr);ng=n(pw,"False"),pw.forEach(t),sg=n(q,`):
Whether or not the input is already pre-tokenized (e.g., split into words). If set to `),Yr=r(q,"CODE",{});var hw=i(Yr);ag=n(hw,"True"),hw.forEach(t),rg=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 uw=i(Jr);ig=n(uw,"int"),uw.forEach(t),lg=n(q,", "),Zr=r(q,"EM",{});var mw=i(Zr);dg=n(mw,"optional"),mw.forEach(t),cg=n(q,`):
If set will pad the sequence to a multiple of the provided value. Requires `),ei=r(q,"CODE",{});var fw=i(ei);pg=n(fw,"padding"),fw.forEach(t),hg=n(q,` to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
`),ti=r(q,"CODE",{});var gw=i(ti);ug=n(gw,">= 7.5"),gw.forEach(t),mg=n(q,` (Volta).
return_tensors (`),oi=r(q,"CODE",{});var _w=i(oi);fg=n(_w,"str"),_w.forEach(t),gg=n(q," or "),vs=r(q,"A",{href:!0});var kw=i(vs);_g=n(kw,"TensorType"),kw.forEach(t),kg=n(q,", "),ni=r(q,"EM",{});var vw=i(ni);vg=n(vw,"optional"),vw.forEach(t),bg=n(q,`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),q.forEach(t),Mg=d(re),Ye=r(re,"UL",{});var Us=i(Ye);qt=r(Us,"LI",{});var sd=i(qt);si=r(sd,"CODE",{});var bw=i(si);wg=n(bw,"'tf'"),bw.forEach(t),yg=n(sd,": Return TensorFlow "),ai=r(sd,"CODE",{});var Mw=i(ai);xg=n(Mw,"tf.constant"),Mw.forEach(t),Tg=n(sd," objects."),sd.forEach(t),Eg=d(Us),$t=r(Us,"LI",{});var ad=i($t);ri=r(ad,"CODE",{});var ww=i(ri);Lg=n(ww,"'pt'"),ww.forEach(t),qg=n(ad,": Return PyTorch "),ii=r(ad,"CODE",{});var yw=i(ii);$g=n(yw,"torch.Tensor"),yw.forEach(t),Fg=n(ad," objects."),ad.forEach(t),zg=d(Us),Ft=r(Us,"LI",{});var rd=i(Ft);li=r(rd,"CODE",{});var xw=i(li);Cg=n(xw,"'np'"),xw.forEach(t),jg=n(rd,": Return Numpy "),di=r(rd,"CODE",{});var Tw=i(di);Pg=n(Tw,"np.ndarray"),Tw.forEach(t),Dg=n(rd," objects."),rd.forEach(t),Us.forEach(t),Og=d(re),A=r(re,"P",{});var Q=i(A);Ag=n(Q,"add_special_tokens ("),ci=r(Q,"CODE",{});var Ew=i(ci);Ig=n(Ew,"bool"),Ew.forEach(t),Ng=n(Q,", "),pi=r(Q,"EM",{});var Lw=i(pi);Sg=n(Lw,"optional"),Lw.forEach(t),Rg=n(Q,", defaults to "),hi=r(Q,"CODE",{});var qw=i(hi);Bg=n(qw,"True"),qw.forEach(t),Wg=n(Q,`):
Whether or not to encode the sequences with the special tokens relative to their model.
padding (`),ui=r(Q,"CODE",{});var $w=i(ui);Ug=n($w,"bool"),$w.forEach(t),Hg=n(Q,", "),mi=r(Q,"CODE",{});var Fw=i(mi);Vg=n(Fw,"str"),Fw.forEach(t),Qg=n(Q," or "),bs=r(Q,"A",{href:!0});var zw=i(bs);Xg=n(zw,"PaddingStrategy"),zw.forEach(t),Gg=n(Q,", "),fi=r(Q,"EM",{});var Cw=i(fi);Kg=n(Cw,"optional"),Cw.forEach(t),Yg=n(Q,", defaults to "),gi=r(Q,"CODE",{});var jw=i(gi);Jg=n(jw,"False"),jw.forEach(t),Zg=n(Q,`):
Activates and controls padding. Accepts the following values:`),Q.forEach(t),e_=d(re),j=r(re,"UL",{});var N=i(j);_i=r(N,"LI",{});var Pw=i(_i);zt=r(Pw,"P",{});var id=i(zt);ki=r(id,"CODE",{});var Dw=i(ki);t_=n(Dw,"True"),Dw.forEach(t),o_=n(id," or "),vi=r(id,"CODE",{});var Ow=i(vi);n_=n(Ow,"'longest'"),Ow.forEach(t),s_=n(id,`: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).`),id.forEach(t),Pw.forEach(t),a_=d(N),bi=r(N,"LI",{});var Aw=i(bi);Ct=r(Aw,"P",{});var ld=i(Ct);Mi=r(ld,"CODE",{});var Iw=i(Mi);r_=n(Iw,"'max_length'"),Iw.forEach(t),i_=n(ld,": Pad to a maximum length specified with the argument "),wi=r(ld,"CODE",{});var Nw=i(wi);l_=n(Nw,"max_length"),Nw.forEach(t),d_=n(ld,` or to the maximum
acceptable input length for the model if that argument is not provided.`),ld.forEach(t),Aw.forEach(t),c_=d(N),yi=r(N,"LI",{});var Sw=i(yi);U=r(Sw,"P",{});var ae=i(U);xi=r(ae,"CODE",{});var Rw=i(xi);p_=n(Rw,"False"),Rw.forEach(t),h_=n(ae," or "),Ti=r(ae,"CODE",{});var Bw=i(Ti);u_=n(Bw,"'do_not_pad'"),Bw.forEach(t),m_=n(ae,` (default): No padding (i.e., can output a batch with sequences of different
lengths).
truncation (`),Ei=r(ae,"CODE",{});var Ww=i(Ei);f_=n(Ww,"bool"),Ww.forEach(t),g_=n(ae,", "),Li=r(ae,"CODE",{});var Uw=i(Li);__=n(Uw,"str"),Uw.forEach(t),k_=n(ae," or "),Ms=r(ae,"A",{href:!0});var Hw=i(Ms);v_=n(Hw,"TruncationStrategy"),Hw.forEach(t),b_=n(ae,", "),qi=r(ae,"EM",{});var Vw=i(qi);M_=n(Vw,"optional"),Vw.forEach(t),w_=n(ae,", defaults to "),$i=r(ae,"CODE",{});var Qw=i($i);y_=n(Qw,"False"),Qw.forEach(t),x_=n(ae,`):
Activates and controls truncation. Accepts the following values:`),ae.forEach(t),Sw.forEach(t),T_=d(N),Fi=r(N,"LI",{});var Xw=i(Fi);Ae=r(Xw,"P",{});var En=i(Ae);zi=r(En,"CODE",{});var Gw=i(zi);E_=n(Gw,"True"),Gw.forEach(t),L_=n(En," or "),Ci=r(En,"CODE",{});var Kw=i(Ci);q_=n(Kw,"'longest_first'"),Kw.forEach(t),$_=n(En,": Truncate to a maximum length specified with the argument "),ji=r(En,"CODE",{});var Yw=i(ji);F_=n(Yw,"max_length"),Yw.forEach(t),z_=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),Xw.forEach(t),C_=d(N),Pi=r(N,"LI",{});var Jw=i(Pi);jt=r(Jw,"P",{});var dd=i(jt);Di=r(dd,"CODE",{});var Zw=i(Di);j_=n(Zw,"'only_first'"),Zw.forEach(t),P_=n(dd,": Truncate to a maximum length specified with the argument "),Oi=r(dd,"CODE",{});var ey=i(Oi);D_=n(ey,"max_length"),ey.forEach(t),O_=n(dd,` 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.`),dd.forEach(t),Jw.forEach(t),A_=d(N),Ai=r(N,"LI",{});var ty=i(Ai);Pt=r(ty,"P",{});var cd=i(Pt);Ii=r(cd,"CODE",{});var oy=i(Ii);I_=n(oy,"'only_second'"),oy.forEach(t),N_=n(cd,": Truncate to a maximum length specified with the argument "),Ni=r(cd,"CODE",{});var ny=i(Ni);S_=n(ny,"max_length"),ny.forEach(t),R_=n(cd,` 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.`),cd.forEach(t),ty.forEach(t),B_=d(N),Si=r(N,"LI",{});var sy=i(Si);L=r(sy,"P",{});var $=i(L);Ri=r($,"CODE",{});var ay=i(Ri);W_=n(ay,"False"),ay.forEach(t),U_=n($," or "),Bi=r($,"CODE",{});var ry=i(Bi);H_=n(ry,"'do_not_truncate'"),ry.forEach(t),V_=n($,` (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).
max_length (`),Wi=r($,"CODE",{});var iy=i(Wi);Q_=n(iy,"int"),iy.forEach(t),X_=n($,", "),Ui=r($,"EM",{});var ly=i(Ui);G_=n(ly,"optional"),ly.forEach(t),K_=n($,`):
Controls the maximum length to use by one of the truncation/padding parameters. If left unset or set to
`),Hi=r($,"CODE",{});var dy=i(Hi);Y_=n(dy,"None"),dy.forEach(t),J_=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 (`),Vi=r($,"CODE",{});var cy=i(Vi);Z_=n(cy,"int"),cy.forEach(t),ek=n($,", "),Qi=r($,"EM",{});var py=i(Qi);tk=n(py,"optional"),py.forEach(t),ok=n($,`, defaults to 0):
If set to a number along with `),Xi=r($,"CODE",{});var hy=i(Xi);nk=n(hy,"max_length"),hy.forEach(t),sk=n($,`, the overflowing tokens returned when
`),Gi=r($,"CODE",{});var uy=i(Gi);ak=n(uy,"return_overflowing_tokens=True"),uy.forEach(t),rk=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 (`),Ki=r($,"CODE",{});var my=i(Ki);ik=n(my,"int"),my.forEach(t),lk=n($,", "),Yi=r($,"EM",{});var fy=i(Yi);dk=n(fy,"optional"),fy.forEach(t),ck=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 `),Ji=r($,"CODE",{});var gy=i(Ji);pk=n(gy,">= 7.5"),gy.forEach(t),hk=n($,` (Volta).
return_tensors (`),Zi=r($,"CODE",{});var _y=i(Zi);uk=n(_y,"str"),_y.forEach(t),mk=n($," or "),ws=r($,"A",{href:!0});var ky=i(ws);fk=n(ky,"TensorType"),ky.forEach(t),gk=n($,", "),el=r($,"EM",{});var vy=i(el);_k=n(vy,"optional"),vy.forEach(t),kk=n($,`):
If set, will return tensors instead of list of python integers. Acceptable values are:`),$.forEach(t),sy.forEach(t),vk=d(N),tl=r(N,"LI",{});var by=i(tl);Dt=r(by,"P",{});var pd=i(Dt);ol=r(pd,"CODE",{});var My=i(ol);bk=n(My,"'tf'"),My.forEach(t),Mk=n(pd,": Return TensorFlow "),nl=r(pd,"CODE",{});var wy=i(nl);wk=n(wy,"tf.constant"),wy.forEach(t),yk=n(pd," objects."),pd.forEach(t),by.forEach(t),xk=d(N),sl=r(N,"LI",{});var yy=i(sl);Ot=r(yy,"P",{});var hd=i(Ot);al=r(hd,"CODE",{});var xy=i(al);Tk=n(xy,"'pt'"),xy.forEach(t),Ek=n(hd,": Return PyTorch "),rl=r(hd,"CODE",{});var Ty=i(rl);Lk=n(Ty,"torch.Tensor"),Ty.forEach(t),qk=n(hd," objects."),hd.forEach(t),yy.forEach(t),$k=d(N),il=r(N,"LI",{});var Ey=i(il);At=r(Ey,"P",{});var ud=i(At);ll=r(ud,"CODE",{});var Ly=i(ll);Fk=n(Ly,"'np'"),Ly.forEach(t),zk=n(ud,": Return Numpy "),dl=r(ud,"CODE",{});var qy=i(dl);Ck=n(qy,"np.ndarray"),qy.forEach(t),jk=n(ud," objects."),ud.forEach(t),Ey.forEach(t),N.forEach(t),re.forEach(t),Pk=d(H),Ie=r(H,"DIV",{class:!0});var Hs=i(Ie);v(Vo.$$.fragment,Hs),Dk=d(Hs),cl=r(Hs,"P",{});var $y=i(cl);Ok=n($y,`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:`),$y.forEach(t),Ak=d(Hs),Qo=r(Hs,"UL",{});var xc=i(Qo);ys=r(xc,"LI",{});var hM=i(ys);Ik=n(hM,"single sequence: "),pl=r(hM,"CODE",{});var Fy=i(pl);Nk=n(Fy,"<s> X </s>"),Fy.forEach(t),hM.forEach(t),Sk=d(xc),xs=r(xc,"LI",{});var uM=i(xs);Rk=n(uM,"pair of sequences: "),hl=r(uM,"CODE",{});var zy=i(hl);Bk=n(zy,"<s> A </s></s> B </s>"),zy.forEach(t),uM.forEach(t),xc.forEach(t),Hs.forEach(t),Wk=d(H),It=r(H,"DIV",{class:!0});var Tc=i(It);v(Xo.$$.fragment,Tc),Uk=d(Tc),ul=r(Tc,"P",{});var Cy=i(ul);Hk=n(Cy,`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.`),Cy.forEach(t),Tc.forEach(t),Vk=d(H),Nt=r(H,"DIV",{class:!0});var Ec=i(Nt);v(Go.$$.fragment,Ec),Qk=d(Ec),Ko=r(Ec,"P",{});var Lc=i(Ko);Xk=n(Lc,`Tokenize and prepare for the model a sequence or a pair of sequences. .. warning:: This method is deprecated,
`),ml=r(Lc,"CODE",{});var jy=i(ml);Gk=n(jy,"__call__"),jy.forEach(t),Kk=n(Lc," should be used instead."),Lc.forEach(t),Ec.forEach(t),Yk=d(H),St=r(H,"DIV",{class:!0});var qc=i(St);v(Yo.$$.fragment,qc),Jk=d(qc),fl=r(qc,"P",{});var Py=i(fl);Zk=n(Py,`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.`),Py.forEach(t),qc.forEach(t),H.forEach(t),oc=d(s),Je=r(s,"H2",{class:!0});var $c=i(Je);Rt=r($c,"A",{id:!0,class:!0,href:!0});var Dy=i(Rt);gl=r(Dy,"SPAN",{});var Oy=i(gl);v(Jo.$$.fragment,Oy),Oy.forEach(t),Dy.forEach(t),ev=d($c),_l=r($c,"SPAN",{});var Ay=i(_l);tv=n(Ay,"MarkupLMProcessor"),Ay.forEach(t),$c.forEach(t),nc=d(s),te=r(s,"DIV",{class:!0});var Se=i(te);v(Zo.$$.fragment,Se),ov=d(Se),kl=r(Se,"P",{});var Iy=i(kl);nv=n(Iy,`Constructs a MarkupLM processor which combines a MarkupLM feature extractor and a MarkupLM tokenizer into a single
processor.`),Iy.forEach(t),sv=d(Se),Ts=r(Se,"P",{});var mM=i(Ts);Es=r(mM,"A",{href:!0});var Ny=i(Es);av=n(Ny,"MarkupLMProcessor"),Ny.forEach(t),rv=n(mM," offers all the functionalities you need to prepare data for the model."),mM.forEach(t),iv=d(Se),I=r(Se,"P",{});var X=i(I);lv=n(X,"It first uses "),Ls=r(X,"A",{href:!0});var Sy=i(Ls);dv=n(Sy,"MarkupLMFeatureExtractor"),Sy.forEach(t),cv=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 Ry=i(qs);pv=n(Ry,"MarkupLMTokenizer"),Ry.forEach(t),hv=n(X," or "),$s=r(X,"A",{href:!0});var By=i($s);uv=n(By,"MarkupLMTokenizerFast"),By.forEach(t),mv=n(X,`, which turns them into token-level
`),vl=r(X,"CODE",{});var Wy=i(vl);fv=n(Wy,"input_ids"),Wy.forEach(t),gv=n(X,", "),bl=r(X,"CODE",{});var Uy=i(bl);_v=n(Uy,"attention_mask"),Uy.forEach(t),kv=n(X,", "),Ml=r(X,"CODE",{});var Hy=i(Ml);vv=n(Hy,"token_type_ids"),Hy.forEach(t),bv=n(X,", "),wl=r(X,"CODE",{});var Vy=i(wl);Mv=n(Vy,"xpath_tags_seq"),Vy.forEach(t),wv=n(X," and "),yl=r(X,"CODE",{});var Qy=i(yl);yv=n(Qy,"xpath_subs_seq"),Qy.forEach(t),xv=n(X,"."),X.forEach(t),Tv=d(Se),ge=r(Se,"DIV",{class:!0});var oo=i(ge);v(en.$$.fragment,oo),Ev=d(oo),oe=r(oo,"P",{});var xe=i(oe);Lv=n(xe,"This method first forwards the "),xl=r(xe,"CODE",{});var Xy=i(xl);qv=n(Xy,"html_strings"),Xy.forEach(t),$v=n(xe," argument to "),tn=r(xe,"A",{href:!0});var fM=i(tn);Tl=r(fM,"STRONG",{});var Gy=i(Tl);Fv=n(Gy,"call"),Gy.forEach(t),zv=n(fM,"()"),fM.forEach(t),Cv=n(xe,`. Next, it
passes the `),El=r(xe,"CODE",{});var Ky=i(El);jv=n(Ky,"nodes"),Ky.forEach(t),Pv=n(xe," and "),Ll=r(xe,"CODE",{});var Yy=i(Ll);Dv=n(Yy,"xpaths"),Yy.forEach(t),Ov=n(xe," along with the additional arguments to "),ql=r(xe,"CODE",{});var Jy=i(ql);Av=n(Jy,"__call__()"),Jy.forEach(t),Iv=n(xe,` and
returns the output.`),xe.forEach(t),Nv=d(oo),on=r(oo,"P",{});var Fc=i(on);Sv=n(Fc,"Optionally, one can also provide a "),$l=r(Fc,"CODE",{});var Zy=i($l);Rv=n(Zy,"text"),Zy.forEach(t),Bv=n(Fc," argument which is passed along as first sequence."),Fc.forEach(t),Wv=d(oo),Fl=r(oo,"P",{});var ex=i(Fl);Uv=n(ex,"Please refer to the docstring of the above two methods for more information."),ex.forEach(t),oo.forEach(t),Se.forEach(t),sc=d(s),Ze=r(s,"H2",{class:!0});var zc=i(Ze);Bt=r(zc,"A",{id:!0,class:!0,href:!0});var tx=i(Bt);zl=r(tx,"SPAN",{});var ox=i(zl);v(nn.$$.fragment,ox),ox.forEach(t),tx.forEach(t),Hv=d(zc),Cl=r(zc,"SPAN",{});var nx=i(Cl);Vv=n(nx,"MarkupLMModel"),nx.forEach(t),zc.forEach(t),ac=d(s),Ee=r(s,"DIV",{class:!0});var Vs=i(Ee);v(sn.$$.fragment,Vs),Qv=d(Vs),an=r(Vs,"P",{});var Cc=i(an);Xv=n(Cc,`The bare MarkupLM Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),rn=r(Cc,"A",{href:!0,rel:!0});var sx=i(rn);Gv=n(sx,"torch.nn.Module"),sx.forEach(t),Kv=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),Yv=d(Vs),_e=r(Vs,"DIV",{class:!0});var no=i(_e);v(ln.$$.fragment,no),Jv=d(no),et=r(no,"P",{});var Qs=i(et);Zv=n(Qs,"The "),Fs=r(Qs,"A",{href:!0});var ax=i(Fs);eb=n(ax,"MarkupLMModel"),ax.forEach(t),tb=n(Qs," forward method, overrides the "),jl=r(Qs,"CODE",{});var rx=i(jl);ob=n(rx,"__call__"),rx.forEach(t),nb=n(Qs," special method."),Qs.forEach(t),sb=d(no),v(Wt.$$.fragment,no),ab=d(no),v(Ut.$$.fragment,no),no.forEach(t),Vs.forEach(t),rc=d(s),tt=r(s,"H2",{class:!0});var jc=i(tt);Ht=r(jc,"A",{id:!0,class:!0,href:!0});var ix=i(Ht);Pl=r(ix,"SPAN",{});var lx=i(Pl);v(dn.$$.fragment,lx),lx.forEach(t),ix.forEach(t),rb=d(jc),Dl=r(jc,"SPAN",{});var dx=i(Dl);ib=n(dx,"MarkupLMForSequenceClassification"),dx.forEach(t),jc.forEach(t),ic=d(s),he=r(s,"DIV",{class:!0});var so=i(he);v(cn.$$.fragment,so),lb=d(so),Ol=r(so,"P",{});var cx=i(Ol);db=n(cx,`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.`),cx.forEach(t),cb=d(so),pn=r(so,"P",{});var Pc=i(pn);pb=n(Pc,"This model is a PyTorch "),hn=r(Pc,"A",{href:!0,rel:!0});var px=i(hn);hb=n(px,"torch.nn.Module"),px.forEach(t),ub=n(Pc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Pc.forEach(t),mb=d(so),ke=r(so,"DIV",{class:!0});var ao=i(ke);v(un.$$.fragment,ao),fb=d(ao),ot=r(ao,"P",{});var Xs=i(ot);gb=n(Xs,"The "),zs=r(Xs,"A",{href:!0});var hx=i(zs);_b=n(hx,"MarkupLMForSequenceClassification"),hx.forEach(t),kb=n(Xs," forward method, overrides the "),Al=r(Xs,"CODE",{});var ux=i(Al);vb=n(ux,"__call__"),ux.forEach(t),bb=n(Xs," special method."),Xs.forEach(t),Mb=d(ao),v(Vt.$$.fragment,ao),wb=d(ao),v(Qt.$$.fragment,ao),ao.forEach(t),so.forEach(t),lc=d(s),nt=r(s,"H2",{class:!0});var Dc=i(nt);Xt=r(Dc,"A",{id:!0,class:!0,href:!0});var mx=i(Xt);Il=r(mx,"SPAN",{});var fx=i(Il);v(mn.$$.fragment,fx),fx.forEach(t),mx.forEach(t),yb=d(Dc),Nl=r(Dc,"SPAN",{});var gx=i(Nl);xb=n(gx,"MarkupLMForTokenClassification"),gx.forEach(t),Dc.forEach(t),dc=d(s),Le=r(s,"DIV",{class:!0});var Gs=i(Le);v(fn.$$.fragment,Gs),Tb=d(Gs),st=r(Gs,"P",{});var Ks=i(st);Eb=n(Ks,"MarkupLM Model with a "),Sl=r(Ks,"CODE",{});var _x=i(Sl);Lb=n(_x,"token_classification"),_x.forEach(t),qb=n(Ks,` head on top.
This model is a PyTorch `),gn=r(Ks,"A",{href:!0,rel:!0});var kx=i(gn);$b=n(kx,"torch.nn.Module"),kx.forEach(t),Fb=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),zb=d(Gs),ve=r(Gs,"DIV",{class:!0});var ro=i(ve);v(_n.$$.fragment,ro),Cb=d(ro),at=r(ro,"P",{});var Ys=i(at);jb=n(Ys,"The "),Cs=r(Ys,"A",{href:!0});var vx=i(Cs);Pb=n(vx,"MarkupLMForTokenClassification"),vx.forEach(t),Db=n(Ys," forward method, overrides the "),Rl=r(Ys,"CODE",{});var bx=i(Rl);Ob=n(bx,"__call__"),bx.forEach(t),Ab=n(Ys," special method."),Ys.forEach(t),Ib=d(ro),v(Gt.$$.fragment,ro),Nb=d(ro),v(Kt.$$.fragment,ro),ro.forEach(t),Gs.forEach(t),cc=d(s),rt=r(s,"H2",{class:!0});var Oc=i(rt);Yt=r(Oc,"A",{id:!0,class:!0,href:!0});var Mx=i(Yt);Bl=r(Mx,"SPAN",{});var wx=i(Bl);v(kn.$$.fragment,wx),wx.forEach(t),Mx.forEach(t),Sb=d(Oc),Wl=r(Oc,"SPAN",{});var yx=i(Wl);Rb=n(yx,"MarkupLMForQuestionAnswering"),yx.forEach(t),Oc.forEach(t),pc=d(s),ue=r(s,"DIV",{class:!0});var io=i(ue);v(vn.$$.fragment,io),Bb=d(io),it=r(io,"P",{});var Js=i(it);Wb=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 `),Ul=r(Js,"CODE",{});var xx=i(Ul);Ub=n(xx,"span start logits"),xx.forEach(t),Hb=n(Js," and "),Hl=r(Js,"CODE",{});var Tx=i(Hl);Vb=n(Tx,"span end logits"),Tx.forEach(t),Qb=n(Js,")."),Js.forEach(t),Xb=d(io),bn=r(io,"P",{});var Ac=i(bn);Gb=n(Ac,"This model is a PyTorch "),Mn=r(Ac,"A",{href:!0,rel:!0});var Ex=i(Mn);Kb=n(Ex,"torch.nn.Module"),Ex.forEach(t),Yb=n(Ac,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ac.forEach(t),Jb=d(io),be=r(io,"DIV",{class:!0});var lo=i(be);v(wn.$$.fragment,lo),Zb=d(lo),lt=r(lo,"P",{});var Zs=i(lt);eM=n(Zs,"The "),js=r(Zs,"A",{href:!0});var Lx=i(js);tM=n(Lx,"MarkupLMForQuestionAnswering"),Lx.forEach(t),oM=n(Zs," forward method, overrides the "),Vl=r(Zs,"CODE",{});var qx=i(Vl);nM=n(qx,"__call__"),qx.forEach(t),sM=n(Zs," special method."),Zs.forEach(t),aM=d(lo),v(Jt.$$.fragment,lo),rM=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(Vx)),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(Re,"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.29.0/en/model_doc/markuplm#transformers.MarkupLMModel.forward"),c(Dn,"href","/docs/transformers/v4.29.0/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"),jx(mt.src,gM="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/markuplm_architecture.jpg")||c(mt,"src",gM),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.29.0/en/model_doc/markuplm#transformers.MarkupLMProcessor"),c(Nn,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor"),c(Sn,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(Rn,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(Bn,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMProcessor"),c(Wn,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor"),c(Un,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(Hn,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(Vn,"href","/docs/transformers/v4.29.0/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.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(Xn,"href","/docs/transformers/v4.29.0/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.29.0/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.29.0/en/model_doc/bert#transformers.BertConfig"),c(ls,"href","/docs/transformers/v4.29.0/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.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c(cs,"href","/docs/transformers/v4.29.0/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.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(gs,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(_s,"href","/docs/transformers/v4.29.0/en/internal/file_utils#transformers.utils.PaddingStrategy"),c(ks,"href","/docs/transformers/v4.29.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy"),c(vs,"href","/docs/transformers/v4.29.0/en/internal/file_utils#transformers.TensorType"),c(bs,"href","/docs/transformers/v4.29.0/en/internal/file_utils#transformers.utils.PaddingStrategy"),c(Ms,"href","/docs/transformers/v4.29.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy"),c(ws,"href","/docs/transformers/v4.29.0/en/internal/file_utils#transformers.TensorType"),c(B,"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(C,"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.MarkupLMProcessor"),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.MarkupLMProcessor"),c(Je,"class","relative group"),c(Es,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMProcessor"),c(Ls,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMFeatureExtractor"),c(qs,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizer"),c($s,"href","/docs/transformers/v4.29.0/en/model_doc/markuplm#transformers.MarkupLMTokenizerFast"),c(tn,"href","/docs/transformers/v4.29.0/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(Bt,"id","transformers.MarkupLMModel"),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.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.29.0/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.29.0/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(Cs,"href","/docs/transformers/v4.29.0/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(js,"href","/docs/transformers/v4.29.0/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,Nc),u(s,md,p),u(s,Re,p),e(Re,ht),e(ht,oa),b(co,oa,null),e(Re,Sc),e(Re,na),e(na,Rc),u(s,fd,p),u(s,qe,p),e(qe,Bc),e(qe,po),e(po,Wc),e(qe,Uc),e(qe,Ln),e(Ln,Hc),e(qe,Vc),u(s,gd,p),u(s,qn,p),e(qn,Qc),u(s,_d,p),u(s,ut,p),e(ut,$n),e($n,ho),e(ho,Xc),e($n,Gc),e(ut,Kc),e(ut,Fn),e(Fn,uo),e(uo,Yc),e(Fn,Jc),u(s,kd,p),u(s,zn,p),e(zn,Zc),u(s,vd,p),u(s,Cn,p),e(Cn,sa),e(sa,ep),u(s,bd,p),u(s,jn,p),e(jn,tp),u(s,Md,p),u(s,$e,p),e($e,le),e(le,op),e(le,aa),e(aa,np),e(le,sp),e(le,Pn),e(Pn,ap),e(le,rp),e(le,ra),e(ra,ip),e(le,lp),e(le,ia),e(ia,dp),e(le,cp),e($e,pp),e($e,Be),e(Be,hp),e(Be,Dn),e(Dn,up),e(Be,mp),e(Be,On),e(On,fp),e(Be,gp),e($e,_p),e($e,mo),e(mo,kp),e(mo,fo),e(fo,vp),e(mo,bp),u(s,wd,p),u(s,mt,p),u(s,yd,p),u(s,go,p),e(go,Mp),e(go,An),e(An,wp),u(s,xd,p),u(s,Fe,p),e(Fe,yp),e(Fe,_o),e(_o,xp),e(Fe,Tp),e(Fe,ko),e(ko,Ep),e(Fe,Lp),u(s,Td,p),u(s,We,p),e(We,ft),e(ft,la),b(vo,la,null),e(We,qp),e(We,da),e(da,$p),u(s,Ed,p),u(s,J,p),e(J,Fp),e(J,In),e(In,zp),e(J,Cp),e(J,Nn),e(Nn,jp),e(J,Pp),e(J,Sn),e(Sn,Dp),e(J,Op),e(J,Rn),e(Rn,Ap),e(J,Ip),e(J,ca),e(ca,Np),e(J,Sp),u(s,Ld,p),b(bo,s,p),u(s,qd,p),u(s,F,p),e(F,Rp),e(F,Bn),e(Bn,Bp),e(F,Wp),e(F,Wn),e(Wn,Up),e(F,Hp),e(F,Un),e(Un,Vp),e(F,Qp),e(F,Hn),e(Hn,Xp),e(F,Gp),e(F,pa),e(pa,Kp),e(F,Yp),e(F,ha),e(ha,Jp),e(F,Zp),e(F,ua),e(ua,eh),e(F,th),e(F,ma),e(ma,oh),e(F,nh),e(F,fa),e(fa,sh),e(F,ah),e(F,ga),e(ga,rh),e(F,ih),u(s,$d,p),u(s,de,p),e(de,Vn),e(Vn,lh),e(de,dh),e(de,Mo),e(Mo,ch),e(de,ph),e(de,Qn),e(Qn,hh),e(de,uh),e(de,Xn),e(Xn,mh),e(de,fh),u(s,Fd,p),u(s,Gn,p),e(Gn,gh),u(s,zd,p),u(s,Kn,p),e(Kn,_a),e(_a,_h),u(s,Cd,p),u(s,Yn,p),e(Yn,kh),u(s,jd,p),b(wo,s,p),u(s,Pd,p),u(s,Jn,p),e(Jn,ka),e(ka,vh),u(s,Dd,p),u(s,ze,p),e(ze,bh),e(ze,va),e(va,Mh),e(ze,wh),e(ze,ba),e(ba,yh),e(ze,xh),u(s,Od,p),b(yo,s,p),u(s,Ad,p),u(s,Zn,p),e(Zn,Ma),e(Ma,Th),u(s,Id,p),u(s,Z,p),e(Z,Eh),e(Z,xo),e(xo,Lh),e(Z,qh),e(Z,wa),e(wa,$h),e(Z,Fh),e(Z,ya),e(ya,zh),e(Z,Ch),e(Z,xa),e(xa,jh),e(Z,Ph),e(Z,Ta),e(Ta,Dh),e(Z,Oh),u(s,Nd,p),b(To,s,p),u(s,Sd,p),u(s,es,p),e(es,Ea),e(Ea,Ah),u(s,Rd,p),u(s,ts,p),e(ts,Ih),u(s,Bd,p),b(Eo,s,p),u(s,Wd,p),u(s,os,p),e(os,La),e(La,Nh),u(s,Ud,p),u(s,Ce,p),e(Ce,Sh),e(Ce,qa),e(qa,Rh),e(Ce,Bh),e(Ce,$a),e($a,Wh),e(Ce,Uh),u(s,Hd,p),b(Lo,s,p),u(s,Vd,p),u(s,Ue,p),e(Ue,gt),e(gt,Fa),b(qo,Fa,null),e(Ue,Hh),e(Ue,za),e(za,Vh),u(s,Qd,p),u(s,je,p),e(je,Ca),e(Ca,ns),e(ns,Qh),e(je,Xh),e(je,ja),e(ja,ss),e(ss,Gh),e(je,Kh),e(je,Pa),e(Pa,as),e(as,Yh),u(s,Xd,p),u(s,He,p),e(He,_t),e(_t,Da),b($o,Da,null),e(He,Jh),e(He,Oa),e(Oa,Zh),u(s,Gd,p),u(s,ce,p),b(Fo,ce,null),e(ce,eu),e(ce,Ve),e(Ve,tu),e(Ve,rs),e(rs,ou),e(Ve,nu),e(Ve,zo),e(zo,su),e(Ve,au),e(ce,ru),e(ce,Qe),e(Qe,iu),e(Qe,is),e(is,lu),e(Qe,du),e(Qe,ls),e(ls,cu),e(Qe,pu),e(ce,hu),b(kt,ce,null),u(s,Kd,p),u(s,Xe,p),e(Xe,vt),e(vt,Aa),b(Co,Aa,null),e(Xe,uu),e(Xe,Ia),e(Ia,mu),u(s,Yd,p),u(s,pe,p),b(jo,pe,null),e(pe,fu),e(pe,Na),e(Na,gu),e(pe,_u),e(pe,Po),e(Po,ku),e(Po,Sa),e(Sa,vu),e(Po,bu),e(pe,Mu),e(pe,Pe),b(Do,Pe,null),e(Pe,wu),e(Pe,Ra),e(Ra,yu),e(Pe,xu),b(bt,Pe,null),u(s,Jd,p),u(s,Ge,p),e(Ge,Mt),e(Mt,Ba),b(Oo,Ba,null),e(Ge,Tu),e(Ge,Wa),e(Wa,Eu),u(s,Zd,p),u(s,K,p),b(Ao,K,null),e(K,Lu),e(K,S),e(S,qu),e(S,ds),e(ds,$u),e(S,Fu),e(S,Ua),e(Ua,zu),e(S,Cu),e(S,Ha),e(Ha,ju),e(S,Pu),e(S,Va),e(Va,Du),e(S,Ou),e(S,Qa),e(Qa,Au),e(S,Iu),e(S,Xa),e(Xa,Nu),e(S,Su),e(S,cs),e(cs,Ru),e(S,Bu),e(K,Wu),e(K,De),b(Io,De,null),e(De,Uu),e(De,Ga),e(Ga,Hu),e(De,Vu),e(De,No),e(No,ps),e(ps,Qu),e(ps,Ka),e(Ka,Xu),e(No,Gu),e(No,hs),e(hs,Ku),e(hs,Ya),e(Ya,Yu),e(K,Ju),e(K,us),b(So,us,null),e(K,Zu),e(K,wt),b(Ro,wt,null),e(wt,em),e(wt,Ja),e(Ja,tm),e(K,om),e(K,ms),b(Bo,ms,null),u(s,ec,p),u(s,Ke,p),e(Ke,yt),e(yt,Za),b(Wo,Za,null),e(Ke,nm),e(Ke,er),e(er,sm),u(s,tc,p),u(s,C,p),b(Uo,C,null),e(C,am),e(C,tr),e(tr,rm),e(C,im),e(C,R),e(R,fs),e(fs,lm),e(R,dm),e(R,or),e(or,cm),e(R,pm),e(R,nr),e(nr,hm),e(R,um),e(R,sr),e(sr,mm),e(R,fm),e(R,ar),e(ar,gm),e(R,_m),e(R,rr),e(rr,km),e(R,vm),e(R,gs),e(gs,bm),e(R,Mm),e(C,wm),e(C,ir),e(ir,ym),e(C,xm),e(C,B),b(Ho,B,null),e(B,Tm),e(B,O),e(O,Em),e(O,lr),e(lr,Lm),e(O,qm),e(O,dr),e(dr,$m),e(O,Fm),e(O,cr),e(cr,zm),e(O,Cm),e(O,pr),e(pr,jm),e(O,Pm),e(O,hr),e(hr,Dm),e(O,Om),e(O,_s),e(_s,Am),e(O,Im),e(O,ur),e(ur,Nm),e(O,Sm),e(O,mr),e(mr,Rm),e(O,Bm),e(B,Wm),e(B,Y),e(Y,fr),e(fr,xt),e(xt,gr),e(gr,Um),e(xt,Hm),e(xt,_r),e(_r,Vm),e(xt,Qm),e(Y,Xm),e(Y,kr),e(kr,Tt),e(Tt,vr),e(vr,Gm),e(Tt,Km),e(Tt,br),e(br,Ym),e(Tt,Jm),e(Y,Zm),e(Y,Mr),e(Mr,W),e(W,wr),e(wr,ef),e(W,tf),e(W,yr),e(yr,of),e(W,nf),e(W,xr),e(xr,sf),e(W,af),e(W,Tr),e(Tr,rf),e(W,lf),e(W,ks),e(ks,df),e(W,cf),e(W,Er),e(Er,pf),e(W,hf),e(W,Lr),e(Lr,uf),e(W,mf),e(Y,ff),e(Y,qr),e(qr,Oe),e(Oe,$r),e($r,gf),e(Oe,_f),e(Oe,Fr),e(Fr,kf),e(Oe,vf),e(Oe,zr),e(zr,bf),e(Oe,Mf),e(Y,wf),e(Y,Cr),e(Cr,Et),e(Et,jr),e(jr,yf),e(Et,xf),e(Et,Pr),e(Pr,Tf),e(Et,Ef),e(Y,Lf),e(Y,Dr),e(Dr,Lt),e(Lt,Or),e(Or,qf),e(Lt,$f),e(Lt,Ar),e(Ar,Ff),e(Lt,zf),e(Y,Cf),e(Y,Ir),e(Ir,fe),e(fe,Nr),e(Nr,jf),e(fe,Pf),e(fe,Sr),e(Sr,Df),e(fe,Of),e(fe,Rr),e(Rr,Af),e(fe,If),e(fe,Br),e(Br,Nf),e(fe,Sf),e(B,Rf),e(B,E),e(E,Bf),e(E,Wr),e(Wr,Wf),e(E,Uf),e(E,Ur),e(Ur,Hf),e(E,Vf),e(E,Hr),e(Hr,Qf),e(E,Xf),e(E,Vr),e(Vr,Gf),e(E,Kf),e(E,Qr),e(Qr,Yf),e(E,Jf),e(E,Xr),e(Xr,Zf),e(E,eg),e(E,Gr),e(Gr,tg),e(E,og),e(E,Kr),e(Kr,ng),e(E,sg),e(E,Yr),e(Yr,ag),e(E,rg),e(E,Jr),e(Jr,ig),e(E,lg),e(E,Zr),e(Zr,dg),e(E,cg),e(E,ei),e(ei,pg),e(E,hg),e(E,ti),e(ti,ug),e(E,mg),e(E,oi),e(oi,fg),e(E,gg),e(E,vs),e(vs,_g),e(E,kg),e(E,ni),e(ni,vg),e(E,bg),e(B,Mg),e(B,Ye),e(Ye,qt),e(qt,si),e(si,wg),e(qt,yg),e(qt,ai),e(ai,xg),e(qt,Tg),e(Ye,Eg),e(Ye,$t),e($t,ri),e(ri,Lg),e($t,qg),e($t,ii),e(ii,$g),e($t,Fg),e(Ye,zg),e(Ye,Ft),e(Ft,li),e(li,Cg),e(Ft,jg),e(Ft,di),e(di,Pg),e(Ft,Dg),e(B,Og),e(B,A),e(A,Ag),e(A,ci),e(ci,Ig),e(A,Ng),e(A,pi),e(pi,Sg),e(A,Rg),e(A,hi),e(hi,Bg),e(A,Wg),e(A,ui),e(ui,Ug),e(A,Hg),e(A,mi),e(mi,Vg),e(A,Qg),e(A,bs),e(bs,Xg),e(A,Gg),e(A,fi),e(fi,Kg),e(A,Yg),e(A,gi),e(gi,Jg),e(A,Zg),e(B,e_),e(B,j),e(j,_i),e(_i,zt),e(zt,ki),e(ki,t_),e(zt,o_),e(zt,vi),e(vi,n_),e(zt,s_),e(j,a_),e(j,bi),e(bi,Ct),e(Ct,Mi),e(Mi,r_),e(Ct,i_),e(Ct,wi),e(wi,l_),e(Ct,d_),e(j,c_),e(j,yi),e(yi,U),e(U,xi),e(xi,p_),e(U,h_),e(U,Ti),e(Ti,u_),e(U,m_),e(U,Ei),e(Ei,f_),e(U,g_),e(U,Li),e(Li,__),e(U,k_),e(U,Ms),e(Ms,v_),e(U,b_),e(U,qi),e(qi,M_),e(U,w_),e(U,$i),e($i,y_),e(U,x_),e(j,T_),e(j,Fi),e(Fi,Ae),e(Ae,zi),e(zi,E_),e(Ae,L_),e(Ae,Ci),e(Ci,q_),e(Ae,$_),e(Ae,ji),e(ji,F_),e(Ae,z_),e(j,C_),e(j,Pi),e(Pi,jt),e(jt,Di),e(Di,j_),e(jt,P_),e(jt,Oi),e(Oi,D_),e(jt,O_),e(j,A_),e(j,Ai),e(Ai,Pt),e(Pt,Ii),e(Ii,I_),e(Pt,N_),e(Pt,Ni),e(Ni,S_),e(Pt,R_),e(j,B_),e(j,Si),e(Si,L),e(L,Ri),e(Ri,W_),e(L,U_),e(L,Bi),e(Bi,H_),e(L,V_),e(L,Wi),e(Wi,Q_),e(L,X_),e(L,Ui),e(Ui,G_),e(L,K_),e(L,Hi),e(Hi,Y_),e(L,J_),e(L,Vi),e(Vi,Z_),e(L,ek),e(L,Qi),e(Qi,tk),e(L,ok),e(L,Xi),e(Xi,nk),e(L,sk),e(L,Gi),e(Gi,ak),e(L,rk),e(L,Ki),e(Ki,ik),e(L,lk),e(L,Yi),e(Yi,dk),e(L,ck),e(L,Ji),e(Ji,pk),e(L,hk),e(L,Zi),e(Zi,uk),e(L,mk),e(L,ws),e(ws,fk),e(L,gk),e(L,el),e(el,_k),e(L,kk),e(j,vk),e(j,tl),e(tl,Dt),e(Dt,ol),e(ol,bk),e(Dt,Mk),e(Dt,nl),e(nl,wk),e(Dt,yk),e(j,xk),e(j,sl),e(sl,Ot),e(Ot,al),e(al,Tk),e(Ot,Ek),e(Ot,rl),e(rl,Lk),e(Ot,qk),e(j,$k),e(j,il),e(il,At),e(At,ll),e(ll,Fk),e(At,zk),e(At,dl),e(dl,Ck),e(At,jk),e(C,Pk),e(C,Ie),b(Vo,Ie,null),e(Ie,Dk),e(Ie,cl),e(cl,Ok),e(Ie,Ak),e(Ie,Qo),e(Qo,ys),e(ys,Ik),e(ys,pl),e(pl,Nk),e(Qo,Sk),e(Qo,xs),e(xs,Rk),e(xs,hl),e(hl,Bk),e(C,Wk),e(C,It),b(Xo,It,null),e(It,Uk),e(It,ul),e(ul,Hk),e(C,Vk),e(C,Nt),b(Go,Nt,null),e(Nt,Qk),e(Nt,Ko),e(Ko,Xk),e(Ko,ml),e(ml,Gk),e(Ko,Kk),e(C,Yk),e(C,St),b(Yo,St,null),e(St,Jk),e(St,fl),e(fl,Zk),u(s,oc,p),u(s,Je,p),e(Je,Rt),e(Rt,gl),b(Jo,gl,null),e(Je,ev),e(Je,_l),e(_l,tv),u(s,nc,p),u(s,te,p),b(Zo,te,null),e(te,ov),e(te,kl),e(kl,nv),e(te,sv),e(te,Ts),e(Ts,Es),e(Es,av),e(Ts,rv),e(te,iv),e(te,I),e(I,lv),e(I,Ls),e(Ls,dv),e(I,cv),e(I,qs),e(qs,pv),e(I,hv),e(I,$s),e($s,uv),e(I,mv),e(I,vl),e(vl,fv),e(I,gv),e(I,bl),e(bl,_v),e(I,kv),e(I,Ml),e(Ml,vv),e(I,bv),e(I,wl),e(wl,Mv),e(I,wv),e(I,yl),e(yl,yv),e(I,xv),e(te,Tv),e(te,ge),b(en,ge,null),e(ge,Ev),e(ge,oe),e(oe,Lv),e(oe,xl),e(xl,qv),e(oe,$v),e(oe,tn),e(tn,Tl),e(Tl,Fv),e(tn,zv),e(oe,Cv),e(oe,El),e(El,jv),e(oe,Pv),e(oe,Ll),e(Ll,Dv),e(oe,Ov),e(oe,ql),e(ql,Av),e(oe,Iv),e(ge,Nv),e(ge,on),e(on,Sv),e(on,$l),e($l,Rv),e(on,Bv),e(ge,Wv),e(ge,Fl),e(Fl,Uv),u(s,sc,p),u(s,Ze,p),e(Ze,Bt),e(Bt,zl),b(nn,zl,null),e(Ze,Hv),e(Ze,Cl),e(Cl,Vv),u(s,ac,p),u(s,Ee,p),b(sn,Ee,null),e(Ee,Qv),e(Ee,an),e(an,Xv),e(an,rn),e(rn,Gv),e(an,Kv),e(Ee,Yv),e(Ee,_e),b(ln,_e,null),e(_e,Jv),e(_e,et),e(et,Zv),e(et,Fs),e(Fs,eb),e(et,tb),e(et,jl),e(jl,ob),e(et,nb),e(_e,sb),b(Wt,_e,null),e(_e,ab),b(Ut,_e,null),u(s,rc,p),u(s,tt,p),e(tt,Ht),e(Ht,Pl),b(dn,Pl,null),e(tt,rb),e(tt,Dl),e(Dl,ib),u(s,ic,p),u(s,he,p),b(cn,he,null),e(he,lb),e(he,Ol),e(Ol,db),e(he,cb),e(he,pn),e(pn,pb),e(pn,hn),e(hn,hb),e(pn,ub),e(he,mb),e(he,ke),b(un,ke,null),e(ke,fb),e(ke,ot),e(ot,gb),e(ot,zs),e(zs,_b),e(ot,kb),e(ot,Al),e(Al,vb),e(ot,bb),e(ke,Mb),b(Vt,ke,null),e(ke,wb),b(Qt,ke,null),u(s,lc,p),u(s,nt,p),e(nt,Xt),e(Xt,Il),b(mn,Il,null),e(nt,yb),e(nt,Nl),e(Nl,xb),u(s,dc,p),u(s,Le,p),b(fn,Le,null),e(Le,Tb),e(Le,st),e(st,Eb),e(st,Sl),e(Sl,Lb),e(st,qb),e(st,gn),e(gn,$b),e(st,Fb),e(Le,zb),e(Le,ve),b(_n,ve,null),e(ve,Cb),e(ve,at),e(at,jb),e(at,Cs),e(Cs,Pb),e(at,Db),e(at,Rl),e(Rl,Ob),e(at,Ab),e(ve,Ib),b(Gt,ve,null),e(ve,Nb),b(Kt,ve,null),u(s,cc,p),u(s,rt,p),e(rt,Yt),e(Yt,Bl),b(kn,Bl,null),e(rt,Sb),e(rt,Wl),e(Wl,Rb),u(s,pc,p),u(s,ue,p),b(vn,ue,null),e(ue,Bb),e(ue,it),e(it,Wb),e(it,Ul),e(Ul,Ub),e(it,Hb),e(it,Hl),e(Hl,Vb),e(it,Qb),e(ue,Xb),e(ue,bn),e(bn,Gb),e(bn,Mn),e(Mn,Kb),e(bn,Yb),e(ue,Jb),e(ue,be),b(wn,be,null),e(be,Zb),e(be,lt),e(lt,eM),e(lt,js),e(js,tM),e(lt,oM),e(lt,Vl),e(Vl,nM),e(lt,sM),e(be,aM),b(Jt,be,null),e(be,rM),b(Zt,be,null),hc=!0},p(s,[p]){const yn={};p&2&&(yn.$$scope={dirty:p,ctx:s}),kt.$set(yn);const Ql={};p&2&&(Ql.$$scope={dirty:p,ctx:s}),bt.$set(Ql);const Xl={};p&2&&(Xl.$$scope={dirty:p,ctx:s}),Wt.$set(Xl);const Gl={};p&2&&(Gl.$$scope={dirty:p,ctx:s}),Ut.$set(Gl);const xn={};p&2&&(xn.$$scope={dirty:p,ctx:s}),Vt.$set(xn);const Kl={};p&2&&(Kl.$$scope={dirty:p,ctx:s}),Qt.$set(Kl);const Yl={};p&2&&(Yl.$$scope={dirty:p,ctx:s}),Gt.$set(Yl);const Jl={};p&2&&(Jl.$$scope={dirty:p,ctx:s}),Kt.$set(Jl);const dt={};p&2&&(dt.$$scope={dirty:p,ctx:s}),Jt.$set(dt);const Zl={};p&2&&(Zl.$$scope={dirty:p,ctx:s}),Zt.$set(Zl)},i(s){hc||(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(Co.$$.fragment,s),M(jo.$$.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(Ro.$$.fragment,s),M(Bo.$$.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),hc=!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(Co.$$.fragment,s),w(jo.$$.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(Ro.$$.fragment,s),w(Bo.$$.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),hc=!1},d(s){t(m),s&&t(T),s&&t(_),y(h),s&&t(md),s&&t(Re),y(co),s&&t(fd),s&&t(qe),s&&t(gd),s&&t(qn),s&&t(_d),s&&t(ut),s&&t(kd),s&&t(zn),s&&t(vd),s&&t(Cn),s&&t(bd),s&&t(jn),s&&t(Md),s&&t($e),s&&t(wd),s&&t(mt),s&&t(yd),s&&t(go),s&&t(xd),s&&t(Fe),s&&t(Td),s&&t(We),y(vo),s&&t(Ed),s&&t(J),s&&t(Ld),y(bo,s),s&&t(qd),s&&t(F),s&&t($d),s&&t(de),s&&t(Fd),s&&t(Gn),s&&t(zd),s&&t(Kn),s&&t(Cd),s&&t(Yn),s&&t(jd),y(wo,s),s&&t(Pd),s&&t(Jn),s&&t(Dd),s&&t(ze),s&&t(Od),y(yo,s),s&&t(Ad),s&&t(Zn),s&&t(Id),s&&t(Z),s&&t(Nd),y(To,s),s&&t(Sd),s&&t(es),s&&t(Rd),s&&t(ts),s&&t(Bd),y(Eo,s),s&&t(Wd),s&&t(os),s&&t(Ud),s&&t(Ce),s&&t(Hd),y(Lo,s),s&&t(Vd),s&&t(Ue),y(qo),s&&t(Qd),s&&t(je),s&&t(Xd),s&&t(He),y($o),s&&t(Gd),s&&t(ce),y(Fo),y(kt),s&&t(Kd),s&&t(Xe),y(Co),s&&t(Yd),s&&t(pe),y(jo),y(Do),y(bt),s&&t(Jd),s&&t(Ge),y(Oo),s&&t(Zd),s&&t(K),y(Ao),y(Io),y(So),y(Ro),y(Bo),s&&t(ec),s&&t(Ke),y(Wo),s&&t(tc),s&&t(C),y(Uo),y(Ho),y(Vo),y(Xo),y(Go),y(Yo),s&&t(oc),s&&t(Je),y(Jo),s&&t(nc),s&&t(te),y(Zo),y(en),s&&t(sc),s&&t(Ze),y(nn),s&&t(ac),s&&t(Ee),y(sn),y(ln),y(Wt),y(Ut),s&&t(rc),s&&t(tt),y(dn),s&&t(ic),s&&t(he),y(cn),y(un),y(Vt),y(Qt),s&&t(lc),s&&t(nt),y(mn),s&&t(dc),s&&t(Le),y(fn),y(_n),y(Gt),y(Kt),s&&t(cc),s&&t(rt),y(kn),s&&t(pc),s&&t(ue),y(vn),y(wn),y(Jt),y(Zt)}}}const Vx={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 Qx(P){return Px(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class e0 extends $x{constructor(m){super();Fx(this,m,Qx,Hx,zx,{})}}export{e0 as default,Vx as metadata};
