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