import{S as T2,i as b2,s as C2,e as p,k as o,w as M,t as n,M as _2,c as i,d as a,m as j,a as r,x as d,h as t,b as h,N as I2,G as l,g as c,y as U,q as m,o as y,B as J,v as E2}from"../../chunks/vendor-hf-doc-builder.js";import{T as v2}from"../../chunks/Tip-hf-doc-builder.js";import{I as vs}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as x}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as V2}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function k2(Zn){let T,ps,I,w,k,N,Vs,R,ks,is,E,rs;return{c(){T=p("p"),ps=n("\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C \uC124\uBA85\uD558\uB294 \uD0DC\uC2A4\uD06C\uB294 \uB2E4\uC74C\uACFC \uAC19\uC740 \uBAA8\uB378 \uC544\uD0A4\uD14D\uCC98\uC5D0\uC11C \uC9C0\uC6D0\uB429\uB2C8\uB2E4:"),I=o(),w=p("p"),k=p("a"),N=n("LayoutLM"),Vs=n(", "),R=p("a"),ks=n("LayoutLMv2"),is=n(", "),E=p("a"),rs=n("LayoutLMv3"),this.h()},l(f){T=i(f,"P",{});var B=r(T);ps=t(B,"\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C \uC124\uBA85\uD558\uB294 \uD0DC\uC2A4\uD06C\uB294 \uB2E4\uC74C\uACFC \uAC19\uC740 \uBAA8\uB378 \uC544\uD0A4\uD14D\uCC98\uC5D0\uC11C \uC9C0\uC6D0\uB429\uB2C8\uB2E4:"),B.forEach(a),I=j(f),w=i(f,"P",{});var G=r(w);k=i(G,"A",{href:!0});var O=r(k);N=t(O,"LayoutLM"),O.forEach(a),Vs=t(G,", "),R=i(G,"A",{href:!0});var _l=r(R);ks=t(_l,"LayoutLMv2"),_l.forEach(a),is=t(G,", "),E=i(G,"A",{href:!0});var Rs=r(E);rs=t(Rs,"LayoutLMv3"),Rs.forEach(a),G.forEach(a),this.h()},h(){h(k,"href","../model_doc/layoutlm"),h(R,"href","../model_doc/layoutlmv2"),h(E,"href","../model_doc/layoutlmv3")},m(f,B){c(f,T,B),l(T,ps),c(f,I,B),c(f,w,B),l(w,k),l(k,N),l(w,Vs),l(w,R),l(R,ks),l(w,is),l(w,E),l(E,rs)},d(f){f&&a(T),f&&a(I),f&&a(w)}}}function R2(Zn){let T,ps,I,w,k,N,Vs,R,ks,is,E,rs,f,B,G,O,_l,Rs,cs,os,Zs,Te,be,Il,Ce,_e,Ie,oa,Ee,An,js,Qn,El,ve,$n,vl,Ve,Xn,As,Nn,Qs,Gn,$s,Fn,Vl,ke,Bn,kl,Re,Wn,Xs,zn,Rl,Ze,Sn,Ns,qn,H,hs,ja,Gs,Ae,ha,Qe,Yn,W,$e,Fs,Xe,Ne,Bs,Ge,Fe,Dn,Ws,On,Zl,Be,Hn,zs,Ln,Al,We,Pn,b,Ql,Ma,ze,Se,qe,$l,da,Ye,De,Oe,Xl,Ua,He,Le,Pe,Nl,ma,Ke,sp,lp,Ms,ya,ap,np,Ja,tp,ep,pp,Gl,xa,ip,rp,Kn,ds,cp,ga,op,jp,st,Ss,lt,Z,hp,ua,Mp,dp,L,Up,wa,mp,yp,Jp,qs,xp,gp,at,Ys,nt,z,up,fa,wp,fp,Ds,Ta,Tp,bp,Cp,tt,Os,et,Fl,_p,pt,Hs,it,Ls,Bl,yc,rt,P,Us,ba,Ps,Ip,Ca,Ep,ct,ms,vp,_a,Vp,kp,ot,Ks,jt,K,ys,Ia,sl,Rp,Ea,Zp,ht,Js,Ap,va,Qp,$p,Mt,ll,dt,xs,Xp,Va,Np,Gp,Ut,al,mt,ss,gs,ka,nl,Fp,Ra,Bp,yt,C,Wp,Za,zp,Sp,Aa,qp,Yp,Qa,Dp,Op,$a,Hp,Lp,Xa,Pp,Kp,Jt,tl,xt,A,si,Na,li,ai,Ga,ni,ti,Fa,ei,pi,gt,Wl,ii,ut,g,ri,Ba,ci,oi,Wa,ji,hi,za,Mi,di,Sa,Ui,mi,qa,yi,Ji,Ya,xi,gi,Da,ui,wi,Oa,fi,Ti,Ha,bi,Ci,wt,el,ft,zl,_i,Tt,pl,bt,Sl,Ii,Ct,il,_t,ql,Ei,It,S,Yl,La,vi,Vi,ki,Dl,Pa,Ri,Zi,Ai,us,Ka,Qi,$i,sn,Xi,Ni,Et,Ol,Gi,vt,rl,Vt,Hl,Fi,kt,cl,Rt,Ll,Bi,Zt,ol,At,ls,ws,ln,jl,Wi,an,zi,Qt,q,Si,nn,qi,Yi,hl,Di,Oi,$t,as,fs,tn,Ml,Hi,en,Li,Xt,Pl,Pi,Nt,v,dl,Ki,pn,sr,lr,ar,Kl,rn,nr,tr,er,Ul,pr,cn,ir,rr,cr,ml,or,on,jr,hr,Mr,sa,jn,dr,Ur,Gt,yl,Ft,_,hn,mr,yr,Mn,Jr,xr,dn,gr,ur,Un,wr,fr,mn,Tr,br,Bt,Jl,Wt,la,Cr,zt,xl,St,Ts,_r,yn,Ir,Er,qt,gl,Yt,bs,vr,Jn,Vr,kr,Dt,ul,Ot,ns,Cs,xn,wl,Rr,gn,Zr,Ht,_s,Ar,un,Qr,$r,Lt,aa,Xr,Pt,fl,Kt,na,Nr,se,Tl,le,ta,Gr,ae,V,wn,Fr,Br,fn,Wr,zr,ts,Sr,Tn,qr,Yr,bn,Dr,Or,Hr,Q,Cn,Lr,Pr,_n,Kr,sc,In,lc,ac,En,nc,tc,ec,vn,pc,ne,bl,te;return N=new vs({}),E=new V2({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/document_question_answering.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/document_question_answering.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/document_question_answering.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/document_question_answering.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/document_question_answering.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/document_question_answering.ipynb"}]}}),js=new v2({props:{$$slots:{default:[k2]},$$scope:{ctx:Zn}}}),As=new x({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1xJTIwdHJhbnNmb3JtZXJzJTIwZGF0YXNldHM=",highlighted:"pip install -q transformers datasets"}}),Qs=new x({props:{code:"cGlwJTIwaW5zdGFsbCUyMCdnaXQlMkJodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZmYWNlYm9va3Jlc2VhcmNoJTJGZGV0ZWN0cm9uMi5naXQnJTBBcGlwJTIwaW5zdGFsbCUyMHRvcmNodmlzaW9u",highlighted:`pip install <span class="hljs-string">&#x27;git+https://github.com/facebookresearch/detectron2.git&#x27;</span>
pip install torchvision`}}),$s=new x({props:{code:"c3VkbyUyMGFwdCUyMGluc3RhbGwlMjB0ZXNzZXJhY3Qtb2NyJTBBcGlwJTIwaW5zdGFsbCUyMC1xJTIwcHl0ZXNzZXJhY3Q=",highlighted:`sudo apt install tesseract-ocr
pip install -q pytesseract`}}),Xs=new x({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_login()`}}),Ns=new x({props:{code:"bW9kZWxfY2hlY2twb2ludCUyMCUzRCUyMCUyMm1pY3Jvc29mdCUyRmxheW91dGxtdjItYmFzZS11bmNhc2VkJTIyJTBBYmF0Y2hfc2l6ZSUyMCUzRCUyMDQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>model_checkpoint = <span class="hljs-string">&quot;microsoft/layoutlmv2-base-uncased&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>batch_size = <span class="hljs-number">4</span>`}}),Gs=new vs({}),Ws=new x({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJuaWVsc3IlMkZkb2N2cWFfMTIwMF9leGFtcGxlcyUyMiklMEFkYXRhc2V0",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/docvqa_1200_examples&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;image&#x27;</span>, <span class="hljs-string">&#x27;query&#x27;</span>, <span class="hljs-string">&#x27;answers&#x27;</span>, <span class="hljs-string">&#x27;words&#x27;</span>, <span class="hljs-string">&#x27;bounding_boxes&#x27;</span>, <span class="hljs-string">&#x27;answer&#x27;</span>],
        num_rows: <span class="hljs-number">1000</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;id&#x27;</span>, <span class="hljs-string">&#x27;image&#x27;</span>, <span class="hljs-string">&#x27;query&#x27;</span>, <span class="hljs-string">&#x27;answers&#x27;</span>, <span class="hljs-string">&#x27;words&#x27;</span>, <span class="hljs-string">&#x27;bounding_boxes&#x27;</span>, <span class="hljs-string">&#x27;answer&#x27;</span>],
        num_rows: <span class="hljs-number">200</span>
    })
})`}}),zs=new x({props:{code:"ZGF0YXNldCU1QiUyMnRyYWluJTIyJTVELmZlYXR1cmVz",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset[<span class="hljs-string">&quot;train&quot;</span>].features'}}),Ss=new x({props:{code:"dXBkYXRlZF9kYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5tYXAobGFtYmRhJTIwZXhhbXBsZSUzQSUyMCU3QiUyMnF1ZXN0aW9uJTIyJTNBJTIwZXhhbXBsZSU1QiUyMnF1ZXJ5JTIyJTVEJTVCJTIyZW4lMjIlNUQlN0QlMkMlMjByZW1vdmVfY29sdW1ucyUzRCU1QiUyMnF1ZXJ5JTIyJTVEKSUwQXVwZGF0ZWRfZGF0YXNldCUyMCUzRCUyMHVwZGF0ZWRfZGF0YXNldC5tYXAoJTBBJTIwJTIwJTIwJTIwbGFtYmRhJTIwZXhhbXBsZSUzQSUyMCU3QiUyMmFuc3dlciUyMiUzQSUyMGV4YW1wbGUlNUIlMjJhbnN3ZXJzJTIyJTVEJTVCMCU1RCU3RCUyQyUyMHJlbW92ZV9jb2x1bW5zJTNEJTVCJTIyYW5zd2VyJTIyJTJDJTIwJTIyYW5zd2VycyUyMiU1RCUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>updated_dataset = dataset.<span class="hljs-built_in">map</span>(<span class="hljs-keyword">lambda</span> example: {<span class="hljs-string">&quot;question&quot;</span>: example[<span class="hljs-string">&quot;query&quot;</span>][<span class="hljs-string">&quot;en&quot;</span>]}, remove_columns=[<span class="hljs-string">&quot;query&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>updated_dataset = updated_dataset.<span class="hljs-built_in">map</span>(
<span class="hljs-meta">... </span>    <span class="hljs-keyword">lambda</span> example: {<span class="hljs-string">&quot;answer&quot;</span>: example[<span class="hljs-string">&quot;answers&quot;</span>][<span class="hljs-number">0</span>]}, remove_columns=[<span class="hljs-string">&quot;answer&quot;</span>, <span class="hljs-string">&quot;answers&quot;</span>]
<span class="hljs-meta">... </span>)`}}),Ys=new x({props:{code:"dXBkYXRlZF9kYXRhc2V0JTIwJTNEJTIwdXBkYXRlZF9kYXRhc2V0LmZpbHRlcihsYW1iZGElMjB4JTNBJTIwbGVuKHglNUIlMjJ3b3JkcyUyMiU1RCklMjAlMkIlMjBsZW4oeCU1QiUyMnF1ZXN0aW9uJTIyJTVELnNwbGl0KCkpJTIwJTNDJTIwNTEyKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>updated_dataset = updated_dataset.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> x: <span class="hljs-built_in">len</span>(x[<span class="hljs-string">&quot;words&quot;</span>]) + <span class="hljs-built_in">len</span>(x[<span class="hljs-string">&quot;question&quot;</span>].split()) &lt; <span class="hljs-number">512</span>)'}}),Os=new x({props:{code:"dXBkYXRlZF9kYXRhc2V0JTIwJTNEJTIwdXBkYXRlZF9kYXRhc2V0LnJlbW92ZV9jb2x1bW5zKCUyMndvcmRzJTIyKSUwQXVwZGF0ZWRfZGF0YXNldCUyMCUzRCUyMHVwZGF0ZWRfZGF0YXNldC5yZW1vdmVfY29sdW1ucyglMjJib3VuZGluZ19ib3hlcyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>updated_dataset = updated_dataset.remove_columns(<span class="hljs-string">&quot;words&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>updated_dataset = updated_dataset.remove_columns(<span class="hljs-string">&quot;bounding_boxes&quot;</span>)`}}),Hs=new x({props:{code:"dXBkYXRlZF9kYXRhc2V0JTVCJTIydHJhaW4lMjIlNUQlNUIxMSU1RCU1QiUyMmltYWdlJTIyJTVE",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>updated_dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">11</span>][<span class="hljs-string">&quot;image&quot;</span>]'}}),Ps=new vs({}),Ks=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChtb2RlbF9jaGVja3BvaW50KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(model_checkpoint)`}}),sl=new vs({}),ll=new x({props:{code:"aW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwcHJvY2Vzc29yLmltYWdlX3Byb2Nlc3NvciUwQSUwQSUwQWRlZiUyMGdldF9vY3Jfd29yZHNfYW5kX2JveGVzKGV4YW1wbGVzKSUzQSUwQSUyMCUyMCUyMCUyMGltYWdlcyUyMCUzRCUyMCU1QmltYWdlLmNvbnZlcnQoJTIyUkdCJTIyKSUyMGZvciUyMGltYWdlJTIwaW4lMjBleGFtcGxlcyU1QiUyMmltYWdlJTIyJTVEJTVEJTBBJTIwJTIwJTIwJTIwZW5jb2RlZF9pbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzKSUwQSUwQSUyMCUyMCUyMCUyMGV4YW1wbGVzJTVCJTIyaW1hZ2UlMjIlNUQlMjAlM0QlMjBlbmNvZGVkX2lucHV0cy5waXhlbF92YWx1ZXMlMEElMjAlMjAlMjAlMjBleGFtcGxlcyU1QiUyMndvcmRzJTIyJTVEJTIwJTNEJTIwZW5jb2RlZF9pbnB1dHMud29yZHMlMEElMjAlMjAlMjAlMjBleGFtcGxlcyU1QiUyMmJveGVzJTIyJTVEJTIwJTNEJTIwZW5jb2RlZF9pbnB1dHMuYm94ZXMlMEElMEElMjAlMjAlMjAlMjByZXR1cm4lMjBleGFtcGxlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = processor.image_processor


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">get_ocr_words_and_boxes</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    images = [image.convert(<span class="hljs-string">&quot;RGB&quot;</span>) <span class="hljs-keyword">for</span> image <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;image&quot;</span>]]
<span class="hljs-meta">... </span>    encoded_inputs = image_processor(images)

<span class="hljs-meta">... </span>    examples[<span class="hljs-string">&quot;image&quot;</span>] = encoded_inputs.pixel_values
<span class="hljs-meta">... </span>    examples[<span class="hljs-string">&quot;words&quot;</span>] = encoded_inputs.words
<span class="hljs-meta">... </span>    examples[<span class="hljs-string">&quot;boxes&quot;</span>] = encoded_inputs.boxes

<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> examples`}}),al=new x({props:{code:"ZGF0YXNldF93aXRoX29jciUyMCUzRCUyMHVwZGF0ZWRfZGF0YXNldC5tYXAoZ2V0X29jcl93b3Jkc19hbmRfYm94ZXMlMkMlMjBiYXRjaGVkJTNEVHJ1ZSUyQyUyMGJhdGNoX3NpemUlM0QyKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset_with_ocr = updated_dataset.<span class="hljs-built_in">map</span>(get_ocr_words_and_boxes, batched=<span class="hljs-literal">True</span>, batch_size=<span class="hljs-number">2</span>)'}}),nl=new vs({}),tl=new x({props:{code:"dG9rZW5pemVyJTIwJTNEJTIwcHJvY2Vzc29yLnRva2VuaXplcg==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = processor.tokenizer'}}),el=new x({props:{code:"ZGVmJTIwc3ViZmluZGVyKHdvcmRzX2xpc3QlMkMlMjBhbnN3ZXJfbGlzdCklM0ElMEElMjAlMjAlMjAlMjBtYXRjaGVzJTIwJTNEJTIwJTVCJTVEJTBBJTIwJTIwJTIwJTIwc3RhcnRfaW5kaWNlcyUyMCUzRCUyMCU1QiU1RCUwQSUyMCUyMCUyMCUyMGVuZF9pbmRpY2VzJTIwJTNEJTIwJTVCJTVEJTBBJTIwJTIwJTIwJTIwZm9yJTIwaWR4JTJDJTIwaSUyMGluJTIwZW51bWVyYXRlKHJhbmdlKGxlbih3b3Jkc19saXN0KSkpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaWYlMjB3b3Jkc19saXN0JTVCaSU1RCUyMCUzRCUzRCUyMGFuc3dlcl9saXN0JTVCMCU1RCUyMGFuZCUyMHdvcmRzX2xpc3QlNUJpJTIwJTNBJTIwaSUyMCUyQiUyMGxlbihhbnN3ZXJfbGlzdCklNUQlMjAlM0QlM0QlMjBhbnN3ZXJfbGlzdCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMG1hdGNoZXMuYXBwZW5kKGFuc3dlcl9saXN0KSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHN0YXJ0X2luZGljZXMuYXBwZW5kKGlkeCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBlbmRfaW5kaWNlcy5hcHBlbmQoaWR4JTIwJTJCJTIwbGVuKGFuc3dlcl9saXN0KSUyMC0lMjAxKSUwQSUyMCUyMCUyMCUyMGlmJTIwbWF0Y2hlcyUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMG1hdGNoZXMlNUIwJTVEJTJDJTIwc3RhcnRfaW5kaWNlcyU1QjAlNUQlMkMlMjBlbmRfaW5kaWNlcyU1QjAlNUQlMEElMjAlMjAlMjAlMjBlbHNlJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwTm9uZSUyQyUyMDAlMkMlMjAw",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">subfinder</span>(<span class="hljs-params">words_list, answer_list</span>):
<span class="hljs-meta">... </span>    matches = []
<span class="hljs-meta">... </span>    start_indices = []
<span class="hljs-meta">... </span>    end_indices = []
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> idx, i <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(<span class="hljs-built_in">range</span>(<span class="hljs-built_in">len</span>(words_list))):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> words_list[i] == answer_list[<span class="hljs-number">0</span>] <span class="hljs-keyword">and</span> words_list[i : i + <span class="hljs-built_in">len</span>(answer_list)] == answer_list:
<span class="hljs-meta">... </span>            matches.append(answer_list)
<span class="hljs-meta">... </span>            start_indices.append(idx)
<span class="hljs-meta">... </span>            end_indices.append(idx + <span class="hljs-built_in">len</span>(answer_list) - <span class="hljs-number">1</span>)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">if</span> matches:
<span class="hljs-meta">... </span>        <span class="hljs-keyword">return</span> matches[<span class="hljs-number">0</span>], start_indices[<span class="hljs-number">0</span>], end_indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">else</span>:
<span class="hljs-meta">... </span>        <span class="hljs-keyword">return</span> <span class="hljs-literal">None</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>`}}),pl=new x({props:{code:"ZXhhbXBsZSUyMCUzRCUyMGRhdGFzZXRfd2l0aF9vY3IlNUIlMjJ0cmFpbiUyMiU1RCU1QjElNUQlMEF3b3JkcyUyMCUzRCUyMCU1QndvcmQubG93ZXIoKSUyMGZvciUyMHdvcmQlMjBpbiUyMGV4YW1wbGUlNUIlMjJ3b3JkcyUyMiU1RCU1RCUwQW1hdGNoJTJDJTIwd29yZF9pZHhfc3RhcnQlMkMlMjB3b3JkX2lkeF9lbmQlMjAlM0QlMjBzdWJmaW5kZXIod29yZHMlMkMlMjBleGFtcGxlJTVCJTIyYW5zd2VyJTIyJTVELmxvd2VyKCkuc3BsaXQoKSklMEFwcmludCglMjJRdWVzdGlvbiUzQSUyMCUyMiUyQyUyMGV4YW1wbGUlNUIlMjJxdWVzdGlvbiUyMiU1RCklMEFwcmludCglMjJXb3JkcyUzQSUyMiUyQyUyMHdvcmRzKSUwQXByaW50KCUyMkFuc3dlciUzQSUyMCUyMiUyQyUyMGV4YW1wbGUlNUIlMjJhbnN3ZXIlMjIlNUQpJTBBcHJpbnQoJTIyc3RhcnRfaW5kZXglMjIlMkMlMjB3b3JkX2lkeF9zdGFydCklMEFwcmludCglMjJlbmRfaW5kZXglMjIlMkMlMjB3b3JkX2lkeF9lbmQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset_with_ocr[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = [word.lower() <span class="hljs-keyword">for</span> word <span class="hljs-keyword">in</span> example[<span class="hljs-string">&quot;words&quot;</span>]]
<span class="hljs-meta">&gt;&gt;&gt; </span>match, word_idx_start, word_idx_end = subfinder(words, example[<span class="hljs-string">&quot;answer&quot;</span>].lower().split())
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Question: &quot;</span>, example[<span class="hljs-string">&quot;question&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Words:&quot;</span>, words)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Answer: &quot;</span>, example[<span class="hljs-string">&quot;answer&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;start_index&quot;</span>, word_idx_start)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;end_index&quot;</span>, word_idx_end)
Question:  Who <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span>  cc <span class="hljs-keyword">in</span> this letter?
Words: [<span class="hljs-string">&#x27;wie&#x27;</span>, <span class="hljs-string">&#x27;baw&#x27;</span>, <span class="hljs-string">&#x27;brown&#x27;</span>, <span class="hljs-string">&#x27;&amp;&#x27;</span>, <span class="hljs-string">&#x27;williamson&#x27;</span>, <span class="hljs-string">&#x27;tobacco&#x27;</span>, <span class="hljs-string">&#x27;corporation&#x27;</span>, <span class="hljs-string">&#x27;research&#x27;</span>, <span class="hljs-string">&#x27;&amp;&#x27;</span>, <span class="hljs-string">&#x27;development&#x27;</span>, <span class="hljs-string">&#x27;internal&#x27;</span>, <span class="hljs-string">&#x27;correspondence&#x27;</span>, <span class="hljs-string">&#x27;to:&#x27;</span>, <span class="hljs-string">&#x27;r.&#x27;</span>, <span class="hljs-string">&#x27;h.&#x27;</span>, <span class="hljs-string">&#x27;honeycutt&#x27;</span>, <span class="hljs-string">&#x27;ce:&#x27;</span>, <span class="hljs-string">&#x27;t.f.&#x27;</span>, <span class="hljs-string">&#x27;riehl&#x27;</span>, <span class="hljs-string">&#x27;from:&#x27;</span>, <span class="hljs-string">&#x27;.&#x27;</span>, <span class="hljs-string">&#x27;c.j.&#x27;</span>, <span class="hljs-string">&#x27;cook&#x27;</span>, <span class="hljs-string">&#x27;date:&#x27;</span>, <span class="hljs-string">&#x27;may&#x27;</span>, <span class="hljs-string">&#x27;8,&#x27;</span>, <span class="hljs-string">&#x27;1995&#x27;</span>, <span class="hljs-string">&#x27;subject:&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;existing&#x27;</span>, <span class="hljs-string">&#x27;brainstorming&#x27;</span>, <span class="hljs-string">&#x27;ideas/483&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;major&#x27;</span>, <span class="hljs-string">&#x27;function&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;product&#x27;</span>, <span class="hljs-string">&#x27;innovation&#x27;</span>, <span class="hljs-string">&#x27;graup&#x27;</span>, <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;to&#x27;</span>, <span class="hljs-string">&#x27;develop&#x27;</span>, <span class="hljs-string">&#x27;marketable&#x27;</span>, <span class="hljs-string">&#x27;nove!&#x27;</span>, <span class="hljs-string">&#x27;products&#x27;</span>, <span class="hljs-string">&#x27;that&#x27;</span>, <span class="hljs-string">&#x27;would&#x27;</span>, <span class="hljs-string">&#x27;be&#x27;</span>, <span class="hljs-string">&#x27;profitable&#x27;</span>, <span class="hljs-string">&#x27;to&#x27;</span>, <span class="hljs-string">&#x27;manufacture&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;sell.&#x27;</span>, <span class="hljs-string">&#x27;novel&#x27;</span>, <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;defined&#x27;</span>, <span class="hljs-string">&#x27;as:&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;new&#x27;</span>, <span class="hljs-string">&#x27;kind,&#x27;</span>, <span class="hljs-string">&#x27;or&#x27;</span>, <span class="hljs-string">&#x27;different&#x27;</span>, <span class="hljs-string">&#x27;from&#x27;</span>, <span class="hljs-string">&#x27;anything&#x27;</span>, <span class="hljs-string">&#x27;seen&#x27;</span>, <span class="hljs-string">&#x27;or&#x27;</span>, <span class="hljs-string">&#x27;known&#x27;</span>, <span class="hljs-string">&#x27;before.&#x27;</span>, <span class="hljs-string">&#x27;innovation&#x27;</span>, <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;defined&#x27;</span>, <span class="hljs-string">&#x27;as:&#x27;</span>, <span class="hljs-string">&#x27;something&#x27;</span>, <span class="hljs-string">&#x27;new&#x27;</span>, <span class="hljs-string">&#x27;or&#x27;</span>, <span class="hljs-string">&#x27;different&#x27;</span>, <span class="hljs-string">&#x27;introduced;&#x27;</span>, <span class="hljs-string">&#x27;act&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;innovating;&#x27;</span>, <span class="hljs-string">&#x27;introduction&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;new&#x27;</span>, <span class="hljs-string">&#x27;things&#x27;</span>, <span class="hljs-string">&#x27;or&#x27;</span>, <span class="hljs-string">&#x27;methods.&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;products&#x27;</span>, <span class="hljs-string">&#x27;may&#x27;</span>, <span class="hljs-string">&#x27;incorporate&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;latest&#x27;</span>, <span class="hljs-string">&#x27;technologies,&#x27;</span>, <span class="hljs-string">&#x27;materials&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;know-how&#x27;</span>, <span class="hljs-string">&#x27;available&#x27;</span>, <span class="hljs-string">&#x27;to&#x27;</span>, <span class="hljs-string">&#x27;give&#x27;</span>, <span class="hljs-string">&#x27;then&#x27;</span>, <span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;unique&#x27;</span>, <span class="hljs-string">&#x27;taste&#x27;</span>, <span class="hljs-string">&#x27;or&#x27;</span>, <span class="hljs-string">&#x27;look.&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;first&#x27;</span>, <span class="hljs-string">&#x27;task&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;product&#x27;</span>, <span class="hljs-string">&#x27;innovation&#x27;</span>, <span class="hljs-string">&#x27;group&#x27;</span>, <span class="hljs-string">&#x27;was&#x27;</span>, <span class="hljs-string">&#x27;to&#x27;</span>, <span class="hljs-string">&#x27;assemble,&#x27;</span>, <span class="hljs-string">&#x27;review&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;categorize&#x27;</span>, <span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;list&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;existing&#x27;</span>, <span class="hljs-string">&#x27;brainstorming&#x27;</span>, <span class="hljs-string">&#x27;ideas.&#x27;</span>, <span class="hljs-string">&#x27;ideas&#x27;</span>, <span class="hljs-string">&#x27;were&#x27;</span>, <span class="hljs-string">&#x27;grouped&#x27;</span>, <span class="hljs-string">&#x27;into&#x27;</span>, <span class="hljs-string">&#x27;two&#x27;</span>, <span class="hljs-string">&#x27;major&#x27;</span>, <span class="hljs-string">&#x27;categories&#x27;</span>, <span class="hljs-string">&#x27;labeled&#x27;</span>, <span class="hljs-string">&#x27;appearance&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;taste/aroma.&#x27;</span>, <span class="hljs-string">&#x27;these&#x27;</span>, <span class="hljs-string">&#x27;categories&#x27;</span>, <span class="hljs-string">&#x27;are&#x27;</span>, <span class="hljs-string">&#x27;used&#x27;</span>, <span class="hljs-string">&#x27;for&#x27;</span>, <span class="hljs-string">&#x27;novel&#x27;</span>, <span class="hljs-string">&#x27;products&#x27;</span>, <span class="hljs-string">&#x27;that&#x27;</span>, <span class="hljs-string">&#x27;may&#x27;</span>, <span class="hljs-string">&#x27;differ&#x27;</span>, <span class="hljs-string">&#x27;from&#x27;</span>, <span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;visual&#x27;</span>, <span class="hljs-string">&#x27;and/or&#x27;</span>, <span class="hljs-string">&#x27;taste/aroma&#x27;</span>, <span class="hljs-string">&#x27;point&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;view&#x27;</span>, <span class="hljs-string">&#x27;compared&#x27;</span>, <span class="hljs-string">&#x27;to&#x27;</span>, <span class="hljs-string">&#x27;canventional&#x27;</span>, <span class="hljs-string">&#x27;cigarettes.&#x27;</span>, <span class="hljs-string">&#x27;other&#x27;</span>, <span class="hljs-string">&#x27;categories&#x27;</span>, <span class="hljs-string">&#x27;include&#x27;</span>, <span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;combination&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;the&#x27;</span>, <span class="hljs-string">&#x27;above,&#x27;</span>, <span class="hljs-string">&#x27;filters,&#x27;</span>, <span class="hljs-string">&#x27;packaging&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;brand&#x27;</span>, <span class="hljs-string">&#x27;extensions.&#x27;</span>, <span class="hljs-string">&#x27;appearance&#x27;</span>, <span class="hljs-string">&#x27;this&#x27;</span>, <span class="hljs-string">&#x27;category&#x27;</span>, <span class="hljs-string">&#x27;is&#x27;</span>, <span class="hljs-string">&#x27;used&#x27;</span>, <span class="hljs-string">&#x27;for&#x27;</span>, <span class="hljs-string">&#x27;novel&#x27;</span>, <span class="hljs-string">&#x27;cigarette&#x27;</span>, <span class="hljs-string">&#x27;constructions&#x27;</span>, <span class="hljs-string">&#x27;that&#x27;</span>, <span class="hljs-string">&#x27;yield&#x27;</span>, <span class="hljs-string">&#x27;visually&#x27;</span>, <span class="hljs-string">&#x27;different&#x27;</span>, <span class="hljs-string">&#x27;products&#x27;</span>, <span class="hljs-string">&#x27;with&#x27;</span>, <span class="hljs-string">&#x27;minimal&#x27;</span>, <span class="hljs-string">&#x27;changes&#x27;</span>, <span class="hljs-string">&#x27;in&#x27;</span>, <span class="hljs-string">&#x27;smoke&#x27;</span>, <span class="hljs-string">&#x27;chemistry&#x27;</span>, <span class="hljs-string">&#x27;two&#x27;</span>, <span class="hljs-string">&#x27;cigarettes&#x27;</span>, <span class="hljs-string">&#x27;in&#x27;</span>, <span class="hljs-string">&#x27;cne.&#x27;</span>, <span class="hljs-string">&#x27;emulti-plug&#x27;</span>, <span class="hljs-string">&#x27;te&#x27;</span>, <span class="hljs-string">&#x27;build&#x27;</span>, <span class="hljs-string">&#x27;yaur&#x27;</span>, <span class="hljs-string">&#x27;awn&#x27;</span>, <span class="hljs-string">&#x27;cigarette.&#x27;</span>, <span class="hljs-string">&#x27;eswitchable&#x27;</span>, <span class="hljs-string">&#x27;menthol&#x27;</span>, <span class="hljs-string">&#x27;or&#x27;</span>, <span class="hljs-string">&#x27;non&#x27;</span>, <span class="hljs-string">&#x27;menthol&#x27;</span>, <span class="hljs-string">&#x27;cigarette.&#x27;</span>, <span class="hljs-string">&#x27;*cigarettes&#x27;</span>, <span class="hljs-string">&#x27;with&#x27;</span>, <span class="hljs-string">&#x27;interspaced&#x27;</span>, <span class="hljs-string">&#x27;perforations&#x27;</span>, <span class="hljs-string">&#x27;to&#x27;</span>, <span class="hljs-string">&#x27;enable&#x27;</span>, <span class="hljs-string">&#x27;smoker&#x27;</span>, <span class="hljs-string">&#x27;to&#x27;</span>, <span class="hljs-string">&#x27;separate&#x27;</span>, <span class="hljs-string">&#x27;unburned&#x27;</span>, <span class="hljs-string">&#x27;section&#x27;</span>, <span class="hljs-string">&#x27;for&#x27;</span>, <span class="hljs-string">&#x27;future&#x27;</span>, <span class="hljs-string">&#x27;smoking.&#x27;</span>, <span class="hljs-string">&#x27;\xABshort&#x27;</span>, <span class="hljs-string">&#x27;cigarette,&#x27;</span>, <span class="hljs-string">&#x27;tobacco&#x27;</span>, <span class="hljs-string">&#x27;section&#x27;</span>, <span class="hljs-string">&#x27;30&#x27;</span>, <span class="hljs-string">&#x27;mm.&#x27;</span>, <span class="hljs-string">&#x27;\xABextremely&#x27;</span>, <span class="hljs-string">&#x27;fast&#x27;</span>, <span class="hljs-string">&#x27;buming&#x27;</span>, <span class="hljs-string">&#x27;cigarette.&#x27;</span>, <span class="hljs-string">&#x27;\xABnovel&#x27;</span>, <span class="hljs-string">&#x27;cigarette&#x27;</span>, <span class="hljs-string">&#x27;constructions&#x27;</span>, <span class="hljs-string">&#x27;that&#x27;</span>, <span class="hljs-string">&#x27;permit&#x27;</span>, <span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;significant&#x27;</span>, <span class="hljs-string">&#x27;reduction&#x27;</span>, <span class="hljs-string">&#x27;iretobacco&#x27;</span>, <span class="hljs-string">&#x27;weight&#x27;</span>, <span class="hljs-string">&#x27;while&#x27;</span>, <span class="hljs-string">&#x27;maintaining&#x27;</span>, <span class="hljs-string">&#x27;smoking&#x27;</span>, <span class="hljs-string">&#x27;mechanics&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;visual&#x27;</span>, <span class="hljs-string">&#x27;characteristics.&#x27;</span>, <span class="hljs-string">&#x27;higher&#x27;</span>, <span class="hljs-string">&#x27;basis&#x27;</span>, <span class="hljs-string">&#x27;weight&#x27;</span>, <span class="hljs-string">&#x27;paper:&#x27;</span>, <span class="hljs-string">&#x27;potential&#x27;</span>, <span class="hljs-string">&#x27;reduction&#x27;</span>, <span class="hljs-string">&#x27;in&#x27;</span>, <span class="hljs-string">&#x27;tobacco&#x27;</span>, <span class="hljs-string">&#x27;weight.&#x27;</span>, <span class="hljs-string">&#x27;\xABmore&#x27;</span>, <span class="hljs-string">&#x27;rigid&#x27;</span>, <span class="hljs-string">&#x27;tobacco&#x27;</span>, <span class="hljs-string">&#x27;column;&#x27;</span>, <span class="hljs-string">&#x27;stiffing&#x27;</span>, <span class="hljs-string">&#x27;agent&#x27;</span>, <span class="hljs-string">&#x27;for&#x27;</span>, <span class="hljs-string">&#x27;tobacco;&#x27;</span>, <span class="hljs-string">&#x27;e.g.&#x27;</span>, <span class="hljs-string">&#x27;starch&#x27;</span>, <span class="hljs-string">&#x27;*colored&#x27;</span>, <span class="hljs-string">&#x27;tow&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;cigarette&#x27;</span>, <span class="hljs-string">&#x27;papers;&#x27;</span>, <span class="hljs-string">&#x27;seasonal&#x27;</span>, <span class="hljs-string">&#x27;promotions,&#x27;</span>, <span class="hljs-string">&#x27;e.g.&#x27;</span>, <span class="hljs-string">&#x27;pastel&#x27;</span>, <span class="hljs-string">&#x27;colored&#x27;</span>, <span class="hljs-string">&#x27;cigarettes&#x27;</span>, <span class="hljs-string">&#x27;for&#x27;</span>, <span class="hljs-string">&#x27;easter&#x27;</span>, <span class="hljs-string">&#x27;or&#x27;</span>, <span class="hljs-string">&#x27;in&#x27;</span>, <span class="hljs-string">&#x27;an&#x27;</span>, <span class="hljs-string">&#x27;ebony&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;ivory&#x27;</span>, <span class="hljs-string">&#x27;brand&#x27;</span>, <span class="hljs-string">&#x27;containing&#x27;</span>, <span class="hljs-string">&#x27;a&#x27;</span>, <span class="hljs-string">&#x27;mixture&#x27;</span>, <span class="hljs-string">&#x27;of&#x27;</span>, <span class="hljs-string">&#x27;all&#x27;</span>, <span class="hljs-string">&#x27;black&#x27;</span>, <span class="hljs-string">&#x27;(black&#x27;</span>, <span class="hljs-string">&#x27;paper&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;tow)&#x27;</span>, <span class="hljs-string">&#x27;and&#x27;</span>, <span class="hljs-string">&#x27;ail&#x27;</span>, <span class="hljs-string">&#x27;white&#x27;</span>, <span class="hljs-string">&#x27;cigarettes.&#x27;</span>, <span class="hljs-string">&#x27;499150498&#x27;</span>]
Answer:  T.F. Riehl
start_index <span class="hljs-number">17</span>
end_index <span class="hljs-number">18</span>`}}),il=new x({props:{code:"ZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoZXhhbXBsZSU1QiUyMnF1ZXN0aW9uJTIyJTVEJTJDJTIwZXhhbXBsZSU1QiUyMndvcmRzJTIyJTVEJTJDJTIwZXhhbXBsZSU1QiUyMmJveGVzJTIyJTVEKSUwQXRva2VuaXplci5kZWNvZGUoZW5jb2RpbmclNUIlMjJpbnB1dF9pZHMlMjIlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(example[<span class="hljs-string">&quot;question&quot;</span>], example[<span class="hljs-string">&quot;words&quot;</span>], example[<span class="hljs-string">&quot;boxes&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(encoding[<span class="hljs-string">&quot;input_ids&quot;</span>])
[CLS] who <span class="hljs-keyword">is</span> <span class="hljs-keyword">in</span> cc <span class="hljs-keyword">in</span> this letter? [SEP] wie baw brown &amp; williamson tobacco corporation research &amp; development ...`}}),rl=new x({props:{code:" ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">encode_dataset</span>(<span class="hljs-params">examples, max_length=<span class="hljs-number">512</span></span>):
<span class="hljs-meta">... </span>    questions = examples[<span class="hljs-string">&quot;question&quot;</span>]
<span class="hljs-meta">... </span>    words = examples[<span class="hljs-string">&quot;words&quot;</span>]
<span class="hljs-meta">... </span>    boxes = examples[<span class="hljs-string">&quot;boxes&quot;</span>]
<span class="hljs-meta">... </span>    answers = examples[<span class="hljs-string">&quot;answer&quot;</span>]

<span class="hljs-meta">... </span>    <span class="hljs-comment"># \uC608\uC81C \uBC30\uCE58\uB97C \uC778\uCF54\uB529\uD558\uACE0 start_positions\uC640 end_positions\uB97C \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4</span>
<span class="hljs-meta">... </span>    encoding = tokenizer(questions, words, boxes, max_length=max_length, padding=<span class="hljs-string">&quot;max_length&quot;</span>, truncation=<span class="hljs-literal">True</span>)
<span class="hljs-meta">... </span>    start_positions = []
<span class="hljs-meta">... </span>    end_positions = []

<span class="hljs-meta">... </span>    <span class="hljs-comment"># \uBC30\uCE58\uC758 \uC608\uC81C\uB97C \uBC18\uBCF5\uD569\uB2C8\uB2E4</span>
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-built_in">len</span>(questions)):
<span class="hljs-meta">... </span>        cls_index = encoding[<span class="hljs-string">&quot;input_ids&quot;</span>][i].index(tokenizer.cls_token_id)

<span class="hljs-meta">... </span>        <span class="hljs-comment"># \uC608\uC81C\uC758 words\uC5D0\uC11C \uB2F5\uBCC0\uC758 \uC704\uCE58\uB97C \uCC3E\uC2B5\uB2C8\uB2E4</span>
<span class="hljs-meta">... </span>        words_example = [word.lower() <span class="hljs-keyword">for</span> word <span class="hljs-keyword">in</span> words[i]]
<span class="hljs-meta">... </span>        answer = answers[i]
<span class="hljs-meta">... </span>        match, word_idx_start, word_idx_end = subfinder(words_example, answer.lower().split())

<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> match:
<span class="hljs-meta">... </span>            <span class="hljs-comment"># \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC744 \uBC1C\uACAC\uD558\uBA74, \`token_type_ids\`\uB97C \uC0AC\uC6A9\uD574 \uC778\uCF54\uB529\uC5D0\uC11C \uB2E8\uC5B4\uAC00 \uC2DC\uC791\uD558\uB294 \uC704\uCE58\uB97C \uCC3E\uC2B5\uB2C8\uB2E4</span>
<span class="hljs-meta">... </span>            token_type_ids = encoding[<span class="hljs-string">&quot;token_type_ids&quot;</span>][i]
<span class="hljs-meta">... </span>            token_start_index = <span class="hljs-number">0</span>
<span class="hljs-meta">... </span>            <span class="hljs-keyword">while</span> token_type_ids[token_start_index] != <span class="hljs-number">1</span>:
<span class="hljs-meta">... </span>                token_start_index += <span class="hljs-number">1</span>

<span class="hljs-meta">... </span>            token_end_index = <span class="hljs-built_in">len</span>(encoding[<span class="hljs-string">&quot;input_ids&quot;</span>][i]) - <span class="hljs-number">1</span>
<span class="hljs-meta">... </span>            <span class="hljs-keyword">while</span> token_type_ids[token_end_index] != <span class="hljs-number">1</span>:
<span class="hljs-meta">... </span>                token_end_index -= <span class="hljs-number">1</span>

<span class="hljs-meta">... </span>            word_ids = encoding.word_ids(i)[token_start_index : token_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>            start_position = cls_index
<span class="hljs-meta">... </span>            end_position = cls_index

<span class="hljs-meta">... </span>            <span class="hljs-comment"># words\uC758 \uB2F5\uBCC0 \uC704\uCE58\uC640 \uC77C\uCE58\uD560 \uB54C\uAE4C\uC9C0 word_ids\uB97C \uBC18\uBCF5\uD558\uACE0 \`token_start_index\`\uB97C \uB298\uB9BD\uB2C8\uB2E4</span>
<span class="hljs-meta">... </span>            <span class="hljs-comment"># \uC77C\uCE58\uD558\uBA74 \`token_start_index\`\uB97C \uC778\uCF54\uB529\uC5D0\uC11C \uB2F5\uBCC0\uC758 \`start_position\`\uC73C\uB85C \uC800\uC7A5\uD569\uB2C8\uB2E4</span>
<span class="hljs-meta">... </span>            <span class="hljs-keyword">for</span> <span class="hljs-built_in">id</span> <span class="hljs-keyword">in</span> word_ids:
<span class="hljs-meta">... </span>                <span class="hljs-keyword">if</span> <span class="hljs-built_in">id</span> == word_idx_start:
<span class="hljs-meta">... </span>                    start_position = token_start_index
<span class="hljs-meta">... </span>                <span class="hljs-keyword">else</span>:
<span class="hljs-meta">... </span>                    token_start_index += <span class="hljs-number">1</span>

<span class="hljs-meta">... </span>            <span class="hljs-comment"># \uBE44\uC2B7\uD558\uAC8C, \uB05D\uC5D0\uC11C \uC2DC\uC791\uD574 \`word_ids\`\uB97C \uBC18\uBCF5\uD558\uBA70 \uB2F5\uBCC0\uC758 \`end_position\`\uC744 \uCC3E\uC2B5\uB2C8\uB2E4</span>
<span class="hljs-meta">... </span>            <span class="hljs-keyword">for</span> <span class="hljs-built_in">id</span> <span class="hljs-keyword">in</span> word_ids[::-<span class="hljs-number">1</span>]:
<span class="hljs-meta">... </span>                <span class="hljs-keyword">if</span> <span class="hljs-built_in">id</span> == word_idx_end:
<span class="hljs-meta">... </span>                    end_position = token_end_index
<span class="hljs-meta">... </span>                <span class="hljs-keyword">else</span>:
<span class="hljs-meta">... </span>                    token_end_index -= <span class="hljs-number">1</span>

<span class="hljs-meta">... </span>            start_positions.append(start_position)
<span class="hljs-meta">... </span>            end_positions.append(end_position)

<span class="hljs-meta">... </span>        <span class="hljs-keyword">else</span>:
<span class="hljs-meta">... </span>            start_positions.append(cls_index)
<span class="hljs-meta">... </span>            end_positions.append(cls_index)

<span class="hljs-meta">... </span>    encoding[<span class="hljs-string">&quot;image&quot;</span>] = examples[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">... </span>    encoding[<span class="hljs-string">&quot;start_positions&quot;</span>] = start_positions
<span class="hljs-meta">... </span>    encoding[<span class="hljs-string">&quot;end_positions&quot;</span>] = end_positions

<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> encoding`}}),cl=new x({props:{code:"ZW5jb2RlZF90cmFpbl9kYXRhc2V0JTIwJTNEJTIwZGF0YXNldF93aXRoX29jciU1QiUyMnRyYWluJTIyJTVELm1hcCglMEElMjAlMjAlMjAlMjBlbmNvZGVfZGF0YXNldCUyQyUyMGJhdGNoZWQlM0RUcnVlJTJDJTIwYmF0Y2hfc2l6ZSUzRDIlMkMlMjByZW1vdmVfY29sdW1ucyUzRGRhdGFzZXRfd2l0aF9vY3IlNUIlMjJ0cmFpbiUyMiU1RC5jb2x1bW5fbmFtZXMlMEEpJTBBZW5jb2RlZF90ZXN0X2RhdGFzZXQlMjAlM0QlMjBkYXRhc2V0X3dpdGhfb2NyJTVCJTIydGVzdCUyMiU1RC5tYXAoJTBBJTIwJTIwJTIwJTIwZW5jb2RlX2RhdGFzZXQlMkMlMjBiYXRjaGVkJTNEVHJ1ZSUyQyUyMGJhdGNoX3NpemUlM0QyJTJDJTIwcmVtb3ZlX2NvbHVtbnMlM0RkYXRhc2V0X3dpdGhfb2NyJTVCJTIydGVzdCUyMiU1RC5jb2x1bW5fbmFtZXMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_train_dataset = dataset_with_ocr[<span class="hljs-string">&quot;train&quot;</span>].<span class="hljs-built_in">map</span>(
<span class="hljs-meta">... </span>    encode_dataset, batched=<span class="hljs-literal">True</span>, batch_size=<span class="hljs-number">2</span>, remove_columns=dataset_with_ocr[<span class="hljs-string">&quot;train&quot;</span>].column_names
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_test_dataset = dataset_with_ocr[<span class="hljs-string">&quot;test&quot;</span>].<span class="hljs-built_in">map</span>(
<span class="hljs-meta">... </span>    encode_dataset, batched=<span class="hljs-literal">True</span>, batch_size=<span class="hljs-number">2</span>, remove_columns=dataset_with_ocr[<span class="hljs-string">&quot;test&quot;</span>].column_names
<span class="hljs-meta">... </span>)`}}),ol=new x({props:{code:"ZW5jb2RlZF90cmFpbl9kYXRhc2V0LmZlYXR1cmVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_train_dataset.features
{<span class="hljs-string">&#x27;image&#x27;</span>: <span class="hljs-type">Sequence</span>(feature=<span class="hljs-type">Sequence</span>(feature=<span class="hljs-type">Sequence</span>(feature=Value(dtype=<span class="hljs-string">&#x27;uint8&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;input_ids&#x27;</span>: <span class="hljs-type">Sequence</span>(feature=Value(dtype=<span class="hljs-string">&#x27;int32&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;token_type_ids&#x27;</span>: <span class="hljs-type">Sequence</span>(feature=Value(dtype=<span class="hljs-string">&#x27;int8&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;attention_mask&#x27;</span>: <span class="hljs-type">Sequence</span>(feature=Value(dtype=<span class="hljs-string">&#x27;int8&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;bbox&#x27;</span>: <span class="hljs-type">Sequence</span>(feature=<span class="hljs-type">Sequence</span>(feature=Value(dtype=<span class="hljs-string">&#x27;int64&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>), length=-<span class="hljs-number">1</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;start_positions&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int64&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>),
 <span class="hljs-string">&#x27;end_positions&#x27;</span>: Value(dtype=<span class="hljs-string">&#x27;int64&#x27;</span>, <span class="hljs-built_in">id</span>=<span class="hljs-literal">None</span>)}`}}),jl=new vs({}),Ml=new vs({}),yl=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckRvY3VtZW50UXVlc3Rpb25BbnN3ZXJpbmclMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckRvY3VtZW50UXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2NoZWNrcG9pbnQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForDocumentQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForDocumentQuestionAnswering.from_pretrained(model_checkpoint)`}}),Jl=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBJTIzJTIwJUVCJUIzJUI4JUVDJTlEJUI4JUVDJTlEJTk4JTIwJUVCJUEwJTg4JUVEJThGJUFDJUVDJUE3JTgwJUVEJTg2JUEwJUVCJUE2JUFDJTIwSUQlRUIlQTElOUMlMjAlRUIlQjAlOTQlRUElQkUlQjglRUMlODQlQjglRUMlOUElOTQlMEFyZXBvX2lkJTIwJTNEJTIwJTIyTWFyaWFLJTJGbGF5b3V0bG12Mi1iYXNlLXVuY2FzZWRfZmluZXR1bmVkX2RvY3ZxYSUyMiUwQSUwQXRyYWluaW5nX2FyZ3MlMjAlM0QlMjBUcmFpbmluZ0FyZ3VtZW50cyglMEElMjAlMjAlMjAlMjBvdXRwdXRfZGlyJTNEcmVwb19pZCUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDQlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNEMjAlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0ZXBzJTNEMjAwJTJDJTBBJTIwJTIwJTIwJTIwbG9nZ2luZ19zdGVwcyUzRDUwJTJDJTBBJTIwJTIwJTIwJTIwZXZhbHVhdGlvbl9zdHJhdGVneSUzRCUyMnN0ZXBzJTIyJTJDJTBBJTIwJTIwJTIwJTIwbGVhcm5pbmdfcmF0ZSUzRDVlLTUlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3RvdGFsX2xpbWl0JTNEMiUyQyUwQSUyMCUyMCUyMCUyMHJlbW92ZV91bnVzZWRfY29sdW1ucyUzREZhbHNlJTJDJTBBJTIwJTIwJTIwJTIwcHVzaF90b19odWIlM0RUcnVlJTJDJTBBKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># \uBCF8\uC778\uC758 \uB808\uD3EC\uC9C0\uD1A0\uB9AC ID\uB85C \uBC14\uAFB8\uC138\uC694</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>repo_id = <span class="hljs-string">&quot;MariaK/layoutlmv2-base-uncased_finetuned_docvqa&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>training_args = TrainingArguments(
<span class="hljs-meta">... </span>    output_dir=repo_id,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">4</span>,
<span class="hljs-meta">... </span>    num_train_epochs=<span class="hljs-number">20</span>,
<span class="hljs-meta">... </span>    save_steps=<span class="hljs-number">200</span>,
<span class="hljs-meta">... </span>    logging_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>    evaluation_strategy=<span class="hljs-string">&quot;steps&quot;</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">5e-5</span>,
<span class="hljs-meta">... </span>    save_total_limit=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>    remove_unused_columns=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    push_to_hub=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)`}}),xl=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlZmF1bHREYXRhQ29sbGF0b3IlMEElMEFkYXRhX2NvbGxhdG9yJTIwJTNEJTIwRGVmYXVsdERhdGFDb2xsYXRvcigp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DefaultDataCollator

<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DefaultDataCollator()`}}),gl=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluZXIlMEElMEF0cmFpbmVyJTIwJTNEJTIwVHJhaW5lciglMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwYXJncyUzRHRyYWluaW5nX2FyZ3MlMkMlMEElMjAlMjAlMjAlMjBkYXRhX2NvbGxhdG9yJTNEZGF0YV9jb2xsYXRvciUyQyUwQSUyMCUyMCUyMCUyMHRyYWluX2RhdGFzZXQlM0RlbmNvZGVkX3RyYWluX2RhdGFzZXQlMkMlMEElMjAlMjAlMjAlMjBldmFsX2RhdGFzZXQlM0RlbmNvZGVkX3Rlc3RfZGF0YXNldCUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRHByb2Nlc3NvciUyQyUwQSklMEElMEF0cmFpbmVyLnRyYWluKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Trainer

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Trainer(
<span class="hljs-meta">... </span>    model=model,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    data_collator=data_collator,
<span class="hljs-meta">... </span>    train_dataset=encoded_train_dataset,
<span class="hljs-meta">... </span>    eval_dataset=encoded_test_dataset,
<span class="hljs-meta">... </span>    tokenizer=processor,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()`}}),ul=new x({props:{code:"dHJhaW5lci5jcmVhdGVfbW9kZWxfY2FyZCgpJTBBdHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.create_model_card()
<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()`}}),wl=new vs({}),fl=new x({props:{code:"ZXhhbXBsZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCMiU1RCUwQXF1ZXN0aW9uJTIwJTNEJTIwZXhhbXBsZSU1QiUyMnF1ZXJ5JTIyJTVEJTVCJTIyZW4lMjIlNUQlMEFpbWFnZSUyMCUzRCUyMGV4YW1wbGUlNUIlMjJpbWFnZSUyMiU1RCUwQXByaW50KHF1ZXN0aW9uKSUwQXByaW50KGV4YW1wbGUlNUIlMjJhbnN3ZXJzJTIyJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-number">2</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>question = example[<span class="hljs-string">&quot;query&quot;</span>][<span class="hljs-string">&quot;en&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(question)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(example[<span class="hljs-string">&quot;answers&quot;</span>])
<span class="hljs-string">&#x27;Who is \u2018presiding\u2019 TRRF GENERAL SESSION (PART 1)?&#x27;</span>
[<span class="hljs-string">&#x27;TRRF Vice President&#x27;</span>, <span class="hljs-string">&#x27;lee a. waller&#x27;</span>]`}}),Tl=new x({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBcWFfcGlwZWxpbmUlMjAlM0QlMjBwaXBlbGluZSglMjJkb2N1bWVudC1xdWVzdGlvbi1hbnN3ZXJpbmclMjIlMkMlMjBtb2RlbCUzRCUyMk1hcmlhSyUyRmxheW91dGxtdjItYmFzZS11bmNhc2VkX2ZpbmV0dW5lZF9kb2N2cWElMjIpJTBBcWFfcGlwZWxpbmUoaW1hZ2UlMkMlMjBxdWVzdGlvbik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>qa_pipeline = pipeline(<span class="hljs-string">&quot;document-question-answering&quot;</span>, model=<span class="hljs-string">&quot;MariaK/layoutlmv2-base-uncased_finetuned_docvqa&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>qa_pipeline(image, question)
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9949808120727539</span>,
  <span class="hljs-string">&#x27;answer&#x27;</span>: <span class="hljs-string">&#x27;Lee A. Waller&#x27;</span>,
  <span class="hljs-string">&#x27;start&#x27;</span>: <span class="hljs-number">55</span>,
  <span class="hljs-string">&#x27;end&#x27;</span>: <span class="hljs-number">57</span>}]`}}),bl=new x({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvTW9kZWxGb3JEb2N1bWVudFF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyTWFyaWFLJTJGbGF5b3V0bG12Mi1iYXNlLXVuY2FzZWRfZmluZXR1bmVkX2RvY3ZxYSUyMiklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckRvY3VtZW50UXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMk1hcmlhSyUyRmxheW91dGxtdjItYmFzZS11bmNhc2VkX2ZpbmV0dW5lZF9kb2N2cWElMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGVuY29kaW5nJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlLmNvbnZlcnQoJTIyUkdCJTIyKSUyQyUyMHF1ZXN0aW9uJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiplbmNvZGluZyklMEElMjAlMjAlMjAlMjBzdGFydF9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUwQSUyMCUyMCUyMCUyMGVuZF9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmVuZF9sb2dpdHMlMEElMjAlMjAlMjAlMjBwcmVkaWN0ZWRfc3RhcnRfaWR4JTIwJTNEJTIwc3RhcnRfbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBJTIwJTIwJTIwJTIwcHJlZGljdGVkX2VuZF9pZHglMjAlM0QlMjBlbmRfbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBJTBBcHJvY2Vzc29yLnRva2VuaXplci5kZWNvZGUoZW5jb2RpbmcuaW5wdXRfaWRzLnNxdWVlemUoKSU1QnByZWRpY3RlZF9zdGFydF9pZHglMjAlM0ElMjBwcmVkaWN0ZWRfZW5kX2lkeCUyMCUyQiUyMDElNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForDocumentQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;MariaK/layoutlmv2-base-uncased_finetuned_docvqa&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForDocumentQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;MariaK/layoutlmv2-base-uncased_finetuned_docvqa&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    encoding = processor(image.convert(<span class="hljs-string">&quot;RGB&quot;</span>), question, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">... </span>    outputs = model(**encoding)
<span class="hljs-meta">... </span>    start_logits = outputs.start_logits
<span class="hljs-meta">... </span>    end_logits = outputs.end_logits
<span class="hljs-meta">... </span>    predicted_start_idx = start_logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">... </span>    predicted_end_idx = end_logits.argmax(-<span class="hljs-number">1</span>).item()

<span class="hljs-meta">&gt;&gt;&gt; </span>processor.tokenizer.decode(encoding.input_ids.squeeze()[predicted_start_idx : predicted_end_idx + <span class="hljs-number">1</span>])
<span class="hljs-string">&#x27;lee a. waller&#x27;</span>`}}),{c(){T=p("meta"),ps=o(),I=p("h1"),w=p("a"),k=p("span"),M(N.$$.fragment),Vs=o(),R=p("span"),ks=n("\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5(Document Question Answering)"),is=o(),M(E.$$.fragment),rs=o(),f=p("p"),B=n(`\uBB38\uC11C \uC2DC\uAC01\uC801 \uC9C8\uC758 \uC751\uB2F5(Document Visual Question Answering)\uC774\uB77C\uACE0\uB3C4 \uD558\uB294
\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5(Document Question Answering)\uC740 \uBB38\uC11C \uC774\uBBF8\uC9C0\uC5D0 \uB300\uD55C \uC9C8\uBB38\uC5D0 \uB2F5\uBCC0\uC744 \uC8FC\uB294 \uD0DC\uC2A4\uD06C\uC785\uB2C8\uB2E4.
\uC774 \uD0DC\uC2A4\uD06C\uB97C \uC9C0\uC6D0\uD558\uB294 \uBAA8\uB378\uC758 \uC785\uB825\uC740 \uC77C\uBC18\uC801\uC73C\uB85C \uC774\uBBF8\uC9C0\uC640 \uC9C8\uBB38\uC758 \uC870\uD569\uC774\uACE0, \uCD9C\uB825\uC740 \uC790\uC5F0\uC5B4\uB85C \uB41C \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uBAA8\uB378\uC740 \uD14D\uC2A4\uD2B8, \uB2E8\uC5B4\uC758 \uC704\uCE58(\uBC14\uC6B4\uB529 \uBC15\uC2A4), \uC774\uBBF8\uC9C0 \uB4F1 \uB2E4\uC591\uD55C \uBAA8\uB2EC\uB9AC\uD2F0\uB97C \uD65C\uC6A9\uD569\uB2C8\uB2E4.`),G=o(),O=p("p"),_l=n("\uC774 \uAC00\uC774\uB4DC\uB294 \uB2E4\uC74C \uB0B4\uC6A9\uC744 \uC124\uBA85\uD569\uB2C8\uB2E4:"),Rs=o(),cs=p("ul"),os=p("li"),Zs=p("a"),Te=n("DocVQA dataset"),be=n("\uC744 \uC0AC\uC6A9\uD574 "),Il=p("a"),Ce=n("LayoutLMv2"),_e=n(" \uBBF8\uC138 \uC870\uC815\uD558\uAE30"),Ie=o(),oa=p("li"),Ee=n("\uCD94\uB860\uC744 \uC704\uD574 \uBBF8\uC138 \uC870\uC815\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uAE30"),An=o(),M(js.$$.fragment),Qn=o(),El=p("p"),ve=n(`LayoutLMv2\uB294 \uD1A0\uD070\uC758 \uB9C8\uC9C0\uB9C9 \uC740\uB2C9\uCE35 \uC704\uC5D0 \uC9C8\uC758 \uC751\uB2F5 \uD5E4\uB4DC\uB97C \uCD94\uAC00\uD574 \uB2F5\uBCC0\uC758 \uC2DC\uC791 \uD1A0\uD070\uACFC \uB05D \uD1A0\uD070\uC758 \uC704\uCE58\uB97C \uC608\uCE21\uD568\uC73C\uB85C\uC368 \uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5 \uD0DC\uC2A4\uD06C\uB97C \uD574\uACB0\uD569\uB2C8\uB2E4. \uC989, \uBB38\uB9E5\uC774 \uC8FC\uC5B4\uC84C\uC744 \uB54C \uC9C8\uBB38\uC5D0 \uB2F5\uD558\uB294 \uC815\uBCF4\uB97C \uCD94\uCD9C\uD558\uB294 \uCD94\uCD9C\uD615 \uC9C8\uC758 \uC751\uB2F5(Extractive question answering)\uC73C\uB85C \uBB38\uC81C\uB97C \uCC98\uB9AC\uD569\uB2C8\uB2E4.
\uBB38\uB9E5\uC740 OCR \uC5D4\uC9C4\uC758 \uCD9C\uB825\uC5D0\uC11C \uAC00\uC838\uC624\uBA70, \uC5EC\uAE30\uC11C\uB294 Google\uC758 Tesseract\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.`),$n=o(),vl=p("p"),Ve=n("\uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uD544\uC694\uD55C \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uBAA8\uB450 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694. LayoutLMv2\uB294 detectron2, torchvision \uBC0F \uD14C\uC11C\uB799\uD2B8\uB97C \uD544\uC694\uB85C \uD569\uB2C8\uB2E4."),Xn=o(),M(As.$$.fragment),Nn=o(),M(Qs.$$.fragment),Gn=o(),M($s.$$.fragment),Fn=o(),Vl=p("p"),ke=n("\uD544\uC694\uD55C \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB4E4\uC744 \uBAA8\uB450 \uC124\uCE58\uD55C \uD6C4 \uB7F0\uD0C0\uC784\uC744 \uB2E4\uC2DC \uC2DC\uC791\uD569\uB2C8\uB2E4."),Bn=o(),kl=p("p"),Re=n(`\uCEE4\uBBA4\uB2C8\uD2F0\uC5D0 \uB2F9\uC2E0\uC758 \uBAA8\uB378\uC744 \uACF5\uC720\uD558\uB294 \uAC83\uC744 \uAD8C\uC7A5\uD569\uB2C8\uB2E4. Hugging Face \uACC4\uC815\uC5D0 \uB85C\uADF8\uC778\uD574\uC11C \uBAA8\uB378\uC744 \u{1F917} Hub\uC5D0 \uC5C5\uB85C\uB4DC\uD558\uC138\uC694.
\uD504\uB86C\uD504\uD2B8\uAC00 \uC2E4\uD589\uB418\uBA74, \uB85C\uADF8\uC778\uC744 \uC704\uD574 \uD1A0\uD070\uC744 \uC785\uB825\uD558\uC138\uC694:`),Wn=o(),M(Xs.$$.fragment),zn=o(),Rl=p("p"),Ze=n("\uBA87 \uAC00\uC9C0 \uC804\uC5ED \uBCC0\uC218\uB97C \uC815\uC758\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),Sn=o(),M(Ns.$$.fragment),qn=o(),H=p("h2"),hs=p("a"),ja=p("span"),M(Gs.$$.fragment),Ae=o(),ha=p("span"),Qe=n("\uB370\uC774\uD130 \uBD88\uB7EC\uC624\uAE30"),Yn=o(),W=p("p"),$e=n(`\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \u{1F917} Hub\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uB294 \uC804\uCC98\uB9AC\uB41C DocVQA\uC758 \uC791\uC740 \uC0D8\uD50C\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.
DocVQA\uC758 \uC804\uCCB4 \uB370\uC774\uD130 \uC138\uD2B8\uB97C \uC0AC\uC6A9\uD558\uACE0 \uC2F6\uB2E4\uBA74, `),Fs=p("a"),Xe=n("DocVQA homepage"),Ne=n("\uC5D0 \uAC00\uC785 \uD6C4 \uB2E4\uC6B4\uB85C\uB4DC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC804\uCCB4 \uB370\uC774\uD130 \uC138\uD2B8\uB97C \uB2E4\uC6B4\uB85C\uB4DC \uD588\uB2E4\uBA74, \uC774 \uAC00\uC774\uB4DC\uB97C \uACC4\uC18D \uC9C4\uD589\uD558\uAE30 \uC704\uD574 "),Bs=p("a"),Ge=n("\u{1F917} dataset\uC5D0 \uD30C\uC77C\uC744 \uAC00\uC838\uC624\uB294 \uBC29\uBC95"),Fe=n("\uC744 \uD655\uC778\uD558\uC138\uC694."),Dn=o(),M(Ws.$$.fragment),On=o(),Zl=p("p"),Be=n("\uBCF4\uC2DC\uB2E4\uC2DC\uD53C, \uB370\uC774\uD130 \uC138\uD2B8\uB294 \uC774\uBBF8 \uD6C8\uB828 \uC138\uD2B8\uC640 \uD14C\uC2A4\uD2B8 \uC138\uD2B8\uB85C \uB098\uB204\uC5B4\uC838 \uC788\uC2B5\uB2C8\uB2E4. \uBB34\uC791\uC704\uB85C \uC608\uC81C\uB97C \uC0B4\uD3B4\uBCF4\uBA74\uC11C \uD2B9\uC131\uC744 \uD655\uC778\uD574\uBCF4\uC138\uC694."),Hn=o(),M(zs.$$.fragment),Ln=o(),Al=p("p"),We=n("\uAC01 \uD544\uB4DC\uAC00 \uB098\uD0C0\uB0B4\uB294 \uB0B4\uC6A9\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4:"),Pn=o(),b=p("ul"),Ql=p("li"),Ma=p("code"),ze=n("id"),Se=n(": \uC608\uC81C\uC758 id"),qe=o(),$l=p("li"),da=p("code"),Ye=n("image"),De=n(": \uBB38\uC11C \uC774\uBBF8\uC9C0\uB97C \uD3EC\uD568\uD558\uB294 PIL.Image.Image \uAC1D\uCCB4"),Oe=o(),Xl=p("li"),Ua=p("code"),He=n("query"),Le=n(": \uC9C8\uBB38 \uBB38\uC790\uC5F4 - \uC5EC\uB7EC \uC5B8\uC5B4\uC758 \uC790\uC5F0\uC5B4\uB85C \uB41C \uC9C8\uBB38"),Pe=o(),Nl=p("li"),ma=p("code"),Ke=n("answers"),sp=n(": \uC0AC\uB78C\uC774 \uC8FC\uC11D\uC744 \uB2E8 \uC815\uB2F5 \uB9AC\uC2A4\uD2B8"),lp=o(),Ms=p("li"),ya=p("code"),ap=n("words"),np=n(" and "),Ja=p("code"),tp=n("bounding_boxes"),ep=n(": OCR\uC758 \uACB0\uACFC\uAC12\uB4E4\uC774\uBA70 \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC744 \uC608\uC815"),pp=o(),Gl=p("li"),xa=p("code"),ip=n("answer"),rp=n(": \uB2E4\uB978 \uBAA8\uB378\uACFC \uC77C\uCE58\uD558\uB294 \uB2F5\uBCC0\uC774\uBA70 \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC744 \uC608\uC815"),Kn=o(),ds=p("p"),cp=n("\uC601\uC5B4\uB85C \uB41C \uC9C8\uBB38\uB9CC \uB0A8\uAE30\uACE0 \uB2E4\uB978 \uBAA8\uB378\uC5D0 \uB300\uD55C \uC608\uCE21\uC744 \uD3EC\uD568\uD558\uB294 "),ga=p("code"),op=n("answer"),jp=n(` \uD2B9\uC131\uC744 \uC0AD\uC81C\uD558\uACA0\uC2B5\uB2C8\uB2E4.
\uADF8\uB9AC\uACE0 \uC8FC\uC11D \uC791\uC131\uC790\uAC00 \uC81C\uACF5\uD55C \uB370\uC774\uD130 \uC138\uD2B8\uC5D0\uC11C \uCCAB \uBC88\uC9F8 \uB2F5\uBCC0\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4. \uB610\uB294 \uBB34\uC791\uC704\uB85C \uC0D8\uD50C\uC744 \uCD94\uCD9C\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.`),st=o(),M(Ss.$$.fragment),lt=o(),Z=p("p"),hp=n("\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 LayoutLMv2 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB294 "),ua=p("code"),Mp=n("max_position_embeddings = 512"),dp=n("\uB85C \uD6C8\uB828\uB418\uC5C8\uC2B5\uB2C8\uB2E4(\uC774 \uC815\uBCF4\uB294 "),L=p("a"),Up=n("\uCCB4\uD06C\uD3EC\uC778\uD2B8\uC758 "),wa=p("code"),mp=n("config.json"),yp=n(" \uD30C\uC77C"),Jp=n(`\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4).
\uBC14\uB85C \uC608\uC81C\uB97C \uC798\uB77C\uB0BC \uC218\uB3C4 \uC788\uC9C0\uB9CC, \uAE34 \uBB38\uC11C\uC758 \uB05D\uC5D0 \uB2F5\uBCC0\uC774 \uC788\uC5B4 \uC798\uB9AC\uB294 \uC0C1\uD669\uC744 \uD53C\uD558\uAE30 \uC704\uD574 \uC5EC\uAE30\uC11C\uB294 \uC784\uBCA0\uB529\uC774 512\uBCF4\uB2E4 \uAE38\uC5B4\uC9C8 \uAC00\uB2A5\uC131\uC774 \uC788\uB294 \uBA87 \uAC00\uC9C0 \uC608\uC81C\uB97C \uC81C\uAC70\uD558\uACA0\uC2B5\uB2C8\uB2E4.
\uB370\uC774\uD130 \uC138\uD2B8\uC5D0 \uC788\uB294 \uB300\uBD80\uBD84\uC758 \uBB38\uC11C\uAC00 \uAE34 \uACBD\uC6B0 \uC2AC\uB77C\uC774\uB529 \uC708\uB3C4\uC6B0 \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4 - \uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uC2F6\uC73C\uBA74 \uC774 `),qs=p("a"),xp=n("\uB178\uD2B8\uBD81"),gp=n("\uC744 \uD655\uC778\uD558\uC138\uC694."),at=o(),M(Ys.$$.fragment),nt=o(),z=p("p"),up=n(`\uC774 \uC2DC\uC810\uC5D0\uC11C \uC774 \uB370\uC774\uD130 \uC138\uD2B8\uC758 OCR \uD2B9\uC131\uB3C4 \uC81C\uAC70\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4. OCR \uD2B9\uC131\uC740 \uB2E4\uB978 \uBAA8\uB378\uC744 \uBBF8\uC138 \uC870\uC815\uD558\uAE30 \uC704\uD55C \uAC83\uC73C\uB85C, \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 \uBAA8\uB378\uC758 \uC785\uB825 \uC694\uAD6C \uC0AC\uD56D\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC5D0 \uC774 \uD2B9\uC131\uC744 \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574\uC11C\uB294 \uC77C\uBD80 \uCC98\uB9AC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
\uB300\uC2E0, \uC6D0\uBCF8 \uB370\uC774\uD130\uC5D0 `),fa=p("code"),wp=n("LayoutLMv2Processor"),fp=n(`\uB97C \uC0AC\uC6A9\uD558\uC5EC OCR \uBC0F \uD1A0\uD070\uD654\uB97C \uBAA8\uB450 \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC774\uB807\uAC8C \uD558\uBA74 \uBAA8\uB378\uC774 \uC694\uAD6C\uD558\uB294 \uC785\uB825\uC744 \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC774\uBBF8\uC9C0\uB97C \uC218\uB3D9\uC73C\uB85C \uCC98\uB9AC\uD558\uB824\uBA74, `),Ds=p("a"),Ta=p("code"),Tp=n("LayoutLMv2"),bp=n(" model documentation"),Cp=n("\uC5D0\uC11C \uBAA8\uB378\uC774 \uC694\uAD6C\uD558\uB294 \uC785\uB825 \uD3EC\uB9F7\uC744 \uD655\uC778\uD574\uBCF4\uC138\uC694."),tt=o(),M(Os.$$.fragment),et=o(),Fl=p("p"),_p=n("\uB9C8\uC9C0\uB9C9\uC73C\uB85C, \uB370\uC774\uD130 \uD0D0\uC0C9\uC744 \uC644\uB8CC\uD558\uAE30 \uC704\uD574 \uC774\uBBF8\uC9C0 \uC608\uC2DC\uB97C \uC0B4\uD3B4\uBD05\uC2DC\uB2E4."),pt=o(),M(Hs.$$.fragment),it=o(),Ls=p("div"),Bl=p("img"),rt=o(),P=p("h2"),Us=p("a"),ba=p("span"),M(Ps.$$.fragment),Ip=o(),Ca=p("span"),Ep=n("\uB370\uC774\uD130 \uC804\uCC98\uB9AC"),ct=o(),ms=p("p"),vp=n(`\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5 \uD0DC\uC2A4\uD06C\uB294 \uBA40\uD2F0\uBAA8\uB2EC \uD0DC\uC2A4\uD06C\uC774\uBA70, \uAC01 \uBAA8\uB2EC\uB9AC\uD2F0\uC758 \uC785\uB825\uC774 \uBAA8\uB378\uC758 \uC694\uAD6C\uC5D0 \uB9DE\uAC8C \uC804\uCC98\uB9AC \uB418\uC5C8\uB294\uC9C0 \uD655\uC778\uD574\uC57C \uD569\uB2C8\uB2E4.
\uC774\uBBF8\uC9C0 \uB370\uC774\uD130\uB97C \uCC98\uB9AC\uD560 \uC218 \uC788\uB294 \uC774\uBBF8\uC9C0 \uD504\uB85C\uC138\uC11C\uC640 \uD14D\uC2A4\uD2B8 \uB370\uC774\uD130\uB97C \uC778\uCF54\uB529\uD560 \uC218 \uC788\uB294 \uD1A0\uD06C\uB098\uC774\uC800\uB97C \uACB0\uD569\uD55C `),_a=p("code"),Vp=n("LayoutLMv2Processor"),kp=n("\uB97C \uAC00\uC838\uC624\uB294 \uAC83\uBD80\uD130 \uC2DC\uC791\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),ot=o(),M(Ks.$$.fragment),jt=o(),K=p("h3"),ys=p("a"),Ia=p("span"),M(sl.$$.fragment),Rp=o(),Ea=p("span"),Zp=n("\uBB38\uC11C \uC774\uBBF8\uC9C0 \uC804\uCC98\uB9AC"),ht=o(),Js=p("p"),Ap=n("\uBA3C\uC800, \uD504\uB85C\uC138\uC11C\uC758 "),va=p("code"),Qp=n("image_processor"),$p=n(`\uB97C \uC0AC\uC6A9\uD574 \uBAA8\uB378\uC5D0 \uB300\uD55C \uBB38\uC11C \uC774\uBBF8\uC9C0\uB97C \uC900\uBE44\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4.
\uAE30\uBCF8\uAC12\uC73C\uB85C, \uC774\uBBF8\uC9C0 \uD504\uB85C\uC138\uC11C\uB294 \uC774\uBBF8\uC9C0 \uD06C\uAE30\uB97C 224x224\uB85C \uC870\uC815\uD558\uACE0 \uC0C9\uC0C1 \uCC44\uB110\uC758 \uC21C\uC11C\uAC00 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD55C \uD6C4 \uB2E8\uC5B4\uC640 \uC815\uADDC\uD654\uB41C \uBC14\uC6B4\uB529 \uBC15\uC2A4\uB97C \uC5BB\uAE30 \uC704\uD574 \uD14C\uC11C\uB799\uD2B8\uB97C \uC0AC\uC6A9\uD574 OCR\uB97C \uC801\uC6A9\uD569\uB2C8\uB2E4.
\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C \uC6B0\uB9AC\uAC00 \uD544\uC694\uD55C \uAC83\uACFC \uAE30\uBCF8\uAC12\uC740 \uC644\uC804\uD788 \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uC774\uBBF8\uC9C0 \uBC30\uCE58\uC5D0 \uAE30\uBCF8 \uC774\uBBF8\uC9C0 \uCC98\uB9AC\uB97C \uC801\uC6A9\uD558\uACE0 OCR\uC758 \uACB0\uACFC\uB97C \uBCC0\uD658\uD558\uB294 \uD568\uC218\uB97C \uC791\uC131\uD569\uB2C8\uB2E4.`),Mt=o(),M(ll.$$.fragment),dt=o(),xs=p("p"),Xp=n("\uC774 \uC804\uCC98\uB9AC\uB97C \uB370\uC774\uD130 \uC138\uD2B8 \uC804\uCCB4\uC5D0 \uBE60\uB974\uAC8C \uC801\uC6A9\uD558\uB824\uBA74 "),Va=p("code"),Np=n("map"),Gp=n("\uB97C \uC0AC\uC6A9\uD558\uC138\uC694."),Ut=o(),M(al.$$.fragment),mt=o(),ss=p("h3"),gs=p("a"),ka=p("span"),M(nl.$$.fragment),Fp=o(),Ra=p("span"),Bp=n("\uD14D\uC2A4\uD2B8 \uB370\uC774\uD130 \uC804\uCC98\uB9AC"),yt=o(),C=p("p"),Wp=n(`\uC774\uBBF8\uC9C0\uC5D0 OCR\uC744 \uC801\uC6A9\uD588\uC73C\uBA74 \uB370\uC774\uD130 \uC138\uD2B8\uC758 \uD14D\uC2A4\uD2B8 \uBD80\uBD84\uC744 \uBAA8\uB378\uC5D0 \uB9DE\uAC8C \uC778\uCF54\uB529\uD574\uC57C \uD569\uB2C8\uB2E4.
\uC774 \uC778\uCF54\uB529\uC5D0\uB294 \uC774\uC804 \uB2E8\uACC4\uC5D0\uC11C \uAC00\uC838\uC628 \uB2E8\uC5B4\uC640 \uBC15\uC2A4\uB97C \uD1A0\uD070 \uC218\uC900\uC758 `),Za=p("code"),zp=n("input_ids"),Sp=n(", "),Aa=p("code"),qp=n("attention_mask"),Yp=n(", "),Qa=p("code"),Dp=n("token_type_ids"),Op=n(" \uBC0F "),$a=p("code"),Hp=n("bbox"),Lp=n(`\uB85C \uBCC0\uD658\uD558\uB294 \uC791\uC5C5\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4.
\uD14D\uC2A4\uD2B8\uB97C \uC804\uCC98\uB9AC\uD558\uB824\uBA74 \uD504\uB85C\uC138\uC11C\uC758 `),Xa=p("code"),Pp=n("tokenizer"),Kp=n("\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),Jt=o(),M(tl.$$.fragment),xt=o(),A=p("p"),si=n("\uC704\uC5D0\uC11C \uC5B8\uAE09\uD55C \uC804\uCC98\uB9AC \uC678\uC5D0\uB3C4 \uBAA8\uB378\uC744 \uC704\uD574 \uB808\uC774\uBE14\uC744 \uCD94\uAC00\uD574\uC57C \uD569\uB2C8\uB2E4. \u{1F917} Transformers\uC758 "),Na=p("code"),li=n("xxxForQuestionAnswering"),ai=n(" \uBAA8\uB378\uC758 \uACBD\uC6B0, \uB808\uC774\uBE14\uC740 "),Ga=p("code"),ni=n("start_positions"),ti=n("\uC640 "),Fa=p("code"),ei=n("end_positions"),pi=n("\uB85C \uAD6C\uC131\uB418\uBA70 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uB2F5\uBCC0\uC758 \uC2DC\uC791\uACFC \uB05D\uC5D0 \uC788\uB294\uC9C0\uB97C \uB098\uD0C0\uB0C5\uB2C8\uB2E4."),gt=o(),Wl=p("p"),ii=n("\uB808\uC774\uBE14 \uCD94\uAC00\uB97C \uC704\uD574\uC11C, \uBA3C\uC800 \uB354 \uD070 \uB9AC\uC2A4\uD2B8(\uB2E8\uC5B4 \uB9AC\uC2A4\uD2B8)\uC5D0\uC11C \uD558\uC704 \uB9AC\uC2A4\uD2B8(\uB2E8\uC5B4\uB85C \uBD84\uD560\uB41C \uB2F5\uBCC0)\uC744 \uCC3E\uC744 \uC218 \uC788\uB294 \uD5EC\uD37C \uD568\uC218\uB97C \uC815\uC758\uD569\uB2C8\uB2E4."),ut=o(),g=p("p"),ri=n("\uC774 \uD568\uC218\uB294 "),Ba=p("code"),ci=n("words_list"),oi=n("\uC640 "),Wa=p("code"),ji=n("answer_list"),hi=n(`, \uC774\uB807\uAC8C \uB450 \uB9AC\uC2A4\uD2B8\uB97C \uC785\uB825\uC73C\uB85C \uBC1B\uC2B5\uB2C8\uB2E4.
\uADF8\uB7F0 \uB2E4\uC74C `),za=p("code"),Mi=n("words_list"),di=n("\uB97C \uBC18\uBCF5\uD558\uC5EC "),Sa=p("code"),Ui=n("words_list"),mi=n("\uC758 \uD604\uC7AC \uB2E8\uC5B4(words_list[i])\uAC00 "),qa=p("code"),yi=n("answer_list"),Ji=n(`\uC758 \uCCAB \uBC88\uC9F8 \uB2E8\uC5B4(answer_list[0])\uC640 \uAC19\uC740\uC9C0,
\uD604\uC7AC \uB2E8\uC5B4\uC5D0\uC11C \uC2DC\uC791\uD574 `),Ya=p("code"),xi=n("answer_list"),gi=n("\uC640 \uAC19\uC740 \uAE38\uC774\uB9CC\uD07C\uC758 "),Da=p("code"),ui=n("words_list"),wi=n("\uC758 \uD558\uC704 \uB9AC\uC2A4\uD2B8\uAC00 "),Oa=p("code"),fi=n("answer_list"),Ti=n(`\uC640 \uC77C\uCE58\uD558\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4.
\uC774 \uC870\uAC74\uC774 \uCC38\uC774\uB77C\uBA74 \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC744 \uBC1C\uACAC\uD588\uC74C\uC744 \uC758\uBBF8\uD558\uBA70, \uD568\uC218\uB294 \uC77C\uCE58 \uD56D\uBAA9, \uC2DC\uC791 \uC778\uB371\uC2A4(idx) \uBC0F \uC885\uB8CC \uC778\uB371\uC2A4(idx + len(answer_list) - 1)\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4. \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uB450 \uAC1C \uC774\uC0C1 \uBC1C\uACAC\uB418\uBA74 \uD568\uC218\uB294 \uCCAB \uBC88\uC9F8 \uD56D\uBAA9\uB9CC \uBC18\uD658\uD569\uB2C8\uB2E4. \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uC5C6\uB2E4\uBA74 \uD568\uC218\uB294 (`),Ha=p("code"),bi=n("None"),Ci=n(", 0, 0)\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4."),wt=o(),M(el.$$.fragment),ft=o(),zl=p("p"),_i=n("\uC774 \uD568\uC218\uAC00 \uC5B4\uB5BB\uAC8C \uC815\uB2F5\uC758 \uC704\uCE58\uB97C \uCC3E\uB294\uC9C0 \uC124\uBA85\uD558\uAE30 \uC704\uD574 \uB2E4\uC74C \uC608\uC81C\uC5D0\uC11C \uD568\uC218\uB97C \uC0AC\uC6A9\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),Tt=o(),M(pl.$$.fragment),bt=o(),Sl=p("p"),Ii=n("\uD55C\uD3B8, \uC704 \uC608\uC81C\uAC00 \uC778\uCF54\uB529\uB418\uBA74 \uB2E4\uC74C\uACFC \uAC19\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4:"),Ct=o(),M(il.$$.fragment),_t=o(),ql=p("p"),Ei=n("\uC774\uC81C \uC778\uCF54\uB529\uB41C \uC785\uB825\uC5D0\uC11C \uC815\uB2F5\uC758 \uC704\uCE58\uB97C \uCC3E\uC544\uC57C \uD569\uB2C8\uB2E4."),It=o(),S=p("ul"),Yl=p("li"),La=p("code"),vi=n("token_type_ids"),Vi=n("\uB294 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uC9C8\uBB38\uC5D0 \uC18D\uD558\uB294\uC9C0, \uADF8\uB9AC\uACE0 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uBB38\uC11C\uC758 \uB2E8\uC5B4\uC5D0 \uD3EC\uD568\uB418\uB294\uC9C0\uB97C \uC54C\uB824\uC90D\uB2C8\uB2E4."),ki=o(),Dl=p("li"),Pa=p("code"),Ri=n("tokenizer.cls_token_id"),Zi=n(" \uC785\uB825\uC758 \uC2DC\uC791 \uBD80\uBD84\uC5D0 \uC788\uB294 \uD2B9\uC218 \uD1A0\uD070\uC744 \uCC3E\uB294 \uB370 \uB3C4\uC6C0\uC744 \uC90D\uB2C8\uB2E4."),Ai=o(),us=p("li"),Ka=p("code"),Qi=n("word_ids"),$i=n("\uB294 \uC6D0\uBCF8 "),sn=p("code"),Xi=n("words"),Ni=n("\uC5D0\uC11C \uCC3E\uC740 \uB2F5\uBCC0\uC744 \uC804\uCCB4 \uC778\uCF54\uB529\uB41C \uC785\uB825\uC758 \uB3D9\uC77C\uD55C \uB2F5\uACFC \uC77C\uCE58\uC2DC\uD0A4\uACE0 \uC778\uCF54\uB529\uB41C \uC785\uB825\uC5D0\uC11C \uB2F5\uBCC0\uC758 \uC2DC\uC791/\uB05D \uC704\uCE58\uB97C \uACB0\uC815\uD569\uB2C8\uB2E4."),Et=o(),Ol=p("p"),Gi=n("\uC704 \uB0B4\uC6A9\uB4E4\uC744 \uC5FC\uB450\uC5D0 \uB450\uACE0 \uB370\uC774\uD130 \uC138\uD2B8 \uC608\uC81C\uC758 \uBC30\uCE58\uB97C \uC778\uCF54\uB529\uD558\uB294 \uD568\uC218\uB97C \uB9CC\uB4E4\uC5B4 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),vt=o(),M(rl.$$.fragment),Vt=o(),Hl=p("p"),Fi=n("\uC774\uC81C \uC774 \uC804\uCC98\uB9AC \uD568\uC218\uAC00 \uC788\uC73C\uB2C8 \uC804\uCCB4 \uB370\uC774\uD130 \uC138\uD2B8\uB97C \uC778\uCF54\uB529\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),kt=o(),M(cl.$$.fragment),Rt=o(),Ll=p("p"),Bi=n("\uC778\uCF54\uB529\uB41C \uB370\uC774\uD130 \uC138\uD2B8\uC758 \uD2B9\uC131\uC774 \uC5B4\uB5BB\uAC8C \uC0DD\uACBC\uB294\uC9C0 \uD655\uC778\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),Zt=o(),M(ol.$$.fragment),At=o(),ls=p("h2"),ws=p("a"),ln=p("span"),M(jl.$$.fragment),Wi=o(),an=p("span"),zi=n("\uD3C9\uAC00"),Qt=o(),q=p("p"),Si=n(`\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5\uC744 \uD3C9\uAC00\uD558\uB824\uBA74 \uC0C1\uB2F9\uD55C \uC591\uC758 \uD6C4\uCC98\uB9AC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC2DC\uAC04\uC774 \uB108\uBB34 \uB9CE\uC774 \uAC78\uB9AC\uC9C0 \uC54A\uB3C4\uB85D \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uD3C9\uAC00 \uB2E8\uACC4\uB97C \uC0DD\uB7B5\uD569\uB2C8\uB2E4.
`),nn=p("code"),qi=n("Trainer"),Yi=n(`\uAC00 \uD6C8\uB828 \uACFC\uC815\uC5D0\uC11C \uD3C9\uAC00 \uC190\uC2E4(evaluation loss)\uC744 \uACC4\uC18D \uACC4\uC0B0\uD558\uAE30 \uB54C\uBB38\uC5D0 \uBAA8\uB378\uC758 \uC131\uB2A5\uC744 \uB300\uB7B5\uC801\uC73C\uB85C \uC54C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uCD94\uCD9C\uC801(Extractive) \uC9C8\uC758 \uC751\uB2F5\uC740 \uBCF4\uD1B5 F1/exact match \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD574 \uD3C9\uAC00\uB429\uB2C8\uB2E4.
\uC9C1\uC811 \uAD6C\uD604\uD574\uBCF4\uACE0 \uC2F6\uC73C\uC2DC\uB2E4\uBA74, Hugging Face course\uC758 `),hl=p("a"),Di=n("Question Answering chapter"),Oi=n("\uC744 \uCC38\uACE0\uD558\uC138\uC694."),$t=o(),as=p("h2"),fs=p("a"),tn=p("span"),M(Ml.$$.fragment),Hi=o(),en=p("span"),Li=n("\uD6C8\uB828"),Xt=o(),Pl=p("p"),Pi=n(`\uCD95\uD558\uD569\uB2C8\uB2E4! \uC774 \uAC00\uC774\uB4DC\uC758 \uAC00\uC7A5 \uC5B4\uB824\uC6B4 \uBD80\uBD84\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uCC98\uB9AC\uD588\uC73C\uB2C8 \uC774\uC81C \uB098\uB9CC\uC758 \uBAA8\uB378\uC744 \uD6C8\uB828\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4.
\uD6C8\uB828\uC740 \uB2E4\uC74C\uACFC \uAC19\uC740 \uB2E8\uACC4\uB85C \uC774\uB8E8\uC5B4\uC838 \uC788\uC2B5\uB2C8\uB2E4:`),Nt=o(),v=p("ul"),dl=p("li"),Ki=n("\uC804\uCC98\uB9AC\uC5D0\uC11C\uC758 \uB3D9\uC77C\uD55C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574 "),pn=p("code"),sr=n("AutoModelForDocumentQuestionAnswering"),lr=n("\uC73C\uB85C \uBAA8\uB378\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4."),ar=o(),Kl=p("li"),rn=p("code"),nr=n("TrainingArguments"),tr=n("\uB85C \uD6C8\uB828 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC815\uD569\uB2C8\uB2E4."),er=o(),Ul=p("li"),pr=n("\uC608\uC81C\uB97C \uBC30\uCE58 \uCC98\uB9AC\uD558\uB294 \uD568\uC218\uB97C \uC815\uC758\uD569\uB2C8\uB2E4. \uC5EC\uAE30\uC11C\uB294 "),cn=p("code"),ir=n("DefaultDataCollator"),rr=n("\uAC00 \uC801\uB2F9\uD569\uB2C8\uB2E4."),cr=o(),ml=p("li"),or=n("\uBAA8\uB378, \uB370\uC774\uD130 \uC138\uD2B8, \uB370\uC774\uD130 \uCF5C\uB808\uC774\uD130(Data collator)\uC640 \uD568\uAED8 "),on=p("code"),jr=n("Trainer"),hr=n("\uC5D0 \uD6C8\uB828 \uC778\uC218\uB4E4\uC744 \uC804\uB2EC\uD569\uB2C8\uB2E4."),Mr=o(),sa=p("li"),jn=p("code"),dr=n("train()"),Ur=n("\uC744 \uD638\uCD9C\uD574\uC11C \uBAA8\uB378\uC744 \uBBF8\uC138 \uC870\uC815\uD569\uB2C8\uB2E4."),Gt=o(),M(yl.$$.fragment),Ft=o(),_=p("p"),hn=p("code"),mr=n("TrainingArguments"),yr=n("\uC5D0\uC11C "),Mn=p("code"),Jr=n("output_dir"),xr=n(`\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uC800\uC7A5\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD558\uACE0, \uC801\uC808\uD55C \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.
\uBAA8\uB378\uC744 \uCEE4\uBBA4\uB2C8\uD2F0\uC640 \uACF5\uC720\uD558\uB824\uBA74 `),dn=p("code"),gr=n("push_to_hub"),ur=n("\uB97C "),Un=p("code"),wr=n("True"),fr=n(`\uB85C \uC124\uC815\uD558\uC138\uC694 (\uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uB824\uBA74 Hugging Face\uC5D0 \uB85C\uADF8\uC778\uD574\uC57C \uD569\uB2C8\uB2E4).
\uC774 \uACBD\uC6B0 `),mn=p("code"),Tr=n("output_dir"),br=n("\uC740 \uBAA8\uB378\uC758 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uD478\uC2DC\uD560 \uB808\uD3EC\uC9C0\uD1A0\uB9AC\uC758 \uC774\uB984\uC774 \uB429\uB2C8\uB2E4."),Bt=o(),M(Jl.$$.fragment),Wt=o(),la=p("p"),Cr=n("\uAC04\uB2E8\uD55C \uB370\uC774\uD130 \uCF5C\uB808\uC774\uD130\uB97C \uC815\uC758\uD558\uC5EC \uC608\uC81C\uB97C \uD568\uAED8 \uBC30\uCE58\uD569\uB2C8\uB2E4."),zt=o(),M(xl.$$.fragment),St=o(),Ts=p("p"),_r=n("\uB9C8\uC9C0\uB9C9\uC73C\uB85C, \uBAA8\uB4E0 \uAC83\uC744 \uD55C \uACF3\uC5D0 \uBAA8\uC544 "),yn=p("code"),Ir=n("train()"),Er=n("\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4:"),qt=o(),M(gl.$$.fragment),Yt=o(),bs=p("p"),vr=n("\uCD5C\uC885 \uBAA8\uB378\uC744 \u{1F917} Hub\uC5D0 \uCD94\uAC00\uD558\uB824\uBA74, \uBAA8\uB378 \uCE74\uB4DC\uB97C \uC0DD\uC131\uD558\uACE0 "),Jn=p("code"),Vr=n("push_to_hub"),kr=n("\uB97C \uD638\uCD9C\uD569\uB2C8\uB2E4:"),Dt=o(),M(ul.$$.fragment),Ot=o(),ns=p("h2"),Cs=p("a"),xn=p("span"),M(wl.$$.fragment),Rr=o(),gn=p("span"),Zr=n("\uCD94\uB860"),Ht=o(),_s=p("p"),Ar=n(`\uC774\uC81C LayoutLMv2 \uBAA8\uB378\uC744 \uBBF8\uC138 \uC870\uC815\uD558\uACE0 \u{1F917} Hub\uC5D0 \uC5C5\uB85C\uB4DC\uD588\uC73C\uB2C8 \uCD94\uB860\uC5D0\uB3C4 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uCD94\uB860\uC744 \uC704\uD574 \uBBF8\uC138 \uC870\uC815\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uB294 \uAC00\uC7A5 \uAC04\uB2E8\uD55C \uBC29\uBC95\uC740 `),un=p("code"),Qr=n("Pipeline"),$r=n("\uC744 \uC0AC\uC6A9\uD558\uB294 \uAC83 \uC785\uB2C8\uB2E4."),Lt=o(),aa=p("p"),Xr=n("\uC608\uB97C \uB4E4\uC5B4 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),Pt=o(),M(fl.$$.fragment),Kt=o(),na=p("p"),Nr=n("\uADF8 \uB2E4\uC74C, \uBAA8\uB378\uB85C \uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5\uC744 \uD558\uAE30 \uC704\uD574 \uD30C\uC774\uD504\uB77C\uC778\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD558\uACE0 \uC774\uBBF8\uC9C0 + \uC9C8\uBB38 \uC870\uD569\uC744 \uC804\uB2EC\uD569\uB2C8\uB2E4."),se=o(),M(Tl.$$.fragment),le=o(),ta=p("p"),Gr=n("\uC6D0\uD55C\uB2E4\uBA74 \uD30C\uC774\uD504\uB77C\uC778\uC758 \uACB0\uACFC\uB97C \uC218\uB3D9\uC73C\uB85C \uBCF5\uC81C\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4:"),ae=o(),V=p("ol"),wn=p("li"),Fr=n("\uC774\uBBF8\uC9C0\uC640 \uC9C8\uBB38\uC744 \uAC00\uC838\uC640 \uBAA8\uB378\uC758 \uD504\uB85C\uC138\uC11C\uB97C \uC0AC\uC6A9\uD574 \uBAA8\uB378\uC5D0 \uB9DE\uAC8C \uC900\uBE44\uD569\uB2C8\uB2E4."),Br=o(),fn=p("li"),Wr=n("\uBAA8\uB378\uC744 \uD1B5\uD574 \uACB0\uACFC \uB610\uB294 \uC804\uCC98\uB9AC\uB97C \uC804\uB2EC\uD569\uB2C8\uB2E4."),zr=o(),ts=p("li"),Sr=n("\uBAA8\uB378\uC740 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uB2F5\uBCC0\uC758 \uC2DC\uC791\uC5D0 \uC788\uB294\uC9C0, \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uB2F5\uBCC0\uC774 \uB05D\uC5D0 \uC788\uB294\uC9C0\uB97C \uB098\uD0C0\uB0B4\uB294 "),Tn=p("code"),qr=n("start_logits"),Yr=n("\uC640 "),bn=p("code"),Dr=n("end_logits"),Or=n("\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4. \uB458 \uB2E4 (batch_size, sequence_length) \uD615\uD0DC\uB97C \uAC16\uC2B5\uB2C8\uB2E4."),Hr=o(),Q=p("li"),Cn=p("code"),Lr=n("start_logits"),Pr=n("\uC640 "),_n=p("code"),Kr=n("end_logits"),sc=n("\uC758 \uB9C8\uC9C0\uB9C9 \uCC28\uC6D0\uC744 \uCD5C\uB300\uB85C \uB9CC\uB4DC\uB294 \uAC12\uC744 \uCC3E\uC544 \uC608\uC0C1 "),In=p("code"),lc=n("start_idx"),ac=n("\uC640 "),En=p("code"),nc=n("end_idx"),tc=n("\uB97C \uC5BB\uC2B5\uB2C8\uB2E4."),ec=o(),vn=p("li"),pc=n("\uD1A0\uD06C\uB098\uC774\uC800\uB85C \uB2F5\uBCC0\uC744 \uB514\uCF54\uB529\uD569\uB2C8\uB2E4."),ne=o(),M(bl.$$.fragment),this.h()},l(s){const e=_2('[data-svelte="svelte-1phssyn"]',document.head);T=i(e,"META",{name:!0,content:!0}),e.forEach(a),ps=j(s),I=i(s,"H1",{class:!0});var Cl=r(I);w=i(Cl,"A",{id:!0,class:!0,href:!0});var Jc=r(w);k=i(Jc,"SPAN",{});var xc=r(k);d(N.$$.fragment,xc),xc.forEach(a),Jc.forEach(a),Vs=j(Cl),R=i(Cl,"SPAN",{});var gc=r(R);ks=t(gc,"\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5(Document Question Answering)"),gc.forEach(a),Cl.forEach(a),is=j(s),d(E.$$.fragment,s),rs=j(s),f=i(s,"P",{});var uc=r(f);B=t(uc,`\uBB38\uC11C \uC2DC\uAC01\uC801 \uC9C8\uC758 \uC751\uB2F5(Document Visual Question Answering)\uC774\uB77C\uACE0\uB3C4 \uD558\uB294
\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5(Document Question Answering)\uC740 \uBB38\uC11C \uC774\uBBF8\uC9C0\uC5D0 \uB300\uD55C \uC9C8\uBB38\uC5D0 \uB2F5\uBCC0\uC744 \uC8FC\uB294 \uD0DC\uC2A4\uD06C\uC785\uB2C8\uB2E4.
\uC774 \uD0DC\uC2A4\uD06C\uB97C \uC9C0\uC6D0\uD558\uB294 \uBAA8\uB378\uC758 \uC785\uB825\uC740 \uC77C\uBC18\uC801\uC73C\uB85C \uC774\uBBF8\uC9C0\uC640 \uC9C8\uBB38\uC758 \uC870\uD569\uC774\uACE0, \uCD9C\uB825\uC740 \uC790\uC5F0\uC5B4\uB85C \uB41C \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uBAA8\uB378\uC740 \uD14D\uC2A4\uD2B8, \uB2E8\uC5B4\uC758 \uC704\uCE58(\uBC14\uC6B4\uB529 \uBC15\uC2A4), \uC774\uBBF8\uC9C0 \uB4F1 \uB2E4\uC591\uD55C \uBAA8\uB2EC\uB9AC\uD2F0\uB97C \uD65C\uC6A9\uD569\uB2C8\uB2E4.`),uc.forEach(a),G=j(s),O=i(s,"P",{});var wc=r(O);_l=t(wc,"\uC774 \uAC00\uC774\uB4DC\uB294 \uB2E4\uC74C \uB0B4\uC6A9\uC744 \uC124\uBA85\uD569\uB2C8\uB2E4:"),wc.forEach(a),Rs=j(s),cs=i(s,"UL",{});var ee=r(cs);os=i(ee,"LI",{});var Vn=r(os);Zs=i(Vn,"A",{href:!0,rel:!0});var fc=r(Zs);Te=t(fc,"DocVQA dataset"),fc.forEach(a),be=t(Vn,"\uC744 \uC0AC\uC6A9\uD574 "),Il=i(Vn,"A",{href:!0});var Tc=r(Il);Ce=t(Tc,"LayoutLMv2"),Tc.forEach(a),_e=t(Vn," \uBBF8\uC138 \uC870\uC815\uD558\uAE30"),Vn.forEach(a),Ie=j(ee),oa=i(ee,"LI",{});var bc=r(oa);Ee=t(bc,"\uCD94\uB860\uC744 \uC704\uD574 \uBBF8\uC138 \uC870\uC815\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uAE30"),bc.forEach(a),ee.forEach(a),An=j(s),d(js.$$.fragment,s),Qn=j(s),El=i(s,"P",{});var Cc=r(El);ve=t(Cc,`LayoutLMv2\uB294 \uD1A0\uD070\uC758 \uB9C8\uC9C0\uB9C9 \uC740\uB2C9\uCE35 \uC704\uC5D0 \uC9C8\uC758 \uC751\uB2F5 \uD5E4\uB4DC\uB97C \uCD94\uAC00\uD574 \uB2F5\uBCC0\uC758 \uC2DC\uC791 \uD1A0\uD070\uACFC \uB05D \uD1A0\uD070\uC758 \uC704\uCE58\uB97C \uC608\uCE21\uD568\uC73C\uB85C\uC368 \uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5 \uD0DC\uC2A4\uD06C\uB97C \uD574\uACB0\uD569\uB2C8\uB2E4. \uC989, \uBB38\uB9E5\uC774 \uC8FC\uC5B4\uC84C\uC744 \uB54C \uC9C8\uBB38\uC5D0 \uB2F5\uD558\uB294 \uC815\uBCF4\uB97C \uCD94\uCD9C\uD558\uB294 \uCD94\uCD9C\uD615 \uC9C8\uC758 \uC751\uB2F5(Extractive question answering)\uC73C\uB85C \uBB38\uC81C\uB97C \uCC98\uB9AC\uD569\uB2C8\uB2E4.
\uBB38\uB9E5\uC740 OCR \uC5D4\uC9C4\uC758 \uCD9C\uB825\uC5D0\uC11C \uAC00\uC838\uC624\uBA70, \uC5EC\uAE30\uC11C\uB294 Google\uC758 Tesseract\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.`),Cc.forEach(a),$n=j(s),vl=i(s,"P",{});var _c=r(vl);Ve=t(_c,"\uC2DC\uC791\uD558\uAE30 \uC804\uC5D0 \uD544\uC694\uD55C \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uBAA8\uB450 \uC124\uCE58\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694. LayoutLMv2\uB294 detectron2, torchvision \uBC0F \uD14C\uC11C\uB799\uD2B8\uB97C \uD544\uC694\uB85C \uD569\uB2C8\uB2E4."),_c.forEach(a),Xn=j(s),d(As.$$.fragment,s),Nn=j(s),d(Qs.$$.fragment,s),Gn=j(s),d($s.$$.fragment,s),Fn=j(s),Vl=i(s,"P",{});var Ic=r(Vl);ke=t(Ic,"\uD544\uC694\uD55C \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB4E4\uC744 \uBAA8\uB450 \uC124\uCE58\uD55C \uD6C4 \uB7F0\uD0C0\uC784\uC744 \uB2E4\uC2DC \uC2DC\uC791\uD569\uB2C8\uB2E4."),Ic.forEach(a),Bn=j(s),kl=i(s,"P",{});var Ec=r(kl);Re=t(Ec,`\uCEE4\uBBA4\uB2C8\uD2F0\uC5D0 \uB2F9\uC2E0\uC758 \uBAA8\uB378\uC744 \uACF5\uC720\uD558\uB294 \uAC83\uC744 \uAD8C\uC7A5\uD569\uB2C8\uB2E4. Hugging Face \uACC4\uC815\uC5D0 \uB85C\uADF8\uC778\uD574\uC11C \uBAA8\uB378\uC744 \u{1F917} Hub\uC5D0 \uC5C5\uB85C\uB4DC\uD558\uC138\uC694.
\uD504\uB86C\uD504\uD2B8\uAC00 \uC2E4\uD589\uB418\uBA74, \uB85C\uADF8\uC778\uC744 \uC704\uD574 \uD1A0\uD070\uC744 \uC785\uB825\uD558\uC138\uC694:`),Ec.forEach(a),Wn=j(s),d(Xs.$$.fragment,s),zn=j(s),Rl=i(s,"P",{});var vc=r(Rl);Ze=t(vc,"\uBA87 \uAC00\uC9C0 \uC804\uC5ED \uBCC0\uC218\uB97C \uC815\uC758\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),vc.forEach(a),Sn=j(s),d(Ns.$$.fragment,s),qn=j(s),H=i(s,"H2",{class:!0});var pe=r(H);hs=i(pe,"A",{id:!0,class:!0,href:!0});var Vc=r(hs);ja=i(Vc,"SPAN",{});var kc=r(ja);d(Gs.$$.fragment,kc),kc.forEach(a),Vc.forEach(a),Ae=j(pe),ha=i(pe,"SPAN",{});var Rc=r(ha);Qe=t(Rc,"\uB370\uC774\uD130 \uBD88\uB7EC\uC624\uAE30"),Rc.forEach(a),pe.forEach(a),Yn=j(s),W=i(s,"P",{});var ea=r(W);$e=t(ea,`\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \u{1F917} Hub\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC788\uB294 \uC804\uCC98\uB9AC\uB41C DocVQA\uC758 \uC791\uC740 \uC0D8\uD50C\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.
DocVQA\uC758 \uC804\uCCB4 \uB370\uC774\uD130 \uC138\uD2B8\uB97C \uC0AC\uC6A9\uD558\uACE0 \uC2F6\uB2E4\uBA74, `),Fs=i(ea,"A",{href:!0,rel:!0});var Zc=r(Fs);Xe=t(Zc,"DocVQA homepage"),Zc.forEach(a),Ne=t(ea,"\uC5D0 \uAC00\uC785 \uD6C4 \uB2E4\uC6B4\uB85C\uB4DC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC804\uCCB4 \uB370\uC774\uD130 \uC138\uD2B8\uB97C \uB2E4\uC6B4\uB85C\uB4DC \uD588\uB2E4\uBA74, \uC774 \uAC00\uC774\uB4DC\uB97C \uACC4\uC18D \uC9C4\uD589\uD558\uAE30 \uC704\uD574 "),Bs=i(ea,"A",{href:!0,rel:!0});var Ac=r(Bs);Ge=t(Ac,"\u{1F917} dataset\uC5D0 \uD30C\uC77C\uC744 \uAC00\uC838\uC624\uB294 \uBC29\uBC95"),Ac.forEach(a),Fe=t(ea,"\uC744 \uD655\uC778\uD558\uC138\uC694."),ea.forEach(a),Dn=j(s),d(Ws.$$.fragment,s),On=j(s),Zl=i(s,"P",{});var Qc=r(Zl);Be=t(Qc,"\uBCF4\uC2DC\uB2E4\uC2DC\uD53C, \uB370\uC774\uD130 \uC138\uD2B8\uB294 \uC774\uBBF8 \uD6C8\uB828 \uC138\uD2B8\uC640 \uD14C\uC2A4\uD2B8 \uC138\uD2B8\uB85C \uB098\uB204\uC5B4\uC838 \uC788\uC2B5\uB2C8\uB2E4. \uBB34\uC791\uC704\uB85C \uC608\uC81C\uB97C \uC0B4\uD3B4\uBCF4\uBA74\uC11C \uD2B9\uC131\uC744 \uD655\uC778\uD574\uBCF4\uC138\uC694."),Qc.forEach(a),Hn=j(s),d(zs.$$.fragment,s),Ln=j(s),Al=i(s,"P",{});var $c=r(Al);We=t($c,"\uAC01 \uD544\uB4DC\uAC00 \uB098\uD0C0\uB0B4\uB294 \uB0B4\uC6A9\uC740 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4:"),$c.forEach(a),Pn=j(s),b=i(s,"UL",{});var $=r(b);Ql=i($,"LI",{});var ic=r(Ql);Ma=i(ic,"CODE",{});var Xc=r(Ma);ze=t(Xc,"id"),Xc.forEach(a),Se=t(ic,": \uC608\uC81C\uC758 id"),ic.forEach(a),qe=j($),$l=i($,"LI",{});var rc=r($l);da=i(rc,"CODE",{});var Nc=r(da);Ye=t(Nc,"image"),Nc.forEach(a),De=t(rc,": \uBB38\uC11C \uC774\uBBF8\uC9C0\uB97C \uD3EC\uD568\uD558\uB294 PIL.Image.Image \uAC1D\uCCB4"),rc.forEach(a),Oe=j($),Xl=i($,"LI",{});var cc=r(Xl);Ua=i(cc,"CODE",{});var Gc=r(Ua);He=t(Gc,"query"),Gc.forEach(a),Le=t(cc,": \uC9C8\uBB38 \uBB38\uC790\uC5F4 - \uC5EC\uB7EC \uC5B8\uC5B4\uC758 \uC790\uC5F0\uC5B4\uB85C \uB41C \uC9C8\uBB38"),cc.forEach(a),Pe=j($),Nl=i($,"LI",{});var oc=r(Nl);ma=i(oc,"CODE",{});var Fc=r(ma);Ke=t(Fc,"answers"),Fc.forEach(a),sp=t(oc,": \uC0AC\uB78C\uC774 \uC8FC\uC11D\uC744 \uB2E8 \uC815\uB2F5 \uB9AC\uC2A4\uD2B8"),oc.forEach(a),lp=j($),Ms=i($,"LI",{});var kn=r(Ms);ya=i(kn,"CODE",{});var Bc=r(ya);ap=t(Bc,"words"),Bc.forEach(a),np=t(kn," and "),Ja=i(kn,"CODE",{});var Wc=r(Ja);tp=t(Wc,"bounding_boxes"),Wc.forEach(a),ep=t(kn,": OCR\uC758 \uACB0\uACFC\uAC12\uB4E4\uC774\uBA70 \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC744 \uC608\uC815"),kn.forEach(a),pp=j($),Gl=i($,"LI",{});var jc=r(Gl);xa=i(jc,"CODE",{});var zc=r(xa);ip=t(zc,"answer"),zc.forEach(a),rp=t(jc,": \uB2E4\uB978 \uBAA8\uB378\uACFC \uC77C\uCE58\uD558\uB294 \uB2F5\uBCC0\uC774\uBA70 \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC744 \uC608\uC815"),jc.forEach(a),$.forEach(a),Kn=j(s),ds=i(s,"P",{});var ie=r(ds);cp=t(ie,"\uC601\uC5B4\uB85C \uB41C \uC9C8\uBB38\uB9CC \uB0A8\uAE30\uACE0 \uB2E4\uB978 \uBAA8\uB378\uC5D0 \uB300\uD55C \uC608\uCE21\uC744 \uD3EC\uD568\uD558\uB294 "),ga=i(ie,"CODE",{});var Sc=r(ga);op=t(Sc,"answer"),Sc.forEach(a),jp=t(ie,` \uD2B9\uC131\uC744 \uC0AD\uC81C\uD558\uACA0\uC2B5\uB2C8\uB2E4.
\uADF8\uB9AC\uACE0 \uC8FC\uC11D \uC791\uC131\uC790\uAC00 \uC81C\uACF5\uD55C \uB370\uC774\uD130 \uC138\uD2B8\uC5D0\uC11C \uCCAB \uBC88\uC9F8 \uB2F5\uBCC0\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4. \uB610\uB294 \uBB34\uC791\uC704\uB85C \uC0D8\uD50C\uC744 \uCD94\uCD9C\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.`),ie.forEach(a),st=j(s),d(Ss.$$.fragment,s),lt=j(s),Z=i(s,"P",{});var Is=r(Z);hp=t(Is,"\uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 LayoutLMv2 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB294 "),ua=i(Is,"CODE",{});var qc=r(ua);Mp=t(qc,"max_position_embeddings = 512"),qc.forEach(a),dp=t(Is,"\uB85C \uD6C8\uB828\uB418\uC5C8\uC2B5\uB2C8\uB2E4(\uC774 \uC815\uBCF4\uB294 "),L=i(Is,"A",{href:!0,rel:!0});var re=r(L);Up=t(re,"\uCCB4\uD06C\uD3EC\uC778\uD2B8\uC758 "),wa=i(re,"CODE",{});var Yc=r(wa);mp=t(Yc,"config.json"),Yc.forEach(a),yp=t(re," \uD30C\uC77C"),re.forEach(a),Jp=t(Is,`\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4).
\uBC14\uB85C \uC608\uC81C\uB97C \uC798\uB77C\uB0BC \uC218\uB3C4 \uC788\uC9C0\uB9CC, \uAE34 \uBB38\uC11C\uC758 \uB05D\uC5D0 \uB2F5\uBCC0\uC774 \uC788\uC5B4 \uC798\uB9AC\uB294 \uC0C1\uD669\uC744 \uD53C\uD558\uAE30 \uC704\uD574 \uC5EC\uAE30\uC11C\uB294 \uC784\uBCA0\uB529\uC774 512\uBCF4\uB2E4 \uAE38\uC5B4\uC9C8 \uAC00\uB2A5\uC131\uC774 \uC788\uB294 \uBA87 \uAC00\uC9C0 \uC608\uC81C\uB97C \uC81C\uAC70\uD558\uACA0\uC2B5\uB2C8\uB2E4.
\uB370\uC774\uD130 \uC138\uD2B8\uC5D0 \uC788\uB294 \uB300\uBD80\uBD84\uC758 \uBB38\uC11C\uAC00 \uAE34 \uACBD\uC6B0 \uC2AC\uB77C\uC774\uB529 \uC708\uB3C4\uC6B0 \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4 - \uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uC2F6\uC73C\uBA74 \uC774 `),qs=i(Is,"A",{href:!0,rel:!0});var Dc=r(qs);xp=t(Dc,"\uB178\uD2B8\uBD81"),Dc.forEach(a),gp=t(Is,"\uC744 \uD655\uC778\uD558\uC138\uC694."),Is.forEach(a),at=j(s),d(Ys.$$.fragment,s),nt=j(s),z=i(s,"P",{});var pa=r(z);up=t(pa,`\uC774 \uC2DC\uC810\uC5D0\uC11C \uC774 \uB370\uC774\uD130 \uC138\uD2B8\uC758 OCR \uD2B9\uC131\uB3C4 \uC81C\uAC70\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4. OCR \uD2B9\uC131\uC740 \uB2E4\uB978 \uBAA8\uB378\uC744 \uBBF8\uC138 \uC870\uC815\uD558\uAE30 \uC704\uD55C \uAC83\uC73C\uB85C, \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C \uC0AC\uC6A9\uD558\uB294 \uBAA8\uB378\uC758 \uC785\uB825 \uC694\uAD6C \uC0AC\uD56D\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC5D0 \uC774 \uD2B9\uC131\uC744 \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574\uC11C\uB294 \uC77C\uBD80 \uCC98\uB9AC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
\uB300\uC2E0, \uC6D0\uBCF8 \uB370\uC774\uD130\uC5D0 `),fa=i(pa,"CODE",{});var Oc=r(fa);wp=t(Oc,"LayoutLMv2Processor"),Oc.forEach(a),fp=t(pa,`\uB97C \uC0AC\uC6A9\uD558\uC5EC OCR \uBC0F \uD1A0\uD070\uD654\uB97C \uBAA8\uB450 \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC774\uB807\uAC8C \uD558\uBA74 \uBAA8\uB378\uC774 \uC694\uAD6C\uD558\uB294 \uC785\uB825\uC744 \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uC774\uBBF8\uC9C0\uB97C \uC218\uB3D9\uC73C\uB85C \uCC98\uB9AC\uD558\uB824\uBA74, `),Ds=i(pa,"A",{href:!0});var hc=r(Ds);Ta=i(hc,"CODE",{});var Hc=r(Ta);Tp=t(Hc,"LayoutLMv2"),Hc.forEach(a),bp=t(hc," model documentation"),hc.forEach(a),Cp=t(pa,"\uC5D0\uC11C \uBAA8\uB378\uC774 \uC694\uAD6C\uD558\uB294 \uC785\uB825 \uD3EC\uB9F7\uC744 \uD655\uC778\uD574\uBCF4\uC138\uC694."),pa.forEach(a),tt=j(s),d(Os.$$.fragment,s),et=j(s),Fl=i(s,"P",{});var Lc=r(Fl);_p=t(Lc,"\uB9C8\uC9C0\uB9C9\uC73C\uB85C, \uB370\uC774\uD130 \uD0D0\uC0C9\uC744 \uC644\uB8CC\uD558\uAE30 \uC704\uD574 \uC774\uBBF8\uC9C0 \uC608\uC2DC\uB97C \uC0B4\uD3B4\uBD05\uC2DC\uB2E4."),Lc.forEach(a),pt=j(s),d(Hs.$$.fragment,s),it=j(s),Ls=i(s,"DIV",{class:!0});var Pc=r(Ls);Bl=i(Pc,"IMG",{src:!0,alt:!0}),Pc.forEach(a),rt=j(s),P=i(s,"H2",{class:!0});var ce=r(P);Us=i(ce,"A",{id:!0,class:!0,href:!0});var Kc=r(Us);ba=i(Kc,"SPAN",{});var so=r(ba);d(Ps.$$.fragment,so),so.forEach(a),Kc.forEach(a),Ip=j(ce),Ca=i(ce,"SPAN",{});var lo=r(Ca);Ep=t(lo,"\uB370\uC774\uD130 \uC804\uCC98\uB9AC"),lo.forEach(a),ce.forEach(a),ct=j(s),ms=i(s,"P",{});var oe=r(ms);vp=t(oe,`\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5 \uD0DC\uC2A4\uD06C\uB294 \uBA40\uD2F0\uBAA8\uB2EC \uD0DC\uC2A4\uD06C\uC774\uBA70, \uAC01 \uBAA8\uB2EC\uB9AC\uD2F0\uC758 \uC785\uB825\uC774 \uBAA8\uB378\uC758 \uC694\uAD6C\uC5D0 \uB9DE\uAC8C \uC804\uCC98\uB9AC \uB418\uC5C8\uB294\uC9C0 \uD655\uC778\uD574\uC57C \uD569\uB2C8\uB2E4.
\uC774\uBBF8\uC9C0 \uB370\uC774\uD130\uB97C \uCC98\uB9AC\uD560 \uC218 \uC788\uB294 \uC774\uBBF8\uC9C0 \uD504\uB85C\uC138\uC11C\uC640 \uD14D\uC2A4\uD2B8 \uB370\uC774\uD130\uB97C \uC778\uCF54\uB529\uD560 \uC218 \uC788\uB294 \uD1A0\uD06C\uB098\uC774\uC800\uB97C \uACB0\uD569\uD55C `),_a=i(oe,"CODE",{});var ao=r(_a);Vp=t(ao,"LayoutLMv2Processor"),ao.forEach(a),kp=t(oe,"\uB97C \uAC00\uC838\uC624\uB294 \uAC83\uBD80\uD130 \uC2DC\uC791\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4."),oe.forEach(a),ot=j(s),d(Ks.$$.fragment,s),jt=j(s),K=i(s,"H3",{class:!0});var je=r(K);ys=i(je,"A",{id:!0,class:!0,href:!0});var no=r(ys);Ia=i(no,"SPAN",{});var to=r(Ia);d(sl.$$.fragment,to),to.forEach(a),no.forEach(a),Rp=j(je),Ea=i(je,"SPAN",{});var eo=r(Ea);Zp=t(eo,"\uBB38\uC11C \uC774\uBBF8\uC9C0 \uC804\uCC98\uB9AC"),eo.forEach(a),je.forEach(a),ht=j(s),Js=i(s,"P",{});var he=r(Js);Ap=t(he,"\uBA3C\uC800, \uD504\uB85C\uC138\uC11C\uC758 "),va=i(he,"CODE",{});var po=r(va);Qp=t(po,"image_processor"),po.forEach(a),$p=t(he,`\uB97C \uC0AC\uC6A9\uD574 \uBAA8\uB378\uC5D0 \uB300\uD55C \uBB38\uC11C \uC774\uBBF8\uC9C0\uB97C \uC900\uBE44\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4.
\uAE30\uBCF8\uAC12\uC73C\uB85C, \uC774\uBBF8\uC9C0 \uD504\uB85C\uC138\uC11C\uB294 \uC774\uBBF8\uC9C0 \uD06C\uAE30\uB97C 224x224\uB85C \uC870\uC815\uD558\uACE0 \uC0C9\uC0C1 \uCC44\uB110\uC758 \uC21C\uC11C\uAC00 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD55C \uD6C4 \uB2E8\uC5B4\uC640 \uC815\uADDC\uD654\uB41C \uBC14\uC6B4\uB529 \uBC15\uC2A4\uB97C \uC5BB\uAE30 \uC704\uD574 \uD14C\uC11C\uB799\uD2B8\uB97C \uC0AC\uC6A9\uD574 OCR\uB97C \uC801\uC6A9\uD569\uB2C8\uB2E4.
\uC774 \uD29C\uD1A0\uB9AC\uC5BC\uC5D0\uC11C \uC6B0\uB9AC\uAC00 \uD544\uC694\uD55C \uAC83\uACFC \uAE30\uBCF8\uAC12\uC740 \uC644\uC804\uD788 \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uC774\uBBF8\uC9C0 \uBC30\uCE58\uC5D0 \uAE30\uBCF8 \uC774\uBBF8\uC9C0 \uCC98\uB9AC\uB97C \uC801\uC6A9\uD558\uACE0 OCR\uC758 \uACB0\uACFC\uB97C \uBCC0\uD658\uD558\uB294 \uD568\uC218\uB97C \uC791\uC131\uD569\uB2C8\uB2E4.`),he.forEach(a),Mt=j(s),d(ll.$$.fragment,s),dt=j(s),xs=i(s,"P",{});var Me=r(xs);Xp=t(Me,"\uC774 \uC804\uCC98\uB9AC\uB97C \uB370\uC774\uD130 \uC138\uD2B8 \uC804\uCCB4\uC5D0 \uBE60\uB974\uAC8C \uC801\uC6A9\uD558\uB824\uBA74 "),Va=i(Me,"CODE",{});var io=r(Va);Np=t(io,"map"),io.forEach(a),Gp=t(Me,"\uB97C \uC0AC\uC6A9\uD558\uC138\uC694."),Me.forEach(a),Ut=j(s),d(al.$$.fragment,s),mt=j(s),ss=i(s,"H3",{class:!0});var de=r(ss);gs=i(de,"A",{id:!0,class:!0,href:!0});var ro=r(gs);ka=i(ro,"SPAN",{});var co=r(ka);d(nl.$$.fragment,co),co.forEach(a),ro.forEach(a),Fp=j(de),Ra=i(de,"SPAN",{});var oo=r(Ra);Bp=t(oo,"\uD14D\uC2A4\uD2B8 \uB370\uC774\uD130 \uC804\uCC98\uB9AC"),oo.forEach(a),de.forEach(a),yt=j(s),C=i(s,"P",{});var X=r(C);Wp=t(X,`\uC774\uBBF8\uC9C0\uC5D0 OCR\uC744 \uC801\uC6A9\uD588\uC73C\uBA74 \uB370\uC774\uD130 \uC138\uD2B8\uC758 \uD14D\uC2A4\uD2B8 \uBD80\uBD84\uC744 \uBAA8\uB378\uC5D0 \uB9DE\uAC8C \uC778\uCF54\uB529\uD574\uC57C \uD569\uB2C8\uB2E4.
\uC774 \uC778\uCF54\uB529\uC5D0\uB294 \uC774\uC804 \uB2E8\uACC4\uC5D0\uC11C \uAC00\uC838\uC628 \uB2E8\uC5B4\uC640 \uBC15\uC2A4\uB97C \uD1A0\uD070 \uC218\uC900\uC758 `),Za=i(X,"CODE",{});var jo=r(Za);zp=t(jo,"input_ids"),jo.forEach(a),Sp=t(X,", "),Aa=i(X,"CODE",{});var ho=r(Aa);qp=t(ho,"attention_mask"),ho.forEach(a),Yp=t(X,", "),Qa=i(X,"CODE",{});var Mo=r(Qa);Dp=t(Mo,"token_type_ids"),Mo.forEach(a),Op=t(X," \uBC0F "),$a=i(X,"CODE",{});var Uo=r($a);Hp=t(Uo,"bbox"),Uo.forEach(a),Lp=t(X,`\uB85C \uBCC0\uD658\uD558\uB294 \uC791\uC5C5\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4.
\uD14D\uC2A4\uD2B8\uB97C \uC804\uCC98\uB9AC\uD558\uB824\uBA74 \uD504\uB85C\uC138\uC11C\uC758 `),Xa=i(X,"CODE",{});var mo=r(Xa);Pp=t(mo,"tokenizer"),mo.forEach(a),Kp=t(X,"\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."),X.forEach(a),Jt=j(s),d(tl.$$.fragment,s),xt=j(s),A=i(s,"P",{});var Es=r(A);si=t(Es,"\uC704\uC5D0\uC11C \uC5B8\uAE09\uD55C \uC804\uCC98\uB9AC \uC678\uC5D0\uB3C4 \uBAA8\uB378\uC744 \uC704\uD574 \uB808\uC774\uBE14\uC744 \uCD94\uAC00\uD574\uC57C \uD569\uB2C8\uB2E4. \u{1F917} Transformers\uC758 "),Na=i(Es,"CODE",{});var yo=r(Na);li=t(yo,"xxxForQuestionAnswering"),yo.forEach(a),ai=t(Es," \uBAA8\uB378\uC758 \uACBD\uC6B0, \uB808\uC774\uBE14\uC740 "),Ga=i(Es,"CODE",{});var Jo=r(Ga);ni=t(Jo,"start_positions"),Jo.forEach(a),ti=t(Es,"\uC640 "),Fa=i(Es,"CODE",{});var xo=r(Fa);ei=t(xo,"end_positions"),xo.forEach(a),pi=t(Es,"\uB85C \uAD6C\uC131\uB418\uBA70 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uB2F5\uBCC0\uC758 \uC2DC\uC791\uACFC \uB05D\uC5D0 \uC788\uB294\uC9C0\uB97C \uB098\uD0C0\uB0C5\uB2C8\uB2E4."),Es.forEach(a),gt=j(s),Wl=i(s,"P",{});var go=r(Wl);ii=t(go,"\uB808\uC774\uBE14 \uCD94\uAC00\uB97C \uC704\uD574\uC11C, \uBA3C\uC800 \uB354 \uD070 \uB9AC\uC2A4\uD2B8(\uB2E8\uC5B4 \uB9AC\uC2A4\uD2B8)\uC5D0\uC11C \uD558\uC704 \uB9AC\uC2A4\uD2B8(\uB2E8\uC5B4\uB85C \uBD84\uD560\uB41C \uB2F5\uBCC0)\uC744 \uCC3E\uC744 \uC218 \uC788\uB294 \uD5EC\uD37C \uD568\uC218\uB97C \uC815\uC758\uD569\uB2C8\uB2E4."),go.forEach(a),ut=j(s),g=i(s,"P",{});var u=r(g);ri=t(u,"\uC774 \uD568\uC218\uB294 "),Ba=i(u,"CODE",{});var uo=r(Ba);ci=t(uo,"words_list"),uo.forEach(a),oi=t(u,"\uC640 "),Wa=i(u,"CODE",{});var wo=r(Wa);ji=t(wo,"answer_list"),wo.forEach(a),hi=t(u,`, \uC774\uB807\uAC8C \uB450 \uB9AC\uC2A4\uD2B8\uB97C \uC785\uB825\uC73C\uB85C \uBC1B\uC2B5\uB2C8\uB2E4.
\uADF8\uB7F0 \uB2E4\uC74C `),za=i(u,"CODE",{});var fo=r(za);Mi=t(fo,"words_list"),fo.forEach(a),di=t(u,"\uB97C \uBC18\uBCF5\uD558\uC5EC "),Sa=i(u,"CODE",{});var To=r(Sa);Ui=t(To,"words_list"),To.forEach(a),mi=t(u,"\uC758 \uD604\uC7AC \uB2E8\uC5B4(words_list[i])\uAC00 "),qa=i(u,"CODE",{});var bo=r(qa);yi=t(bo,"answer_list"),bo.forEach(a),Ji=t(u,`\uC758 \uCCAB \uBC88\uC9F8 \uB2E8\uC5B4(answer_list[0])\uC640 \uAC19\uC740\uC9C0,
\uD604\uC7AC \uB2E8\uC5B4\uC5D0\uC11C \uC2DC\uC791\uD574 `),Ya=i(u,"CODE",{});var Co=r(Ya);xi=t(Co,"answer_list"),Co.forEach(a),gi=t(u,"\uC640 \uAC19\uC740 \uAE38\uC774\uB9CC\uD07C\uC758 "),Da=i(u,"CODE",{});var _o=r(Da);ui=t(_o,"words_list"),_o.forEach(a),wi=t(u,"\uC758 \uD558\uC704 \uB9AC\uC2A4\uD2B8\uAC00 "),Oa=i(u,"CODE",{});var Io=r(Oa);fi=t(Io,"answer_list"),Io.forEach(a),Ti=t(u,`\uC640 \uC77C\uCE58\uD558\uB294\uC9C0 \uD655\uC778\uD569\uB2C8\uB2E4.
\uC774 \uC870\uAC74\uC774 \uCC38\uC774\uB77C\uBA74 \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC744 \uBC1C\uACAC\uD588\uC74C\uC744 \uC758\uBBF8\uD558\uBA70, \uD568\uC218\uB294 \uC77C\uCE58 \uD56D\uBAA9, \uC2DC\uC791 \uC778\uB371\uC2A4(idx) \uBC0F \uC885\uB8CC \uC778\uB371\uC2A4(idx + len(answer_list) - 1)\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4. \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uB450 \uAC1C \uC774\uC0C1 \uBC1C\uACAC\uB418\uBA74 \uD568\uC218\uB294 \uCCAB \uBC88\uC9F8 \uD56D\uBAA9\uB9CC \uBC18\uD658\uD569\uB2C8\uB2E4. \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uC5C6\uB2E4\uBA74 \uD568\uC218\uB294 (`),Ha=i(u,"CODE",{});var Eo=r(Ha);bi=t(Eo,"None"),Eo.forEach(a),Ci=t(u,", 0, 0)\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4."),u.forEach(a),wt=j(s),d(el.$$.fragment,s),ft=j(s),zl=i(s,"P",{});var vo=r(zl);_i=t(vo,"\uC774 \uD568\uC218\uAC00 \uC5B4\uB5BB\uAC8C \uC815\uB2F5\uC758 \uC704\uCE58\uB97C \uCC3E\uB294\uC9C0 \uC124\uBA85\uD558\uAE30 \uC704\uD574 \uB2E4\uC74C \uC608\uC81C\uC5D0\uC11C \uD568\uC218\uB97C \uC0AC\uC6A9\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),vo.forEach(a),Tt=j(s),d(pl.$$.fragment,s),bt=j(s),Sl=i(s,"P",{});var Vo=r(Sl);Ii=t(Vo,"\uD55C\uD3B8, \uC704 \uC608\uC81C\uAC00 \uC778\uCF54\uB529\uB418\uBA74 \uB2E4\uC74C\uACFC \uAC19\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4:"),Vo.forEach(a),Ct=j(s),d(il.$$.fragment,s),_t=j(s),ql=i(s,"P",{});var ko=r(ql);Ei=t(ko,"\uC774\uC81C \uC778\uCF54\uB529\uB41C \uC785\uB825\uC5D0\uC11C \uC815\uB2F5\uC758 \uC704\uCE58\uB97C \uCC3E\uC544\uC57C \uD569\uB2C8\uB2E4."),ko.forEach(a),It=j(s),S=i(s,"UL",{});var ia=r(S);Yl=i(ia,"LI",{});var Mc=r(Yl);La=i(Mc,"CODE",{});var Ro=r(La);vi=t(Ro,"token_type_ids"),Ro.forEach(a),Vi=t(Mc,"\uB294 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uC9C8\uBB38\uC5D0 \uC18D\uD558\uB294\uC9C0, \uADF8\uB9AC\uACE0 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uBB38\uC11C\uC758 \uB2E8\uC5B4\uC5D0 \uD3EC\uD568\uB418\uB294\uC9C0\uB97C \uC54C\uB824\uC90D\uB2C8\uB2E4."),Mc.forEach(a),ki=j(ia),Dl=i(ia,"LI",{});var dc=r(Dl);Pa=i(dc,"CODE",{});var Zo=r(Pa);Ri=t(Zo,"tokenizer.cls_token_id"),Zo.forEach(a),Zi=t(dc," \uC785\uB825\uC758 \uC2DC\uC791 \uBD80\uBD84\uC5D0 \uC788\uB294 \uD2B9\uC218 \uD1A0\uD070\uC744 \uCC3E\uB294 \uB370 \uB3C4\uC6C0\uC744 \uC90D\uB2C8\uB2E4."),dc.forEach(a),Ai=j(ia),us=i(ia,"LI",{});var Rn=r(us);Ka=i(Rn,"CODE",{});var Ao=r(Ka);Qi=t(Ao,"word_ids"),Ao.forEach(a),$i=t(Rn,"\uB294 \uC6D0\uBCF8 "),sn=i(Rn,"CODE",{});var Qo=r(sn);Xi=t(Qo,"words"),Qo.forEach(a),Ni=t(Rn,"\uC5D0\uC11C \uCC3E\uC740 \uB2F5\uBCC0\uC744 \uC804\uCCB4 \uC778\uCF54\uB529\uB41C \uC785\uB825\uC758 \uB3D9\uC77C\uD55C \uB2F5\uACFC \uC77C\uCE58\uC2DC\uD0A4\uACE0 \uC778\uCF54\uB529\uB41C \uC785\uB825\uC5D0\uC11C \uB2F5\uBCC0\uC758 \uC2DC\uC791/\uB05D \uC704\uCE58\uB97C \uACB0\uC815\uD569\uB2C8\uB2E4."),Rn.forEach(a),ia.forEach(a),Et=j(s),Ol=i(s,"P",{});var $o=r(Ol);Gi=t($o,"\uC704 \uB0B4\uC6A9\uB4E4\uC744 \uC5FC\uB450\uC5D0 \uB450\uACE0 \uB370\uC774\uD130 \uC138\uD2B8 \uC608\uC81C\uC758 \uBC30\uCE58\uB97C \uC778\uCF54\uB529\uD558\uB294 \uD568\uC218\uB97C \uB9CC\uB4E4\uC5B4 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),$o.forEach(a),vt=j(s),d(rl.$$.fragment,s),Vt=j(s),Hl=i(s,"P",{});var Xo=r(Hl);Fi=t(Xo,"\uC774\uC81C \uC774 \uC804\uCC98\uB9AC \uD568\uC218\uAC00 \uC788\uC73C\uB2C8 \uC804\uCCB4 \uB370\uC774\uD130 \uC138\uD2B8\uB97C \uC778\uCF54\uB529\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:"),Xo.forEach(a),kt=j(s),d(cl.$$.fragment,s),Rt=j(s),Ll=i(s,"P",{});var No=r(Ll);Bi=t(No,"\uC778\uCF54\uB529\uB41C \uB370\uC774\uD130 \uC138\uD2B8\uC758 \uD2B9\uC131\uC774 \uC5B4\uB5BB\uAC8C \uC0DD\uACBC\uB294\uC9C0 \uD655\uC778\uD574 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),No.forEach(a),Zt=j(s),d(ol.$$.fragment,s),At=j(s),ls=i(s,"H2",{class:!0});var Ue=r(ls);ws=i(Ue,"A",{id:!0,class:!0,href:!0});var Go=r(ws);ln=i(Go,"SPAN",{});var Fo=r(ln);d(jl.$$.fragment,Fo),Fo.forEach(a),Go.forEach(a),Wi=j(Ue),an=i(Ue,"SPAN",{});var Bo=r(an);zi=t(Bo,"\uD3C9\uAC00"),Bo.forEach(a),Ue.forEach(a),Qt=j(s),q=i(s,"P",{});var ra=r(q);Si=t(ra,`\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5\uC744 \uD3C9\uAC00\uD558\uB824\uBA74 \uC0C1\uB2F9\uD55C \uC591\uC758 \uD6C4\uCC98\uB9AC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC2DC\uAC04\uC774 \uB108\uBB34 \uB9CE\uC774 \uAC78\uB9AC\uC9C0 \uC54A\uB3C4\uB85D \uC774 \uAC00\uC774\uB4DC\uC5D0\uC11C\uB294 \uD3C9\uAC00 \uB2E8\uACC4\uB97C \uC0DD\uB7B5\uD569\uB2C8\uB2E4.
`),nn=i(ra,"CODE",{});var Wo=r(nn);qi=t(Wo,"Trainer"),Wo.forEach(a),Yi=t(ra,`\uAC00 \uD6C8\uB828 \uACFC\uC815\uC5D0\uC11C \uD3C9\uAC00 \uC190\uC2E4(evaluation loss)\uC744 \uACC4\uC18D \uACC4\uC0B0\uD558\uAE30 \uB54C\uBB38\uC5D0 \uBAA8\uB378\uC758 \uC131\uB2A5\uC744 \uB300\uB7B5\uC801\uC73C\uB85C \uC54C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uCD94\uCD9C\uC801(Extractive) \uC9C8\uC758 \uC751\uB2F5\uC740 \uBCF4\uD1B5 F1/exact match \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD574 \uD3C9\uAC00\uB429\uB2C8\uB2E4.
\uC9C1\uC811 \uAD6C\uD604\uD574\uBCF4\uACE0 \uC2F6\uC73C\uC2DC\uB2E4\uBA74, Hugging Face course\uC758 `),hl=i(ra,"A",{href:!0,rel:!0});var zo=r(hl);Di=t(zo,"Question Answering chapter"),zo.forEach(a),Oi=t(ra,"\uC744 \uCC38\uACE0\uD558\uC138\uC694."),ra.forEach(a),$t=j(s),as=i(s,"H2",{class:!0});var me=r(as);fs=i(me,"A",{id:!0,class:!0,href:!0});var So=r(fs);tn=i(So,"SPAN",{});var qo=r(tn);d(Ml.$$.fragment,qo),qo.forEach(a),So.forEach(a),Hi=j(me),en=i(me,"SPAN",{});var Yo=r(en);Li=t(Yo,"\uD6C8\uB828"),Yo.forEach(a),me.forEach(a),Xt=j(s),Pl=i(s,"P",{});var Do=r(Pl);Pi=t(Do,`\uCD95\uD558\uD569\uB2C8\uB2E4! \uC774 \uAC00\uC774\uB4DC\uC758 \uAC00\uC7A5 \uC5B4\uB824\uC6B4 \uBD80\uBD84\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uCC98\uB9AC\uD588\uC73C\uB2C8 \uC774\uC81C \uB098\uB9CC\uC758 \uBAA8\uB378\uC744 \uD6C8\uB828\uD560 \uC900\uBE44\uAC00 \uB418\uC5C8\uC2B5\uB2C8\uB2E4.
\uD6C8\uB828\uC740 \uB2E4\uC74C\uACFC \uAC19\uC740 \uB2E8\uACC4\uB85C \uC774\uB8E8\uC5B4\uC838 \uC788\uC2B5\uB2C8\uB2E4:`),Do.forEach(a),Nt=j(s),v=i(s,"UL",{});var Y=r(v);dl=i(Y,"LI",{});var ye=r(dl);Ki=t(ye,"\uC804\uCC98\uB9AC\uC5D0\uC11C\uC758 \uB3D9\uC77C\uD55C \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574 "),pn=i(ye,"CODE",{});var Oo=r(pn);sr=t(Oo,"AutoModelForDocumentQuestionAnswering"),Oo.forEach(a),lr=t(ye,"\uC73C\uB85C \uBAA8\uB378\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4."),ye.forEach(a),ar=j(Y),Kl=i(Y,"LI",{});var Uc=r(Kl);rn=i(Uc,"CODE",{});var Ho=r(rn);nr=t(Ho,"TrainingArguments"),Ho.forEach(a),tr=t(Uc,"\uB85C \uD6C8\uB828 \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC815\uD569\uB2C8\uB2E4."),Uc.forEach(a),er=j(Y),Ul=i(Y,"LI",{});var Je=r(Ul);pr=t(Je,"\uC608\uC81C\uB97C \uBC30\uCE58 \uCC98\uB9AC\uD558\uB294 \uD568\uC218\uB97C \uC815\uC758\uD569\uB2C8\uB2E4. \uC5EC\uAE30\uC11C\uB294 "),cn=i(Je,"CODE",{});var Lo=r(cn);ir=t(Lo,"DefaultDataCollator"),Lo.forEach(a),rr=t(Je,"\uAC00 \uC801\uB2F9\uD569\uB2C8\uB2E4."),Je.forEach(a),cr=j(Y),ml=i(Y,"LI",{});var xe=r(ml);or=t(xe,"\uBAA8\uB378, \uB370\uC774\uD130 \uC138\uD2B8, \uB370\uC774\uD130 \uCF5C\uB808\uC774\uD130(Data collator)\uC640 \uD568\uAED8 "),on=i(xe,"CODE",{});var Po=r(on);jr=t(Po,"Trainer"),Po.forEach(a),hr=t(xe,"\uC5D0 \uD6C8\uB828 \uC778\uC218\uB4E4\uC744 \uC804\uB2EC\uD569\uB2C8\uB2E4."),xe.forEach(a),Mr=j(Y),sa=i(Y,"LI",{});var mc=r(sa);jn=i(mc,"CODE",{});var Ko=r(jn);dr=t(Ko,"train()"),Ko.forEach(a),Ur=t(mc,"\uC744 \uD638\uCD9C\uD574\uC11C \uBAA8\uB378\uC744 \uBBF8\uC138 \uC870\uC815\uD569\uB2C8\uB2E4."),mc.forEach(a),Y.forEach(a),Gt=j(s),d(yl.$$.fragment,s),Ft=j(s),_=i(s,"P",{});var F=r(_);hn=i(F,"CODE",{});var s2=r(hn);mr=t(s2,"TrainingArguments"),s2.forEach(a),yr=t(F,"\uC5D0\uC11C "),Mn=i(F,"CODE",{});var l2=r(Mn);Jr=t(l2,"output_dir"),l2.forEach(a),xr=t(F,`\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uC800\uC7A5\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD558\uACE0, \uC801\uC808\uD55C \uD558\uC774\uD37C\uD30C\uB77C\uBBF8\uD130\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.
\uBAA8\uB378\uC744 \uCEE4\uBBA4\uB2C8\uD2F0\uC640 \uACF5\uC720\uD558\uB824\uBA74 `),dn=i(F,"CODE",{});var a2=r(dn);gr=t(a2,"push_to_hub"),a2.forEach(a),ur=t(F,"\uB97C "),Un=i(F,"CODE",{});var n2=r(Un);wr=t(n2,"True"),n2.forEach(a),fr=t(F,`\uB85C \uC124\uC815\uD558\uC138\uC694 (\uBAA8\uB378\uC744 \uC5C5\uB85C\uB4DC\uD558\uB824\uBA74 Hugging Face\uC5D0 \uB85C\uADF8\uC778\uD574\uC57C \uD569\uB2C8\uB2E4).
\uC774 \uACBD\uC6B0 `),mn=i(F,"CODE",{});var t2=r(mn);Tr=t(t2,"output_dir"),t2.forEach(a),br=t(F,"\uC740 \uBAA8\uB378\uC758 \uCCB4\uD06C\uD3EC\uC778\uD2B8\uB97C \uD478\uC2DC\uD560 \uB808\uD3EC\uC9C0\uD1A0\uB9AC\uC758 \uC774\uB984\uC774 \uB429\uB2C8\uB2E4."),F.forEach(a),Bt=j(s),d(Jl.$$.fragment,s),Wt=j(s),la=i(s,"P",{});var e2=r(la);Cr=t(e2,"\uAC04\uB2E8\uD55C \uB370\uC774\uD130 \uCF5C\uB808\uC774\uD130\uB97C \uC815\uC758\uD558\uC5EC \uC608\uC81C\uB97C \uD568\uAED8 \uBC30\uCE58\uD569\uB2C8\uB2E4."),e2.forEach(a),zt=j(s),d(xl.$$.fragment,s),St=j(s),Ts=i(s,"P",{});var ge=r(Ts);_r=t(ge,"\uB9C8\uC9C0\uB9C9\uC73C\uB85C, \uBAA8\uB4E0 \uAC83\uC744 \uD55C \uACF3\uC5D0 \uBAA8\uC544 "),yn=i(ge,"CODE",{});var p2=r(yn);Ir=t(p2,"train()"),p2.forEach(a),Er=t(ge,"\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4:"),ge.forEach(a),qt=j(s),d(gl.$$.fragment,s),Yt=j(s),bs=i(s,"P",{});var ue=r(bs);vr=t(ue,"\uCD5C\uC885 \uBAA8\uB378\uC744 \u{1F917} Hub\uC5D0 \uCD94\uAC00\uD558\uB824\uBA74, \uBAA8\uB378 \uCE74\uB4DC\uB97C \uC0DD\uC131\uD558\uACE0 "),Jn=i(ue,"CODE",{});var i2=r(Jn);Vr=t(i2,"push_to_hub"),i2.forEach(a),kr=t(ue,"\uB97C \uD638\uCD9C\uD569\uB2C8\uB2E4:"),ue.forEach(a),Dt=j(s),d(ul.$$.fragment,s),Ot=j(s),ns=i(s,"H2",{class:!0});var we=r(ns);Cs=i(we,"A",{id:!0,class:!0,href:!0});var r2=r(Cs);xn=i(r2,"SPAN",{});var c2=r(xn);d(wl.$$.fragment,c2),c2.forEach(a),r2.forEach(a),Rr=j(we),gn=i(we,"SPAN",{});var o2=r(gn);Zr=t(o2,"\uCD94\uB860"),o2.forEach(a),we.forEach(a),Ht=j(s),_s=i(s,"P",{});var fe=r(_s);Ar=t(fe,`\uC774\uC81C LayoutLMv2 \uBAA8\uB378\uC744 \uBBF8\uC138 \uC870\uC815\uD558\uACE0 \u{1F917} Hub\uC5D0 \uC5C5\uB85C\uB4DC\uD588\uC73C\uB2C8 \uCD94\uB860\uC5D0\uB3C4 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uCD94\uB860\uC744 \uC704\uD574 \uBBF8\uC138 \uC870\uC815\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uB294 \uAC00\uC7A5 \uAC04\uB2E8\uD55C \uBC29\uBC95\uC740 `),un=i(fe,"CODE",{});var j2=r(un);Qr=t(j2,"Pipeline"),j2.forEach(a),$r=t(fe,"\uC744 \uC0AC\uC6A9\uD558\uB294 \uAC83 \uC785\uB2C8\uB2E4."),fe.forEach(a),Lt=j(s),aa=i(s,"P",{});var h2=r(aa);Xr=t(h2,"\uC608\uB97C \uB4E4\uC5B4 \uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),h2.forEach(a),Pt=j(s),d(fl.$$.fragment,s),Kt=j(s),na=i(s,"P",{});var M2=r(na);Nr=t(M2,"\uADF8 \uB2E4\uC74C, \uBAA8\uB378\uB85C \uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5\uC744 \uD558\uAE30 \uC704\uD574 \uD30C\uC774\uD504\uB77C\uC778\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD558\uACE0 \uC774\uBBF8\uC9C0 + \uC9C8\uBB38 \uC870\uD569\uC744 \uC804\uB2EC\uD569\uB2C8\uB2E4."),M2.forEach(a),se=j(s),d(Tl.$$.fragment,s),le=j(s),ta=i(s,"P",{});var d2=r(ta);Gr=t(d2,"\uC6D0\uD55C\uB2E4\uBA74 \uD30C\uC774\uD504\uB77C\uC778\uC758 \uACB0\uACFC\uB97C \uC218\uB3D9\uC73C\uB85C \uBCF5\uC81C\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4:"),d2.forEach(a),ae=j(s),V=i(s,"OL",{});var D=r(V);wn=i(D,"LI",{});var U2=r(wn);Fr=t(U2,"\uC774\uBBF8\uC9C0\uC640 \uC9C8\uBB38\uC744 \uAC00\uC838\uC640 \uBAA8\uB378\uC758 \uD504\uB85C\uC138\uC11C\uB97C \uC0AC\uC6A9\uD574 \uBAA8\uB378\uC5D0 \uB9DE\uAC8C \uC900\uBE44\uD569\uB2C8\uB2E4."),U2.forEach(a),Br=j(D),fn=i(D,"LI",{});var m2=r(fn);Wr=t(m2,"\uBAA8\uB378\uC744 \uD1B5\uD574 \uACB0\uACFC \uB610\uB294 \uC804\uCC98\uB9AC\uB97C \uC804\uB2EC\uD569\uB2C8\uB2E4."),m2.forEach(a),zr=j(D),ts=i(D,"LI",{});var ca=r(ts);Sr=t(ca,"\uBAA8\uB378\uC740 \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uB2F5\uBCC0\uC758 \uC2DC\uC791\uC5D0 \uC788\uB294\uC9C0, \uC5B4\uB5A4 \uD1A0\uD070\uC774 \uB2F5\uBCC0\uC774 \uB05D\uC5D0 \uC788\uB294\uC9C0\uB97C \uB098\uD0C0\uB0B4\uB294 "),Tn=i(ca,"CODE",{});var y2=r(Tn);qr=t(y2,"start_logits"),y2.forEach(a),Yr=t(ca,"\uC640 "),bn=i(ca,"CODE",{});var J2=r(bn);Dr=t(J2,"end_logits"),J2.forEach(a),Or=t(ca,"\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4. \uB458 \uB2E4 (batch_size, sequence_length) \uD615\uD0DC\uB97C \uAC16\uC2B5\uB2C8\uB2E4."),ca.forEach(a),Hr=j(D),Q=i(D,"LI",{});var es=r(Q);Cn=i(es,"CODE",{});var x2=r(Cn);Lr=t(x2,"start_logits"),x2.forEach(a),Pr=t(es,"\uC640 "),_n=i(es,"CODE",{});var g2=r(_n);Kr=t(g2,"end_logits"),g2.forEach(a),sc=t(es,"\uC758 \uB9C8\uC9C0\uB9C9 \uCC28\uC6D0\uC744 \uCD5C\uB300\uB85C \uB9CC\uB4DC\uB294 \uAC12\uC744 \uCC3E\uC544 \uC608\uC0C1 "),In=i(es,"CODE",{});var u2=r(In);lc=t(u2,"start_idx"),u2.forEach(a),ac=t(es,"\uC640 "),En=i(es,"CODE",{});var w2=r(En);nc=t(w2,"end_idx"),w2.forEach(a),tc=t(es,"\uB97C \uC5BB\uC2B5\uB2C8\uB2E4."),es.forEach(a),ec=j(D),vn=i(D,"LI",{});var f2=r(vn);pc=t(f2,"\uD1A0\uD06C\uB098\uC774\uC800\uB85C \uB2F5\uBCC0\uC744 \uB514\uCF54\uB529\uD569\uB2C8\uB2E4."),f2.forEach(a),D.forEach(a),ne=j(s),d(bl.$$.fragment,s),this.h()},h(){h(T,"name","hf:doc:metadata"),h(T,"content",JSON.stringify(Z2)),h(w,"id","document_question_answering"),h(w,"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"),h(w,"href","#document_question_answering"),h(I,"class","relative group"),h(Zs,"href","https://huggingface.co/datasets/nielsr/docvqa_1200_examples_donut"),h(Zs,"rel","nofollow"),h(Il,"href","../model_doc/layoutlmv2"),h(hs,"id","load-the-data"),h(hs,"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"),h(hs,"href","#load-the-data"),h(H,"class","relative group"),h(Fs,"href","https://rrc.cvc.uab.es/?ch=17"),h(Fs,"rel","nofollow"),h(Bs,"href","https://huggingface.co/docs/datasets/loading#local-and-remote-files"),h(Bs,"rel","nofollow"),h(L,"href","https://huggingface.co/microsoft/layoutlmv2-base-uncased/blob/main/config.json#L18"),h(L,"rel","nofollow"),h(qs,"href","https://github.com/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),h(qs,"rel","nofollow"),h(Ds,"href","../model_doc/layoutlmv2"),I2(Bl.src,yc="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/docvqa_example.jpg")||h(Bl,"src",yc),h(Bl,"alt","DocVQA Image Example"),h(Ls,"class","flex justify-center"),h(Us,"id","preprocess-the-data"),h(Us,"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"),h(Us,"href","#preprocess-the-data"),h(P,"class","relative group"),h(ys,"id","preprocessing-document-images"),h(ys,"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"),h(ys,"href","#preprocessing-document-images"),h(K,"class","relative group"),h(gs,"id","preprocessing-text-data"),h(gs,"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"),h(gs,"href","#preprocessing-text-data"),h(ss,"class","relative group"),h(ws,"id","evaluation"),h(ws,"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"),h(ws,"href","#evaluation"),h(ls,"class","relative group"),h(hl,"href","https://huggingface.co/course/chapter7/7?fw=pt#postprocessing"),h(hl,"rel","nofollow"),h(fs,"id","train"),h(fs,"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"),h(fs,"href","#train"),h(as,"class","relative group"),h(Cs,"id","inference"),h(Cs,"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"),h(Cs,"href","#inference"),h(ns,"class","relative group")},m(s,e){l(document.head,T),c(s,ps,e),c(s,I,e),l(I,w),l(w,k),U(N,k,null),l(I,Vs),l(I,R),l(R,ks),c(s,is,e),U(E,s,e),c(s,rs,e),c(s,f,e),l(f,B),c(s,G,e),c(s,O,e),l(O,_l),c(s,Rs,e),c(s,cs,e),l(cs,os),l(os,Zs),l(Zs,Te),l(os,be),l(os,Il),l(Il,Ce),l(os,_e),l(cs,Ie),l(cs,oa),l(oa,Ee),c(s,An,e),U(js,s,e),c(s,Qn,e),c(s,El,e),l(El,ve),c(s,$n,e),c(s,vl,e),l(vl,Ve),c(s,Xn,e),U(As,s,e),c(s,Nn,e),U(Qs,s,e),c(s,Gn,e),U($s,s,e),c(s,Fn,e),c(s,Vl,e),l(Vl,ke),c(s,Bn,e),c(s,kl,e),l(kl,Re),c(s,Wn,e),U(Xs,s,e),c(s,zn,e),c(s,Rl,e),l(Rl,Ze),c(s,Sn,e),U(Ns,s,e),c(s,qn,e),c(s,H,e),l(H,hs),l(hs,ja),U(Gs,ja,null),l(H,Ae),l(H,ha),l(ha,Qe),c(s,Yn,e),c(s,W,e),l(W,$e),l(W,Fs),l(Fs,Xe),l(W,Ne),l(W,Bs),l(Bs,Ge),l(W,Fe),c(s,Dn,e),U(Ws,s,e),c(s,On,e),c(s,Zl,e),l(Zl,Be),c(s,Hn,e),U(zs,s,e),c(s,Ln,e),c(s,Al,e),l(Al,We),c(s,Pn,e),c(s,b,e),l(b,Ql),l(Ql,Ma),l(Ma,ze),l(Ql,Se),l(b,qe),l(b,$l),l($l,da),l(da,Ye),l($l,De),l(b,Oe),l(b,Xl),l(Xl,Ua),l(Ua,He),l(Xl,Le),l(b,Pe),l(b,Nl),l(Nl,ma),l(ma,Ke),l(Nl,sp),l(b,lp),l(b,Ms),l(Ms,ya),l(ya,ap),l(Ms,np),l(Ms,Ja),l(Ja,tp),l(Ms,ep),l(b,pp),l(b,Gl),l(Gl,xa),l(xa,ip),l(Gl,rp),c(s,Kn,e),c(s,ds,e),l(ds,cp),l(ds,ga),l(ga,op),l(ds,jp),c(s,st,e),U(Ss,s,e),c(s,lt,e),c(s,Z,e),l(Z,hp),l(Z,ua),l(ua,Mp),l(Z,dp),l(Z,L),l(L,Up),l(L,wa),l(wa,mp),l(L,yp),l(Z,Jp),l(Z,qs),l(qs,xp),l(Z,gp),c(s,at,e),U(Ys,s,e),c(s,nt,e),c(s,z,e),l(z,up),l(z,fa),l(fa,wp),l(z,fp),l(z,Ds),l(Ds,Ta),l(Ta,Tp),l(Ds,bp),l(z,Cp),c(s,tt,e),U(Os,s,e),c(s,et,e),c(s,Fl,e),l(Fl,_p),c(s,pt,e),U(Hs,s,e),c(s,it,e),c(s,Ls,e),l(Ls,Bl),c(s,rt,e),c(s,P,e),l(P,Us),l(Us,ba),U(Ps,ba,null),l(P,Ip),l(P,Ca),l(Ca,Ep),c(s,ct,e),c(s,ms,e),l(ms,vp),l(ms,_a),l(_a,Vp),l(ms,kp),c(s,ot,e),U(Ks,s,e),c(s,jt,e),c(s,K,e),l(K,ys),l(ys,Ia),U(sl,Ia,null),l(K,Rp),l(K,Ea),l(Ea,Zp),c(s,ht,e),c(s,Js,e),l(Js,Ap),l(Js,va),l(va,Qp),l(Js,$p),c(s,Mt,e),U(ll,s,e),c(s,dt,e),c(s,xs,e),l(xs,Xp),l(xs,Va),l(Va,Np),l(xs,Gp),c(s,Ut,e),U(al,s,e),c(s,mt,e),c(s,ss,e),l(ss,gs),l(gs,ka),U(nl,ka,null),l(ss,Fp),l(ss,Ra),l(Ra,Bp),c(s,yt,e),c(s,C,e),l(C,Wp),l(C,Za),l(Za,zp),l(C,Sp),l(C,Aa),l(Aa,qp),l(C,Yp),l(C,Qa),l(Qa,Dp),l(C,Op),l(C,$a),l($a,Hp),l(C,Lp),l(C,Xa),l(Xa,Pp),l(C,Kp),c(s,Jt,e),U(tl,s,e),c(s,xt,e),c(s,A,e),l(A,si),l(A,Na),l(Na,li),l(A,ai),l(A,Ga),l(Ga,ni),l(A,ti),l(A,Fa),l(Fa,ei),l(A,pi),c(s,gt,e),c(s,Wl,e),l(Wl,ii),c(s,ut,e),c(s,g,e),l(g,ri),l(g,Ba),l(Ba,ci),l(g,oi),l(g,Wa),l(Wa,ji),l(g,hi),l(g,za),l(za,Mi),l(g,di),l(g,Sa),l(Sa,Ui),l(g,mi),l(g,qa),l(qa,yi),l(g,Ji),l(g,Ya),l(Ya,xi),l(g,gi),l(g,Da),l(Da,ui),l(g,wi),l(g,Oa),l(Oa,fi),l(g,Ti),l(g,Ha),l(Ha,bi),l(g,Ci),c(s,wt,e),U(el,s,e),c(s,ft,e),c(s,zl,e),l(zl,_i),c(s,Tt,e),U(pl,s,e),c(s,bt,e),c(s,Sl,e),l(Sl,Ii),c(s,Ct,e),U(il,s,e),c(s,_t,e),c(s,ql,e),l(ql,Ei),c(s,It,e),c(s,S,e),l(S,Yl),l(Yl,La),l(La,vi),l(Yl,Vi),l(S,ki),l(S,Dl),l(Dl,Pa),l(Pa,Ri),l(Dl,Zi),l(S,Ai),l(S,us),l(us,Ka),l(Ka,Qi),l(us,$i),l(us,sn),l(sn,Xi),l(us,Ni),c(s,Et,e),c(s,Ol,e),l(Ol,Gi),c(s,vt,e),U(rl,s,e),c(s,Vt,e),c(s,Hl,e),l(Hl,Fi),c(s,kt,e),U(cl,s,e),c(s,Rt,e),c(s,Ll,e),l(Ll,Bi),c(s,Zt,e),U(ol,s,e),c(s,At,e),c(s,ls,e),l(ls,ws),l(ws,ln),U(jl,ln,null),l(ls,Wi),l(ls,an),l(an,zi),c(s,Qt,e),c(s,q,e),l(q,Si),l(q,nn),l(nn,qi),l(q,Yi),l(q,hl),l(hl,Di),l(q,Oi),c(s,$t,e),c(s,as,e),l(as,fs),l(fs,tn),U(Ml,tn,null),l(as,Hi),l(as,en),l(en,Li),c(s,Xt,e),c(s,Pl,e),l(Pl,Pi),c(s,Nt,e),c(s,v,e),l(v,dl),l(dl,Ki),l(dl,pn),l(pn,sr),l(dl,lr),l(v,ar),l(v,Kl),l(Kl,rn),l(rn,nr),l(Kl,tr),l(v,er),l(v,Ul),l(Ul,pr),l(Ul,cn),l(cn,ir),l(Ul,rr),l(v,cr),l(v,ml),l(ml,or),l(ml,on),l(on,jr),l(ml,hr),l(v,Mr),l(v,sa),l(sa,jn),l(jn,dr),l(sa,Ur),c(s,Gt,e),U(yl,s,e),c(s,Ft,e),c(s,_,e),l(_,hn),l(hn,mr),l(_,yr),l(_,Mn),l(Mn,Jr),l(_,xr),l(_,dn),l(dn,gr),l(_,ur),l(_,Un),l(Un,wr),l(_,fr),l(_,mn),l(mn,Tr),l(_,br),c(s,Bt,e),U(Jl,s,e),c(s,Wt,e),c(s,la,e),l(la,Cr),c(s,zt,e),U(xl,s,e),c(s,St,e),c(s,Ts,e),l(Ts,_r),l(Ts,yn),l(yn,Ir),l(Ts,Er),c(s,qt,e),U(gl,s,e),c(s,Yt,e),c(s,bs,e),l(bs,vr),l(bs,Jn),l(Jn,Vr),l(bs,kr),c(s,Dt,e),U(ul,s,e),c(s,Ot,e),c(s,ns,e),l(ns,Cs),l(Cs,xn),U(wl,xn,null),l(ns,Rr),l(ns,gn),l(gn,Zr),c(s,Ht,e),c(s,_s,e),l(_s,Ar),l(_s,un),l(un,Qr),l(_s,$r),c(s,Lt,e),c(s,aa,e),l(aa,Xr),c(s,Pt,e),U(fl,s,e),c(s,Kt,e),c(s,na,e),l(na,Nr),c(s,se,e),U(Tl,s,e),c(s,le,e),c(s,ta,e),l(ta,Gr),c(s,ae,e),c(s,V,e),l(V,wn),l(wn,Fr),l(V,Br),l(V,fn),l(fn,Wr),l(V,zr),l(V,ts),l(ts,Sr),l(ts,Tn),l(Tn,qr),l(ts,Yr),l(ts,bn),l(bn,Dr),l(ts,Or),l(V,Hr),l(V,Q),l(Q,Cn),l(Cn,Lr),l(Q,Pr),l(Q,_n),l(_n,Kr),l(Q,sc),l(Q,In),l(In,lc),l(Q,ac),l(Q,En),l(En,nc),l(Q,tc),l(V,ec),l(V,vn),l(vn,pc),c(s,ne,e),U(bl,s,e),te=!0},p(s,[e]){const Cl={};e&2&&(Cl.$$scope={dirty:e,ctx:s}),js.$set(Cl)},i(s){te||(m(N.$$.fragment,s),m(E.$$.fragment,s),m(js.$$.fragment,s),m(As.$$.fragment,s),m(Qs.$$.fragment,s),m($s.$$.fragment,s),m(Xs.$$.fragment,s),m(Ns.$$.fragment,s),m(Gs.$$.fragment,s),m(Ws.$$.fragment,s),m(zs.$$.fragment,s),m(Ss.$$.fragment,s),m(Ys.$$.fragment,s),m(Os.$$.fragment,s),m(Hs.$$.fragment,s),m(Ps.$$.fragment,s),m(Ks.$$.fragment,s),m(sl.$$.fragment,s),m(ll.$$.fragment,s),m(al.$$.fragment,s),m(nl.$$.fragment,s),m(tl.$$.fragment,s),m(el.$$.fragment,s),m(pl.$$.fragment,s),m(il.$$.fragment,s),m(rl.$$.fragment,s),m(cl.$$.fragment,s),m(ol.$$.fragment,s),m(jl.$$.fragment,s),m(Ml.$$.fragment,s),m(yl.$$.fragment,s),m(Jl.$$.fragment,s),m(xl.$$.fragment,s),m(gl.$$.fragment,s),m(ul.$$.fragment,s),m(wl.$$.fragment,s),m(fl.$$.fragment,s),m(Tl.$$.fragment,s),m(bl.$$.fragment,s),te=!0)},o(s){y(N.$$.fragment,s),y(E.$$.fragment,s),y(js.$$.fragment,s),y(As.$$.fragment,s),y(Qs.$$.fragment,s),y($s.$$.fragment,s),y(Xs.$$.fragment,s),y(Ns.$$.fragment,s),y(Gs.$$.fragment,s),y(Ws.$$.fragment,s),y(zs.$$.fragment,s),y(Ss.$$.fragment,s),y(Ys.$$.fragment,s),y(Os.$$.fragment,s),y(Hs.$$.fragment,s),y(Ps.$$.fragment,s),y(Ks.$$.fragment,s),y(sl.$$.fragment,s),y(ll.$$.fragment,s),y(al.$$.fragment,s),y(nl.$$.fragment,s),y(tl.$$.fragment,s),y(el.$$.fragment,s),y(pl.$$.fragment,s),y(il.$$.fragment,s),y(rl.$$.fragment,s),y(cl.$$.fragment,s),y(ol.$$.fragment,s),y(jl.$$.fragment,s),y(Ml.$$.fragment,s),y(yl.$$.fragment,s),y(Jl.$$.fragment,s),y(xl.$$.fragment,s),y(gl.$$.fragment,s),y(ul.$$.fragment,s),y(wl.$$.fragment,s),y(fl.$$.fragment,s),y(Tl.$$.fragment,s),y(bl.$$.fragment,s),te=!1},d(s){a(T),s&&a(ps),s&&a(I),J(N),s&&a(is),J(E,s),s&&a(rs),s&&a(f),s&&a(G),s&&a(O),s&&a(Rs),s&&a(cs),s&&a(An),J(js,s),s&&a(Qn),s&&a(El),s&&a($n),s&&a(vl),s&&a(Xn),J(As,s),s&&a(Nn),J(Qs,s),s&&a(Gn),J($s,s),s&&a(Fn),s&&a(Vl),s&&a(Bn),s&&a(kl),s&&a(Wn),J(Xs,s),s&&a(zn),s&&a(Rl),s&&a(Sn),J(Ns,s),s&&a(qn),s&&a(H),J(Gs),s&&a(Yn),s&&a(W),s&&a(Dn),J(Ws,s),s&&a(On),s&&a(Zl),s&&a(Hn),J(zs,s),s&&a(Ln),s&&a(Al),s&&a(Pn),s&&a(b),s&&a(Kn),s&&a(ds),s&&a(st),J(Ss,s),s&&a(lt),s&&a(Z),s&&a(at),J(Ys,s),s&&a(nt),s&&a(z),s&&a(tt),J(Os,s),s&&a(et),s&&a(Fl),s&&a(pt),J(Hs,s),s&&a(it),s&&a(Ls),s&&a(rt),s&&a(P),J(Ps),s&&a(ct),s&&a(ms),s&&a(ot),J(Ks,s),s&&a(jt),s&&a(K),J(sl),s&&a(ht),s&&a(Js),s&&a(Mt),J(ll,s),s&&a(dt),s&&a(xs),s&&a(Ut),J(al,s),s&&a(mt),s&&a(ss),J(nl),s&&a(yt),s&&a(C),s&&a(Jt),J(tl,s),s&&a(xt),s&&a(A),s&&a(gt),s&&a(Wl),s&&a(ut),s&&a(g),s&&a(wt),J(el,s),s&&a(ft),s&&a(zl),s&&a(Tt),J(pl,s),s&&a(bt),s&&a(Sl),s&&a(Ct),J(il,s),s&&a(_t),s&&a(ql),s&&a(It),s&&a(S),s&&a(Et),s&&a(Ol),s&&a(vt),J(rl,s),s&&a(Vt),s&&a(Hl),s&&a(kt),J(cl,s),s&&a(Rt),s&&a(Ll),s&&a(Zt),J(ol,s),s&&a(At),s&&a(ls),J(jl),s&&a(Qt),s&&a(q),s&&a($t),s&&a(as),J(Ml),s&&a(Xt),s&&a(Pl),s&&a(Nt),s&&a(v),s&&a(Gt),J(yl,s),s&&a(Ft),s&&a(_),s&&a(Bt),J(Jl,s),s&&a(Wt),s&&a(la),s&&a(zt),J(xl,s),s&&a(St),s&&a(Ts),s&&a(qt),J(gl,s),s&&a(Yt),s&&a(bs),s&&a(Dt),J(ul,s),s&&a(Ot),s&&a(ns),J(wl),s&&a(Ht),s&&a(_s),s&&a(Lt),s&&a(aa),s&&a(Pt),J(fl,s),s&&a(Kt),s&&a(na),s&&a(se),J(Tl,s),s&&a(le),s&&a(ta),s&&a(ae),s&&a(V),s&&a(ne),J(bl,s)}}}const Z2={local:"document_question_answering",sections:[{local:"load-the-data",title:"\uB370\uC774\uD130 \uBD88\uB7EC\uC624\uAE30 "},{local:"preprocess-the-data",sections:[{local:"preprocessing-document-images",title:"\uBB38\uC11C \uC774\uBBF8\uC9C0 \uC804\uCC98\uB9AC "},{local:"preprocessing-text-data",title:"\uD14D\uC2A4\uD2B8 \uB370\uC774\uD130 \uC804\uCC98\uB9AC "}],title:"\uB370\uC774\uD130 \uC804\uCC98\uB9AC "},{local:"evaluation",title:"\uD3C9\uAC00 "},{local:"train",title:"\uD6C8\uB828 "},{local:"inference",title:"\uCD94\uB860 "}],title:"\uBB38\uC11C \uC9C8\uC758 \uC751\uB2F5(Document Question Answering) "};function A2(Zn){return E2(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class F2 extends T2{constructor(T){super();b2(this,T,A2,R2,C2,{})}}export{F2 as default,Z2 as metadata};
