import{s as ds,n as Ts,o as ys}from"../chunks/scheduler.d6170356.js";import{S as Js,i as ws,g as p,s as l,r as u,A as gs,h as i,f as n,c as e,j as js,u as r,x as c,k as fs,y as bs,a as t,v as h,d as m,t as M,w as j}from"../chunks/index.fcd4cc08.js";import{C as ls}from"../chunks/CodeBlock.7b16bdef.js";import{H as B}from"../chunks/Heading.8660bd0e.js";function ks(es){let o,Z,x,A,f,W,d,ps='<a href="https://github.com/tomaarsen/SpanMarkerNER" rel="nofollow">SpanMarker</a> is a framework for training powerful Named Entity Recognition models using familiar encoders such as BERT, RoBERTa and DeBERTa. Tightly implemented on top of the 🤗 Transformers library, SpanMarker can take good advantage of it. As a result, SpanMarker will be intuitive to use for anyone familiar with Transformers.',z,T,V,y,is='You can find <code>span_marker</code> models by filtering at the left of the <a href="https://huggingface.co/models?library=span-marker" rel="nofollow">models page</a>.',F,J,os="All models on the Hub come with these useful features:",H,w,us="<li>An automatically generated model card with a brief description.</li> <li>An interactive widget you can use to play with the model directly in the browser.</li> <li>An Inference API that allows you to make inference requests.</li>",G,g,L,b,rs='To get started, you can follow the <a href="https://tomaarsen.github.io/SpanMarkerNER/install.html" rel="nofollow">SpanMarker installation guide</a>. You can also use the following one-line install through pip:',Y,k,D,U,Q,$,cs="All <code>span_marker</code> models can easily be loaded from the Hub.",X,I,R,q,hs='Once loaded, you can use <a href="https://tomaarsen.github.io/SpanMarkerNER/api/span_marker.modeling.html#span_marker.modeling.SpanMarkerModel.predict" rel="nofollow"><code>SpanMarkerModel.predict</code></a> to perform inference.',P,_,O,S,K,C,ms="If you want to load a specific SpanMarker model, you can click <code>Use in SpanMarker</code> and you will be given a working snippet!",ss,N,as,v,Ms='<li>SpanMarker <a href="https://github.com/tomaarsen/SpanMarkerNER" rel="nofollow">repository</a></li> <li>SpanMarker <a href="https://tomaarsen.github.io/SpanMarkerNER" rel="nofollow">docs</a></li>',ns,E,ts;return f=new B({props:{title:"Using SpanMarker at Hugging Face",local:"using-spanmarker-at-hugging-face",headingTag:"h1"}}),T=new B({props:{title:"Exploring SpanMarker in the Hub",local:"exploring-spanmarker-in-the-hub",headingTag:"h2"}}),g=new B({props:{title:"Installation",local:"installation",headingTag:"h2"}}),k=new ls({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwc3Bhbl9tYXJrZXI=",highlighted:'pip <span class="hljs-keyword">install</span> -U span_marker',wrap:!1}}),U=new B({props:{title:"Using existing models",local:"using-existing-models",headingTag:"h2"}}),I=new ls({props:{code:"ZnJvbSUyMHNwYW5fbWFya2VyJTIwaW1wb3J0JTIwU3Bhbk1hcmtlck1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBTcGFuTWFya2VyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnRvbWFhcnNlbiUyRnNwYW4tbWFya2VyLWJlcnQtYmFzZS1mZXduZXJkLWZpbmUtc3VwZXIlMjIp",highlighted:`<span class="hljs-keyword">from</span> span_marker <span class="hljs-keyword">import</span> SpanMarkerModel

model = SpanMarkerModel.from_pretrained(<span class="hljs-string">&quot;tomaarsen/span-marker-bert-base-fewnerd-fine-super&quot;</span>)`,wrap:!1}}),_=new ls({props:{code:"bW9kZWwucHJlZGljdCglMjJBbWVsaWElMjBFYXJoYXJ0JTIwZmxldyUyMGhlciUyMHNpbmdsZSUyMGVuZ2luZSUyMExvY2toZWVkJTIwVmVnYSUyMDVCJTIwYWNyb3NzJTIwdGhlJTIwQXRsYW50aWMlMjB0byUyMFBhcmlzLiUyMik=",highlighted:'model.predict(<span class="hljs-string">&quot;Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.&quot;</span>)',wrap:!1}}),S=new ls({props:{code:"JTVCJTBBJTIwJTIwJTIwJTIwJTdCJTIyc3BhbiUyMiUzQSUyMCUyMkFtZWxpYSUyMEVhcmhhcnQlMjIlMkMlMjAlMjJsYWJlbCUyMiUzQSUyMCUyMnBlcnNvbi1vdGhlciUyMiUyQyUyMCUyMnNjb3JlJTIyJTNBJT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span&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Amelia Earhart&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;person-other&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;score&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0.7629689574241638</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_start_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_end_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">14</span><span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
    <span class="hljs-punctuation">{</span><span class="hljs-attr">&quot;span&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Lockheed Vega 5B&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;product-airplane&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;score&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0.9833564758300781</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_start_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">38</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_end_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">54</span><span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
    <span class="hljs-punctuation">{</span><span class="hljs-attr">&quot;span&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Atlantic&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;location-bodiesofwater&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;score&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0.7621214389801025</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_start_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">66</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_end_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">74</span><span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
    <span class="hljs-punctuation">{</span><span class="hljs-attr">&quot;span&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Paris&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;label&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;location-GPE&quot;</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;score&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0.9807717204093933</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_start_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">78</span><span class="hljs-punctuation">,</span> <span class="hljs-attr">&quot;char_end_index&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">83</span><span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>`,wrap:!1}}),N=new B({props:{title:"Additional resources",local:"additional-resources",headingTag:"h2"}}),{c(){o=p("meta"),Z=l(),x=p("p"),A=l(),u(f.$$.fragment),W=l(),d=p("p"),d.innerHTML=ps,z=l(),u(T.$$.fragment),V=l(),y=p("p"),y.innerHTML=is,F=l(),J=p("p"),J.textContent=os,H=l(),w=p("ol"),w.innerHTML=us,G=l(),u(g.$$.fragment),L=l(),b=p("p"),b.innerHTML=rs,Y=l(),u(k.$$.fragment),D=l(),u(U.$$.fragment),Q=l(),$=p("p"),$.innerHTML=cs,X=l(),u(I.$$.fragment),R=l(),q=p("p"),q.innerHTML=hs,P=l(),u(_.$$.fragment),O=l(),u(S.$$.fragment),K=l(),C=p("p"),C.innerHTML=ms,ss=l(),u(N.$$.fragment),as=l(),v=p("ul"),v.innerHTML=Ms,ns=l(),E=p("p"),this.h()},l(s){const a=gs("svelte-u9bgzb",document.head);o=i(a,"META",{name:!0,content:!0}),a.forEach(n),Z=e(s),x=i(s,"P",{}),js(x).forEach(n),A=e(s),r(f.$$.fragment,s),W=e(s),d=i(s,"P",{"data-svelte-h":!0}),c(d)!=="svelte-ddh20z"&&(d.innerHTML=ps),z=e(s),r(T.$$.fragment,s),V=e(s),y=i(s,"P",{"data-svelte-h":!0}),c(y)!=="svelte-1uqwny"&&(y.innerHTML=is),F=e(s),J=i(s,"P",{"data-svelte-h":!0}),c(J)!=="svelte-qgdcoc"&&(J.textContent=os),H=e(s),w=i(s,"OL",{"data-svelte-h":!0}),c(w)!=="svelte-15umf4s"&&(w.innerHTML=us),G=e(s),r(g.$$.fragment,s),L=e(s),b=i(s,"P",{"data-svelte-h":!0}),c(b)!=="svelte-62b6hy"&&(b.innerHTML=rs),Y=e(s),r(k.$$.fragment,s),D=e(s),r(U.$$.fragment,s),Q=e(s),$=i(s,"P",{"data-svelte-h":!0}),c($)!=="svelte-17736hy"&&($.innerHTML=cs),X=e(s),r(I.$$.fragment,s),R=e(s),q=i(s,"P",{"data-svelte-h":!0}),c(q)!=="svelte-13z73t"&&(q.innerHTML=hs),P=e(s),r(_.$$.fragment,s),O=e(s),r(S.$$.fragment,s),K=e(s),C=i(s,"P",{"data-svelte-h":!0}),c(C)!=="svelte-tl4fz"&&(C.innerHTML=ms),ss=e(s),r(N.$$.fragment,s),as=e(s),v=i(s,"UL",{"data-svelte-h":!0}),c(v)!=="svelte-1rwn6zl"&&(v.innerHTML=Ms),ns=e(s),E=i(s,"P",{}),js(E).forEach(n),this.h()},h(){fs(o,"name","hf:doc:metadata"),fs(o,"content",Us)},m(s,a){bs(document.head,o),t(s,Z,a),t(s,x,a),t(s,A,a),h(f,s,a),t(s,W,a),t(s,d,a),t(s,z,a),h(T,s,a),t(s,V,a),t(s,y,a),t(s,F,a),t(s,J,a),t(s,H,a),t(s,w,a),t(s,G,a),h(g,s,a),t(s,L,a),t(s,b,a),t(s,Y,a),h(k,s,a),t(s,D,a),h(U,s,a),t(s,Q,a),t(s,$,a),t(s,X,a),h(I,s,a),t(s,R,a),t(s,q,a),t(s,P,a),h(_,s,a),t(s,O,a),h(S,s,a),t(s,K,a),t(s,C,a),t(s,ss,a),h(N,s,a),t(s,as,a),t(s,v,a),t(s,ns,a),t(s,E,a),ts=!0},p:Ts,i(s){ts||(m(f.$$.fragment,s),m(T.$$.fragment,s),m(g.$$.fragment,s),m(k.$$.fragment,s),m(U.$$.fragment,s),m(I.$$.fragment,s),m(_.$$.fragment,s),m(S.$$.fragment,s),m(N.$$.fragment,s),ts=!0)},o(s){M(f.$$.fragment,s),M(T.$$.fragment,s),M(g.$$.fragment,s),M(k.$$.fragment,s),M(U.$$.fragment,s),M(I.$$.fragment,s),M(_.$$.fragment,s),M(S.$$.fragment,s),M(N.$$.fragment,s),ts=!1},d(s){s&&(n(Z),n(x),n(A),n(W),n(d),n(z),n(V),n(y),n(F),n(J),n(H),n(w),n(G),n(L),n(b),n(Y),n(D),n(Q),n($),n(X),n(R),n(q),n(P),n(O),n(K),n(C),n(ss),n(as),n(v),n(ns),n(E)),n(o),j(f,s),j(T,s),j(g,s),j(k,s),j(U,s),j(I,s),j(_,s),j(S,s),j(N,s)}}}const Us='{"title":"Using SpanMarker at Hugging Face","local":"using-spanmarker-at-hugging-face","sections":[{"title":"Exploring SpanMarker in the Hub","local":"exploring-spanmarker-in-the-hub","sections":[],"depth":2},{"title":"Installation","local":"installation","sections":[],"depth":2},{"title":"Using existing models","local":"using-existing-models","sections":[],"depth":2},{"title":"Additional resources","local":"additional-resources","sections":[],"depth":2}],"depth":1}';function $s(es){return ys(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Cs extends Js{constructor(o){super(),ws(this,o,$s,ks,ds,{})}}export{Cs as component};
