import{s as rt,n as mt,o as pt}from"../chunks/scheduler.9cda857a.js";import{S as ft,i as ut,e as s,s as l,c as m,h as dt,a as o,d as n,b as i,f as st,g as p,j as L,k as ot,l as gt,m as a,n as f,t as u,o as d,p as g}from"../chunks/index.003612b0.js";import{C as ht}from"../chunks/CopyLLMTxtMenu.44d08a39.js";import{C as ct}from"../chunks/CodeBlock.a90632f1.js";import{H as S,E as $t}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e5cfda8c.js";function wt(K){let r,B,j,P,h,I,c,E,$,D="<code>stanza</code> is a collection of accurate and efficient tools for the linguistic analysis of many human languages. Starting from raw text to syntactic analysis and entity recognition, Stanza brings state-of-the-art NLP models to languages of your choosing.",Y,w,G,b,tt='You can find <code>stanza</code> models by filtering at the left of the <a href="https://huggingface.co/models?library=stanza&amp;sort=downloads" rel="nofollow">models page</a>. You can find over 70 models for different languages!',k,y,et="All models on the Hub come up with the following features:",A,M,nt="<li>An automatically generated model card with a brief description and metadata tags that help for discoverability.</li> <li>An interactive widget you can use to play out with the model directly in the browser (for named entity recognition and part of speech).</li> <li>An Inference API that allows to make inference requests (for named entity recognition and part of speech).</li>",R,x,V,T,at="The <code>stanza</code> library automatically downloads models from the Hub. You can use <code>stanza.Pipeline</code> to download the model from the Hub and do inference.",W,z,Z,v,q,_,lt='To add new official Stanza models, you can follow the process to <a href="https://stanfordnlp.github.io/stanza/new_language.html" rel="nofollow">add a new language</a> and then <a href="https://stanfordnlp.github.io/stanza/new_language.html#contributing-back-to-stanza" rel="nofollow">share your models with the Stanza team</a>. You can also find the official script to upload models to the Hub <a href="https://github.com/stanfordnlp/huggingface-models/blob/main/hugging_stanza.py" rel="nofollow">here</a>.',F,H,X,C,it='<li><code>stanza</code> <a href="https://stanfordnlp.github.io/stanza/" rel="nofollow">docs</a>.</li>',O,U,N,J,Q;return h=new ht({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),c=new S({props:{title:"Using Stanza at Hugging Face",local:"using-stanza-at-hugging-face",headingTag:"h1"}}),w=new S({props:{title:"Exploring Stanza in the Hub",local:"exploring-stanza-in-the-hub",headingTag:"h2"}}),x=new S({props:{title:"Using existing models",local:"using-existing-models",headingTag:"h2"}}),z=new ct({props:{code:"aW1wb3J0JTIwc3RhbnphJTBBJTBBbmxwJTIwJTNEJTIwc3RhbnphLlBpcGVsaW5lKCdlbicpJTIwJTIzJTIwZG93bmxvYWQlMjB0aCUyMEVuZ2xpc2glMjBtb2RlbCUyMGFuZCUyMGluaXRpYWxpemUlMjBhbiUyMEVuZ2xpc2glMjBuZXVyYWwlMjBwaXBlbGluZSUwQWRvYyUyMCUzRCUyMG5scCglMjJCYXJhY2slMjBPYmFtYSUyMHdhcyUyMGJvcm4lMjBpbiUyMEhhd2FpaS4lMjIpJTIwJTIzJTIwcnVuJTIwYW5ub3RhdGlvbiUyMG92ZXIlMjBhJTIwc2VudGVuY2U=",highlighted:`<span class="hljs-keyword">import</span> stanza

