import{S as os,i as is,s as ps,e as p,k as m,t as n,w as U,M as us,c as u,d as t,m as f,a as h,h as l,x as I,b as x,G as e,g as r,y as Q,L as cs,q as V,o as X,B as Y,v as ms}from"../../chunks/vendor-hf-doc-builder.js";import{C as ls}from"../../chunks/CodeBlock-hf-doc-builder.js";import{C as fs}from"../../chunks/CourseFloatingBanner-hf-doc-builder.js";import"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function hs(Z){let i,q,k,K,v,w,B,$,G,C,c,L,E,N,O,S,d,T,_,A,o,W,g,z,D,b,F,H,M,j,J,P;return w=new fs({props:{chapter:1,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/ko/chapter1/section8.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/ko/chapter1/section8.ipynb"}]}}),d=new ls({props:{code:`from transformers import pipeline

unmasker = pipeline("fill-mask", model="bert-base-uncased")
result = unmasker("This man works as a [MASK].")
print([r["token_str"] for r in result])

result = unmasker("This woman works as a [MASK].")
print([r["token_str"] for r in result])`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

unmasker = pipeline(<span class="hljs-string">&quot;fill-mask&quot;</span>, model=<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
result = unmasker(<span class="hljs-string">&quot;This man works as a [MASK].&quot;</span>)
<span class="hljs-built_in">print</span>([r[<span class="hljs-string">&quot;token_str&quot;</span>] <span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> result])

result = unmasker(<span class="hljs-string">&quot;This woman works as a [MASK].&quot;</span>)
<span class="hljs-built_in">print</span>([r[<span class="hljs-string">&quot;token_str&quot;</span>] <span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> result])`}}),_=new ls({props:{code:`['lawyer', 'carpenter', 'doctor', 'waiter', 'mechanic']
['nurse', 'waitress', 'teacher', 'maid', 'prostitute']`,highlighted:`[<span class="hljs-string">&#x27;lawyer&#x27;</span>, <span class="hljs-string">&#x27;carpenter&#x27;</span>, <span class="hljs-string">&#x27;doctor&#x27;</span>, <span class="hljs-string">&#x27;waiter&#x27;</span>, <span class="hljs-string">&#x27;mechanic&#x27;</span>]
[<span class="hljs-string">&#x27;nurse&#x27;</span>, <span class="hljs-string">&#x27;waitress&#x27;</span>, <span class="hljs-string">&#x27;teacher&#x27;</span>, <span class="hljs-string">&#x27;maid&#x27;</span>, <span class="hljs-string">&#x27;prostitute&#x27;</span>]`}}),{c(){i=p("meta"),q=m(),k=p("h1"),K=n("\uD3B8\uD5A5\uACFC \uD55C\uACC4"),v=m(),U(w.$$.fragment),B=m(),$=p("p"),G=n("\uC0AC\uC804 \uD559\uC2B5\uB41C \uD639\uC740 \uBBF8\uC138 \uC870\uC815\uB41C \uBAA8\uB378\uC744 \uD504\uB85C\uB355\uC158 \uB2E8\uACC4\uC5D0\uC11C \uC0AC\uC6A9\uD558\uC2E4 \uACC4\uD68D\uC774\uB77C\uBA74, \uC774\uB7EC\uD55C \uBAA8\uB378\uB4E4\uC740 \uAC15\uB825\uD55C \uD234\uC774\uC9C0\uB9CC \uD55C\uACC4\uAC00 \uC788\uC74C\uC744 \uBC18\uB4DC\uC2DC \uBA85\uC2EC\uD558\uC154\uC57C \uD569\uB2C8\uB2E4. \uAC00\uC7A5 \uD070 \uD55C\uACC4\uC810\uC740 \uB9AC\uC11C\uCC98\uB4E4\uC774 \uBB34\uC218\uD788 \uB9CE\uC740 \uC591\uC758 \uB370\uC774\uD130\uB97C \uC0AC\uC804 \uD559\uC2B5\uC5D0 \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574, \uC778\uD130\uB137\uC0C1\uC5D0\uC11C \uBAA8\uC744 \uC218 \uC788\uB294 \uC591\uC9C8\uC758 \uB370\uC774\uD130\uC640 \uD568\uAED8 \uADF8\uB807\uC9C0 \uC54A\uC740 \uB370\uC774\uD130\uAE4C\uC9C0 \uC218\uC9D1\uD588\uC744 \uAC00\uB2A5\uC131\uC774 \uC788\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4."),C=m(),c=p("p"),L=n("\uC774\uB97C \uBE60\uB974\uAC8C \uBCF4\uC5EC\uB4DC\uB9AC\uAE30 \uC704\uD574 "),E=p("code"),N=n("fill-mask"),O=n(" \uD30C\uC774\uD504\uB77C\uC778\uC5D0 BERT \uBAA8\uB378\uC744 \uC5F0\uACB0\uD55C \uC608\uC81C\uB97C \uB2E4\uC2DC \uC0B4\uD3B4\uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),S=m(),U(d.$$.fragment),T=m(),U(_.$$.fragment),A=m(),o=p("p"),W=n("\uC8FC\uC5B4\uC758 \uC131\uBCC4\uB9CC \uBC14\uAFBC \uB450 \uBB38\uC7A5\uC5D0\uC11C \uBE60\uC9C4 \uB2E8\uC5B4\uB97C \uCC44\uC6B8 \uB54C, \uBAA8\uB378\uC740 \uC131\uBCC4\uACFC \uAD00\uACC4 \uC5C6\uB294 \uACF5\uD1B5 \uB2F5\uBCC0(waiter/waitress)\uC744 \uD558\uB098\uB9CC \uB0B4\uB193\uC558\uC2B5\uB2C8\uB2E4.  \uB2E4\uB978 \uB2F5\uBCC0\uB4E4\uC740 \uC77C\uBC18\uC801\uC73C\uB85C \uD2B9\uC815 \uC131\uBCC4\uC5D0 \uD3B8\uD5A5\uB41C \uB2F5\uBCC0\uC774\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uB97C\uD14C\uBA74, \uBAA8\uB378\uC740 \uB9E4\uCD98\uC774\uB77C\uB294 \uB2E8\uC5B4\uC640 \uC5F0\uAD00\uB41C \uC0C1\uC704 5\uAC1C\uC758 \uB2E8\uC5B4\uC5D0 \u201C\uC5EC\uC131\u201D\uACFC \u201C\uC77C\u201D\uC744 \uD3EC\uD568\uC2DC\uCF30\uC2B5\uB2C8\uB2E4. BERT\uAC00 \uC804\uCCB4 \uC778\uD130\uB137 \uC0C1\uC758 \uD14D\uC2A4\uD2B8\uB97C \uC774\uC6A9\uD558\uC5EC \uC0AC\uC804 \uD559\uC2B5\uB41C \uAC83\uC774 \uC544\uB2C8\uB77C "),g=p("a"),z=n("English Wikipedia"),D=n(" \uC640 "),b=p("a"),F=n("BookCorpus"),H=n(" \uAC19\uC774 \uC0C1\uB2F9\uD788 \uC911\uB9BD\uC801\uC778 \uB370\uC774\uD130\uB97C \uC774\uC6A9\uD574 \uC0AC\uC804 \uD559\uC2B5 \uB418\uC5C8\uC74C\uC5D0\uB3C4 \uBD88\uAD6C\uD558\uACE0 \uC774\uB7EC\uD55C \uD604\uC0C1\uC774 \uC77C\uC5B4\uB0A9\uB2C8\uB2E4."),M=m(),j=p("p"),J=n("\uB530\uB77C\uC11C \uC774\uB7EC\uD55C \uD234\uC744 \uC0AC\uC6A9\uD558\uC2E4 \uB54C\uC5D0\uB294 \uD56D\uC0C1 \uC5EC\uB7EC\uBD84\uC774 \uC0AC\uC6A9\uD560 \uC6D0\uBCF8 \uBAA8\uB378\uC774 \uC820\uB354, \uC778\uC885, \uB3D9\uC131\uC560 \uB4F1\uC5D0 \uB300\uD574 \uD610\uC624 \uD45C\uD604\uC744 \uD560 \uAC00\uB2A5\uC131\uC774 \uB9E4\uC6B0 \uB192\uB2E4\uB294 \uAC83\uC744 \uC8FC\uC758\uD558\uC154\uC57C \uD569\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uBAA8\uB378\uC740 \uBBF8\uC138 \uC870\uC815\uC744 \uAC70\uCCD0\uB3C4 \uB0B4\uC81C\uB41C \uD3B8\uD5A5\uC131\uC744 \uC5C6\uC560\uC9C0 \uBABB\uD569\uB2C8\uB2E4."),this.h()},l(s){const a=us('[data-svelte="svelte-1phssyn"]',document.head);i=u(a,"META",{name:!0,content:!0}),a.forEach(t),q=f(s),k=u(s,"H1",{id:!0});var ss=h(k);K=l(ss,"\uD3B8\uD5A5\uACFC \uD55C\uACC4"),ss.forEach(t),v=f(s),I(w.$$.fragment,s),B=f(s),$=u(s,"P",{});var ts=h($);G=l(ts,"\uC0AC\uC804 \uD559\uC2B5\uB41C \uD639\uC740 \uBBF8\uC138 \uC870\uC815\uB41C \uBAA8\uB378\uC744 \uD504\uB85C\uB355\uC158 \uB2E8\uACC4\uC5D0\uC11C \uC0AC\uC6A9\uD558\uC2E4 \uACC4\uD68D\uC774\uB77C\uBA74, \uC774\uB7EC\uD55C \uBAA8\uB378\uB4E4\uC740 \uAC15\uB825\uD55C \uD234\uC774\uC9C0\uB9CC \uD55C\uACC4\uAC00 \uC788\uC74C\uC744 \uBC18\uB4DC\uC2DC \uBA85\uC2EC\uD558\uC154\uC57C \uD569\uB2C8\uB2E4. \uAC00\uC7A5 \uD070 \uD55C\uACC4\uC810\uC740 \uB9AC\uC11C\uCC98\uB4E4\uC774 \uBB34\uC218\uD788 \uB9CE\uC740 \uC591\uC758 \uB370\uC774\uD130\uB97C \uC0AC\uC804 \uD559\uC2B5\uC5D0 \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574, \uC778\uD130\uB137\uC0C1\uC5D0\uC11C \uBAA8\uC744 \uC218 \uC788\uB294 \uC591\uC9C8\uC758 \uB370\uC774\uD130\uC640 \uD568\uAED8 \uADF8\uB807\uC9C0 \uC54A\uC740 \uB370\uC774\uD130\uAE4C\uC9C0 \uC218\uC9D1\uD588\uC744 \uAC00\uB2A5\uC131\uC774 \uC788\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4."),ts.forEach(t),C=f(s),c=u(s,"P",{});var R=h(c);L=l(R,"\uC774\uB97C \uBE60\uB974\uAC8C \uBCF4\uC5EC\uB4DC\uB9AC\uAE30 \uC704\uD574 "),E=u(R,"CODE",{});var as=h(E);N=l(as,"fill-mask"),as.forEach(t),O=l(R," \uD30C\uC774\uD504\uB77C\uC778\uC5D0 BERT \uBAA8\uB378\uC744 \uC5F0\uACB0\uD55C \uC608\uC81C\uB97C \uB2E4\uC2DC \uC0B4\uD3B4\uBCF4\uACA0\uC2B5\uB2C8\uB2E4:"),R.forEach(t),S=f(s),I(d.$$.fragment,s),T=f(s),I(_.$$.fragment,s),A=f(s),o=u(s,"P",{});var y=h(o);W=l(y,"\uC8FC\uC5B4\uC758 \uC131\uBCC4\uB9CC \uBC14\uAFBC \uB450 \uBB38\uC7A5\uC5D0\uC11C \uBE60\uC9C4 \uB2E8\uC5B4\uB97C \uCC44\uC6B8 \uB54C, \uBAA8\uB378\uC740 \uC131\uBCC4\uACFC \uAD00\uACC4 \uC5C6\uB294 \uACF5\uD1B5 \uB2F5\uBCC0(waiter/waitress)\uC744 \uD558\uB098\uB9CC \uB0B4\uB193\uC558\uC2B5\uB2C8\uB2E4.  \uB2E4\uB978 \uB2F5\uBCC0\uB4E4\uC740 \uC77C\uBC18\uC801\uC73C\uB85C \uD2B9\uC815 \uC131\uBCC4\uC5D0 \uD3B8\uD5A5\uB41C \uB2F5\uBCC0\uC774\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uB97C\uD14C\uBA74, \uBAA8\uB378\uC740 \uB9E4\uCD98\uC774\uB77C\uB294 \uB2E8\uC5B4\uC640 \uC5F0\uAD00\uB41C \uC0C1\uC704 5\uAC1C\uC758 \uB2E8\uC5B4\uC5D0 \u201C\uC5EC\uC131\u201D\uACFC \u201C\uC77C\u201D\uC744 \uD3EC\uD568\uC2DC\uCF30\uC2B5\uB2C8\uB2E4. BERT\uAC00 \uC804\uCCB4 \uC778\uD130\uB137 \uC0C1\uC758 \uD14D\uC2A4\uD2B8\uB97C \uC774\uC6A9\uD558\uC5EC \uC0AC\uC804 \uD559\uC2B5\uB41C \uAC83\uC774 \uC544\uB2C8\uB77C "),g=u(y,"A",{href:!0,rel:!0});var es=h(g);z=l(es,"English Wikipedia"),es.forEach(t),D=l(y," \uC640 "),b=u(y,"A",{href:!0,rel:!0});var rs=h(b);F=l(rs,"BookCorpus"),rs.forEach(t),H=l(y," \uAC19\uC774 \uC0C1\uB2F9\uD788 \uC911\uB9BD\uC801\uC778 \uB370\uC774\uD130\uB97C \uC774\uC6A9\uD574 \uC0AC\uC804 \uD559\uC2B5 \uB418\uC5C8\uC74C\uC5D0\uB3C4 \uBD88\uAD6C\uD558\uACE0 \uC774\uB7EC\uD55C \uD604\uC0C1\uC774 \uC77C\uC5B4\uB0A9\uB2C8\uB2E4."),y.forEach(t),M=f(s),j=u(s,"P",{});var ns=h(j);J=l(ns,"\uB530\uB77C\uC11C \uC774\uB7EC\uD55C \uD234\uC744 \uC0AC\uC6A9\uD558\uC2E4 \uB54C\uC5D0\uB294 \uD56D\uC0C1 \uC5EC\uB7EC\uBD84\uC774 \uC0AC\uC6A9\uD560 \uC6D0\uBCF8 \uBAA8\uB378\uC774 \uC820\uB354, \uC778\uC885, \uB3D9\uC131\uC560 \uB4F1\uC5D0 \uB300\uD574 \uD610\uC624 \uD45C\uD604\uC744 \uD560 \uAC00\uB2A5\uC131\uC774 \uB9E4\uC6B0 \uB192\uB2E4\uB294 \uAC83\uC744 \uC8FC\uC758\uD558\uC154\uC57C \uD569\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uBAA8\uB378\uC740 \uBBF8\uC138 \uC870\uC815\uC744 \uAC70\uCCD0\uB3C4 \uB0B4\uC81C\uB41C \uD3B8\uD5A5\uC131\uC744 \uC5C6\uC560\uC9C0 \uBABB\uD569\uB2C8\uB2E4."),ns.forEach(t),this.h()},h(){x(i,"name","hf:doc:metadata"),x(i,"content",JSON.stringify(ks)),x(k,"id",""),x(g,"href","https://huggingface.co/datasets/wikipedia"),x(g,"rel","nofollow"),x(b,"href","https://huggingface.co/datasets/bookcorpus"),x(b,"rel","nofollow")},m(s,a){e(document.head,i),r(s,q,a),r(s,k,a),e(k,K),r(s,v,a),Q(w,s,a),r(s,B,a),r(s,$,a),e($,G),r(s,C,a),r(s,c,a),e(c,L),e(c,E),e(E,N),e(c,O),r(s,S,a),Q(d,s,a),r(s,T,a),Q(_,s,a),r(s,A,a),r(s,o,a),e(o,W),e(o,g),e(g,z),e(o,D),e(o,b),e(b,F),e(o,H),r(s,M,a),r(s,j,a),e(j,J),P=!0},p:cs,i(s){P||(V(w.$$.fragment,s),V(d.$$.fragment,s),V(_.$$.fragment,s),P=!0)},o(s){X(w.$$.fragment,s),X(d.$$.fragment,s),X(_.$$.fragment,s),P=!1},d(s){t(i),s&&t(q),s&&t(k),s&&t(v),Y(w,s),s&&t(B),s&&t($),s&&t(C),s&&t(c),s&&t(S),Y(d,s),s&&t(T),Y(_,s),s&&t(A),s&&t(o),s&&t(M),s&&t(j)}}}const ks={local:"",title:"\uD3B8\uD5A5\uACFC \uD55C\uACC4"};function ws(Z){return ms(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xs extends os{constructor(i){super();is(this,i,ws,hs,ps,{})}}export{xs as default,ks as metadata};
