mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 13:47:13 +03:00
49cee4af92
* Integrate Python kernel via Binder * Add live model test for languages with examples * Update docs and code examples * Adjust margin (if not bootstrapped) * Add binder version to global config * Update terminal and executable code mixins * Pass attributes through infobox and section * Hide v-cloak * Fix example * Take out model comparison for now * Add meta text for compat * Remove chart.js dependency * Tidy up and simplify JS and port big components over to Vue * Remove chartjs example * Add Twitter icon * Add purple stylesheet option * Add utility for hand cursor (special cases only) * Add transition classes * Add small option for section * Add thumb object for small round thumbnail images * Allow unset code block language via "none" value (workaround to still allow unset language to default to DEFAULT_SYNTAX) * Pass through attributes * Add syntax highlighting definitions for Julia, R and Docker * Add website icon * Remove user survey from navigation * Don't hide GitHub icon on small screens * Make top navigation scrollable on small screens * Remove old resources page and references to it * Add Universe * Add helper functions for better page URL and title * Update site description * Increment versions * Update preview images * Update mentions of resources * Fix image * Fix social images * Fix problem with cover sizing and floats * Add divider and move badges into heading * Add docstrings * Reference converting section * Add section on converting word vectors * Move converting section to custom section and fix formatting * Remove old fastText example * Move extensions content to own section Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary) * Use better component example and add factories section * Add note on larger model * Use better example for non-vector * Remove similarity in context section Only works via small models with tensors so has always been kind of confusing * Add note on init-model command * Fix lightning tour examples and make excutable if possible * Add spacy train CLI section to train * Fix formatting and add video * Fix formatting * Fix textcat example description (resolves #2246) * Add dummy file to try resolve conflict * Delete dummy file * Tidy up [ci skip] * Ensure sufficient height of loading container * Add loading animation to universe * Update Thebelab build and use better startup message * Fix asset versioning * Fix typo [ci skip] * Add note on project idea label
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_)
|
||
|