nlp = stanza.Pipeline(<span class="hljs-string">&#x27;en&#x27;</span>) <span class="hljs-comment"># download th English model and initialize an English neural pipeline</span>
doc = nlp(<span class="hljs-string">&quot;Barack Obama was born in Hawaii.&quot;</span>) <span class="hljs-comment"># run annotation over a sentence</span>`,wrap:!1}}),v=new S({props:{title:"Sharing your models",local:"sharing-your-models",headingTag:"h2"}}),H=new S({props:{title:"Additional resources",local:"additional-resources",headingTag:"h2"}}),U=new $t({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/stanza.md"}}),{c(){r=s("meta"),B=l(),j=s("p"),P=l(),m(h.$$.fragment),I=l(),m(c.$$.fragment),E=l(),$=s("p"),$.innerHTML=D,Y=l(),m(w.$$.fragment),G=l(),b=s("p"),b.innerHTML=tt,k=l(),y=s("p"),y.textContent=et,A=l(),M=s("ol"),M.innerHTML=nt,R=l(),m(x.$$.fragment),V=l(),T=s("p"),T.innerHTML=at,W=l(),m(z.$$.fragment),Z=l(),m(v.$$.fragment),q=l(),_=s("p"),_.innerHTML=lt,F=l(),m(H.$$.fragment),X=l(),C=s("ul"),C.innerHTML=it,O=l(),m(U.$$.fragment),N=l(),J=s("p"),this.h()},l(t){const e=dt("svelte-u9bgzb",document.head);r=o(e,"META",{name:!0,content:!0}),e.forEach(n),B=i(t),j=o(t,"P",{}),st(j).forEach(n),P=i(t),p(h.$$.fragment,t),I=i(t),p(c.$$.fragment,t),E=i(t),$=o(t,"P",{"data-svelte-h":!0}),L($)!=="svelte-1xx2mgs"&&($.innerHTML=D),Y=i(t),p(w.$$.fragment,t),G=i(t),b=o(t,"P",{"data-svelte-h":!0}),L(b)!=="svelte-gqdt7d"&&(b.innerHTML=tt),k=i(t),y=o(t,"P",{"data-svelte-h":!0}),L(y)!=="svelte-t2majo"&&(y.textContent=et),A=i(t),M=o(t,"OL",{"data-svelte-h":!0}),L(M)!=="svelte-cl4nek"&&(M.innerHTML=nt),R=i(t),p(x.$$.fragment,t),V=i(t),T=o(t,"P",{"data-svelte-h":!0}),L(T)!=="svelte-1fan0k"&&(T.innerHTML=at),W=i(t),p(z.$$.fragment,t),Z=i(t),p(v.$$.fragment,t),q=i(t),_=o(t,"P",{"data-svelte-h":!0}),L(_)!=="svelte-emvret"&&(_.innerHTML=lt),F=i(t),p(H.$$.fragment,t),X=i(t),C=o(t,"UL",{"data-svelte-h":!0}),L(C)!=="svelte-uj93kt"&&(C.innerHTML=it),O=i(t),p(U.$$.fragment,t),N=i(t),J=o(t,"P",{}),st(J).forEach(n),this.h()},h(){ot(r,"name","hf:doc:metadata"),ot(r,"content",bt)},m(t,e){gt(document.head,r),a(t,B,e),a(t,j,e),a(t,P,e),f(h,t,e),a(t,I,e),f(c,t,e),a(t,E,e),a(t,$,e),a(t,Y,e),f(w,t,e),a(t,G,e),a(t,b,e),a(t,k,e),a(t,y,e),a(t,A,e),a(t,M,e),a(t,R,e),f(x,t,e),a(t,V,e),a(t,T,e),a(t,W,e),f(z,t,e),a(t,Z,e),f(v,t,e),a(t,q,e),a(t,_,e),a(t,F,e),f(H,t,e),a(t,X,e),a(t,C,e),a(t,O,e),f(U,t,e),a(t,N,e),a(t,J,e),Q=!0},p:mt,i(t){Q||(u(h.$$.fragment,t),u(c.$$.fragment,t),u(w.$$.fragment,t),u(x.$$.fragment,t),u(z.$$.fragment,t),u(v.$$.fragment,t),u(H.$$.fragment,t),u(U.$$.fragment,t),Q=!0)},o(t){d(h.$$.fragment,t),d(c.$$.fragment,t),d(w.$$.fragment,t),d(x.$$.fragment,t),d(z.$$.fragment,t),d(v.$$.fragment,t),d(H.$$.fragment,t),d(U.$$.fragment,t),Q=!1},d(t){t&&(n(B),n(j),n(P),n(I),n(E),n($),n(Y),n(G),n(b),n(k),n(y),n(A),n(M),n(R),n(V),n(T),n(W),n(Z),n(q),n(_),n(F),n(X),n(C),n(O),n(N),n(J)),n(r),g(h,t),g(c,t),g(w,t),g(x,t),g(z,t),g(v,t),g(H,t),g(U,t)}}}const bt='{"title":"Using Stanza at Hugging Face","local":"using-stanza-at-hugging-face","sections":[{"title":"Exploring Stanza in the Hub","local":"exploring-stanza-in-the-hub","sections":[],"depth":2},{"title":"Using existing models","local":"using-existing-models","sections":[],"depth":2},{"title":"Sharing your models","local":"sharing-your-models","sections":[],"depth":2},{"title":"Additional resources","local":"additional-resources","sections":[],"depth":2}],"depth":1}';function yt(K){return pt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _t extends ft{constructor(r){super(),ut(this,r,yt,wt,rt,{})}}export{_t as component};
