import{s as ys,n as Js,o as ws}from"../chunks/scheduler.d6170356.js";import{S as gs,i as bs,g as p,s as l,r as o,A as $s,h as i,f as n,c as e,j as ds,u,x as j,k as Ts,y as ks,a as t,v as r,d as c,t as h,w as m}from"../chunks/index.fcd4cc08.js";import{C as ps}from"../chunks/CodeBlock.7b16bdef.js";import{H as Z,E as Us}from"../chunks/EditOnGithub.da2b595c.js";function Is(is){let M,A,x,W,f,z,d,os='<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.',V,T,F,y,us='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>.',G,J,rs="All models on the Hub come with these useful features:",H,w,cs="<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>",L,g,Y,b,hs='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:',D,$,Q,k,X,U,ms="All <code>span_marker</code> models can easily be loaded from the Hub.",R,I,P,q,Ms='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.',O,_,K,S,ss,C,js="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!",as,N,ns,v,fs='<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>',ts,E,ls,B,es;return f=new Z({props:{title:"Using SpanMarker at Hugging Face",local:"using-spanmarker-at-hugging-face",headingTag:"h1"}}),T=new Z({props:{title:"Exploring SpanMarker in the Hub",local:"exploring-spanmarker-in-the-hub",headingTag:"h2"}}),g=new Z({props:{title:"Installation",local:"installation",headingTag:"h2"}}),$=new ps({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1VJTIwc3Bhbl9tYXJrZXI=",highlighted:'pip <span class="hljs-keyword">install</span> -U span_marker',wrap:!1}}),k=new Z({props:{title:"Using existing models",local:"using-existing-models",headingTag:"h2"}}),I=new ps({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 ps({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 ps({props:{code:"JTVCJTBBJTIwJTIwJTIwJTIwJTdCJTIyc3BhbiUyMiUzQSUyMCUyMkFtZWxpYSUyMEVhcmhhcnQlMjIlMkMlMjAlMjJsYWJlbCUyMiUzQSUyMCUyMnBlcnNvbi1vdGhlciUyMiUyQyUyMCUyMn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span><span class="hljs-attr">&quot;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 Z({props:{title:"Additional resources",local:"additional-resources",headingTag:"h2"}}),E=new Us({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/span_marker.md"}}),{c(){M=p("meta"),A=l(),x=p("p"),W=l(),o(f.$$.fragment),z=l(),d=p("p"),d.innerHTML=os,V=l(),o(T.$$.fragment),F=l(),y=p("p"),y.innerHTML=us,G=l(),J=p("p"),J.textContent=rs,H=l(),w=p("ol"),w.innerHTML=cs,L=l(),o(g.$$.fragment),Y=l(),b=p("p"),b.innerHTML=hs,D=l(),o($.$$.fragment),Q=l(),o(k.$$.fragment),X=l(),U=p("p"),U.innerHTML=ms,R=l(),o(I.$$.fragment),P=l(),q=p("p"),q.innerHTML=Ms,O=l(),o(_.$$.fragment),K=l(),o(S.$$.fragment),ss=l(),C=p("p"),C.innerHTML=js,as=l(),o(N.$$.fragment),ns=l(),v=p("ul"),v.innerHTML=fs,ts=l(),o(E.$$.fragment),ls=l(),B=p("p"),this.h()},l(s){const a=$s("svelte-u9bgzb",document.head);M=i(a,"META",{name:!0,content:!0}),a.forEach(n),A=e(s),x=i(s,"P",{}),ds(x).forEach(n),W=e(s),u(f.$$.fragment,s),z=e(s),d=i(s,"P",{"data-svelte-h":!0}),j(d)!=="svelte-ddh20z"&&(d.innerHTML=os),V=e(s),u(T.$$.fragment,s),F=e(s),y=i(s,"P",{"data-svelte-h":!0}),j(y)!=="svelte-1uqwny"&&(y.innerHTML=us),G=e(s),J=i(s,"P",{"data-svelte-h":!0}),j(J)!=="svelte-qgdcoc"&&(J.textContent=rs),H=e(s),w=i(s,"OL",{"data-svelte-h":!0}),j(w)!=="svelte-15umf4s"&&(w.innerHTML=cs),L=e(s),u(g.$$.fragment,s),Y=e(s),b=i(s,"P",{"data-svelte-h":!0}),j(b)!=="svelte-62b6hy"&&(b.innerHTML=hs),D=e(s),u($.$$.fragment,s),Q=e(s),u(k.$$.fragment,s),X=e(s),U=i(s,"P",{"data-svelte-h":!0}),j(U)!=="svelte-17736hy"&&(U.innerHTML=ms),R=e(s),u(I.$$.fragment,s),P=e(s),q=i(s,"P",{"data-svelte-h":!0}),j(q)!=="svelte-13z73t"&&(q.innerHTML=Ms),O=e(s),u(_.$$.fragment,s),K=e(s),u(S.$$.fragment,s),ss=e(s),C=i(s,"P",{"data-svelte-h":!0}),j(C)!=="svelte-tl4fz"&&(C.innerHTML=js),as=e(s),u(N.$$.fragment,s),ns=e(s),v=i(s,"UL",{"data-svelte-h":!0}),j(v)!=="svelte-1rwn6zl"&&(v.innerHTML=fs),ts=e(s),u(E.$$.fragment,s),ls=e(s),B=i(s,"P",{}),ds(B).forEach(n),this.h()},h(){Ts(M,"name","hf:doc:metadata"),Ts(M,"content",qs)},m(s,a){ks(document.head,M),t(s,A,a),t(s,x,a),t(s,W,a),r(f,s,a),t(s,z,a),t(s,d,a),t(s,V,a),r(T,s,a),t(s,F,a),t(s,y,a),t(s,G,a),t(s,J,a),t(s,H,a),t(s,w,a),t(s,L,a),r(g,s,a),t(s,Y,a),t(s,b,a),t(s,D,a),r($,s,a),t(s,Q,a),r(k,s,a),t(s,X,a),t(s,U,a),t(s,R,a),r(I,s,a),t(s,P,a),t(s,q,a),t(s,O,a),r(_,s,a),t(s,K,a),r(S,s,a),t(s,ss,a),t(s,C,a),t(s,as,a),r(N,s,a),t(s,ns,a),t(s,v,a),t(s,ts,a),r(E,s,a),t(s,ls,a),t(s,B,a),es=!0},p:Js,i(s){es||(c(f.$$.fragment,s),c(T.$$.fragment,s),c(g.$$.fragment,s),c($.$$.fragment,s),c(k.$$.fragment,s),c(I.$$.fragment,s),c(_.$$.fragment,s),c(S.$$.fragment,s),c(N.$$.fragment,s),c(E.$$.fragment,s),es=!0)},o(s){h(f.$$.fragment,s),h(T.$$.fragment,s),h(g.$$.fragment,s),h($.$$.fragment,s),h(k.$$.fragment,s),h(I.$$.fragment,s),h(_.$$.fragment,s),h(S.$$.fragment,s),h(N.$$.fragment,s),h(E.$$.fragment,s),es=!1},d(s){s&&(n(A),n(x),n(W),n(z),n(d),n(V),n(F),n(y),n(G),n(J),n(H),n(w),n(L),n(Y),n(b),n(D),n(Q),n(X),n(U),n(R),n(P),n(q),n(O),n(K),n(ss),n(C),n(as),n(ns),n(v),n(ts),n(ls),n(B)),n(M),m(f,s),m(T,s),m(g,s),m($,s),m(k,s),m(I,s),m(_,s),m(S,s),m(N,s),m(E,s)}}}const qs='{"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(is){return ws(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Es extends gs{constructor(M){super(),bs(this,M,_s,Is,ys,{})}}export{Es as component};
