mirror of https://github.com/explosion/spaCy.git
111 lines
5.1 KiB
Plaintext
111 lines
5.1 KiB
Plaintext
//- 💫 INCLUDES > MODELS PAGE TEMPLATE
|
||
|
||
for id in CURRENT_MODELS
|
||
- var comps = getModelComponents(id)
|
||
+section(id)
|
||
section(data-vue=id data-model=id)
|
||
+grid("vcenter").o-no-block(id=id)
|
||
+grid-col("two-thirds")
|
||
+h(2)
|
||
+a("#" + id).u-permalink=id
|
||
|
||
+grid-col("third").u-text-right
|
||
.u-color-subtle.u-text-tiny
|
||
+button(gh("spacy-models") + "/releases", true, "secondary", "small")(v-bind:href="releaseUrl")
|
||
| Release details
|
||
.u-padding-small Latest: #[code(v-text="version") n/a]
|
||
|
||
+aside-code("Installation", "bash", "$").
|
||
python -m spacy download #{id}
|
||
|
||
p(v-if="description" v-text="description")
|
||
|
||
+infobox(v-if="error")
|
||
| Unable to load model details from GitHub. To find out more
|
||
| about this model, see the overview of the
|
||
| #[+a(gh("spacy-models") + "/releases") latest model releases].
|
||
|
||
+table.o-block-small(v-bind:data-loading="loading")
|
||
+row
|
||
+cell #[+label Language]
|
||
+cell #[+tag=comps.lang] #{LANGUAGES[comps.lang]}
|
||
for comp, label in {"Type": comps.type, "Genre": comps.genre}
|
||
+row
|
||
+cell #[+label=label]
|
||
+cell #[+tag=comp] #{MODEL_META[comp]}
|
||
+row
|
||
+cell #[+label Size]
|
||
+cell #[+tag=comps.size] #[span(v-text="sizeFull" v-if="sizeFull")] #[em(v-else="") n/a]
|
||
|
||
+row(v-if="pipeline && pipeline.length" v-cloak="")
|
||
+cell
|
||
+label Pipeline #[+help(MODEL_META.pipeline).u-color-subtle]
|
||
+cell
|
||
span(v-for="(pipe, index) in pipeline" v-if="pipeline")
|
||
code(v-text="pipe")
|
||
span(v-if="index != pipeline.length - 1") ,
|
||
|
||
+row(v-if="vectors" v-cloak="")
|
||
+cell
|
||
+label Vectors #[+help(MODEL_META.vectors).u-color-subtle]
|
||
+cell(v-text="vectors")
|
||
|
||
+row(v-if="sources && sources.length" v-cloak="")
|
||
+cell
|
||
+label Sources #[+help(MODEL_META.sources).u-color-subtle]
|
||
+cell
|
||
span(v-for="(source, index) in sources") {{ source }}
|
||
span(v-if="index != sources.length - 1") ,
|
||
|
||
+row(v-if="author" v-cloak="")
|
||
+cell #[+label Author]
|
||
+cell
|
||
+a("")(v-bind:href="url" v-if="url" v-text="author")
|
||
span(v-else="" v-text="author") {{ model.author }}
|
||
|
||
+row(v-if="license" v-cloak="")
|
||
+cell #[+label License]
|
||
+cell
|
||
+a("")(v-bind:href="modelLicenses[license]" v-if="modelLicenses[license]") {{ license }}
|
||
span(v-else="") {{ license }}
|
||
|
||
+row(v-cloak="")
|
||
+cell #[+label Compat #[+help(MODEL_META.compat).u-color-subtle]]
|
||
+cell
|
||
.o-field.u-float-left
|
||
select.o-field__select.u-text-small(v-model="spacyVersion")
|
||
option(v-for="version in orderedCompat" v-bind:value="version") spaCy v{{ version }}
|
||
code(v-if="compatVersion" v-text="compatVersion")
|
||
em(v-else="") not compatible
|
||
|
||
+grid.o-block-small(v-cloak="" v-if="hasAccuracy")
|
||
for keys, label in MODEL_BENCHMARKS
|
||
.u-flex-full.u-padding-small
|
||
+table.o-block-small
|
||
+row("head")
|
||
+head-cell(colspan="2")=(MODEL_META["benchmark_" + label] || label)
|
||
for label, field in keys
|
||
+row
|
||
+cell.u-nowrap
|
||
+label=label
|
||
if MODEL_META[field]
|
||
| #[+help(MODEL_META[field]).u-color-subtle]
|
||
+cell("num")
|
||
span(v-if="#{field}" v-text="#{field}")
|
||
em(v-if="!#{field}") n/a
|
||
|
||
p.u-text-small.u-color-dark(v-if="notes" v-text="notes" v-cloak="")
|
||
|
||
if comps.size == "sm" && EXAMPLE_SENT_LANGS.includes(comps.lang)
|
||
section
|
||
+code-exec("Test the model live").
|
||
import spacy
|
||
from spacy.lang.#{comps.lang}.examples import sentences
|
||
|
||
nlp = spacy.load('#{id}')
|
||
doc = nlp(sentences[0])
|
||
print(doc.text)
|
||
for token in doc:
|
||
print(token.text, token.pos_, token.dep_)
|
||
|