2017-10-03 12:20:13 +00:00
|
|
|
|
//- 💫 INCLUDES > MODELS PAGE TEMPLATE
|
|
|
|
|
|
|
|
|
|
for id in CURRENT_MODELS
|
2018-04-29 00:06:46 +00:00
|
|
|
|
- var comps = getModelComponents(id)
|
2017-10-03 12:20:13 +00:00
|
|
|
|
+section(id)
|
2018-04-29 00:06:46 +00:00
|
|
|
|
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
|
2017-10-03 12:20:13 +00:00
|
|
|
|
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+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]
|
2017-10-03 12:20:13 +00:00
|
|
|
|
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+aside-code("Installation", "bash", "$").
|
|
|
|
|
python -m spacy download #{id}
|
2017-10-03 12:20:13 +00:00
|
|
|
|
|
2018-04-29 00:06:46 +00:00
|
|
|
|
p(v-if="description" v-text="description")
|
2017-10-03 12:20:13 +00:00
|
|
|
|
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+infobox(v-if="error")
|
2017-10-03 12:20:13 +00:00
|
|
|
|
| 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].
|
|
|
|
|
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+table.o-block-small(v-bind:data-loading="loading")
|
2017-10-03 12:20:13 +00:00
|
|
|
|
+row
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+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]}
|
2017-10-03 12:20:13 +00:00
|
|
|
|
+row
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+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]]
|
2017-10-03 12:20:13 +00:00
|
|
|
|
+cell
|
2018-04-29 00:06:46 +00:00
|
|
|
|
.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")
|
2017-10-29 02:58:19 +00:00
|
|
|
|
for keys, label in MODEL_BENCHMARKS
|
2018-04-29 00:06:46 +00:00
|
|
|
|
.u-flex-full.u-padding-small
|
2017-10-29 02:58:19 +00:00
|
|
|
|
+table.o-block-small
|
|
|
|
|
+row("head")
|
|
|
|
|
+head-cell(colspan="2")=(MODEL_META["benchmark_" + label] || label)
|
|
|
|
|
for label, field in keys
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+row
|
2017-10-29 02:58:19 +00:00
|
|
|
|
+cell.u-nowrap
|
|
|
|
|
+label=label
|
|
|
|
|
if MODEL_META[field]
|
|
|
|
|
| #[+help(MODEL_META[field]).u-color-subtle]
|
2018-04-29 00:06:46 +00:00
|
|
|
|
+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_)
|