mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Update models docs [ci skip]
This commit is contained in:
parent
82be1478cb
commit
a966c271f7
|
@ -22,12 +22,12 @@ import QuickstartModels from 'widgets/quickstart-models.js'
|
|||
## Package naming conventions {#conventions}
|
||||
|
||||
In general, spaCy expects all pipeline packages to follow the naming convention
|
||||
of `[lang`\_[name]]. For spaCy's pipelines, we also chose to divide the name
|
||||
of `[lang]\_[name]`. For spaCy's pipelines, we also chose to divide the name
|
||||
into three components:
|
||||
|
||||
1. **Type:** Capabilities (e.g. `core` for general-purpose pipeline with
|
||||
vocabulary, syntax, entities and word vectors, or `depent` for only vocab,
|
||||
syntax and entities).
|
||||
vocabulary, syntax, entities and word vectors, or `dep` for only vocab and
|
||||
syntax).
|
||||
2. **Genre:** Type of text the pipeline is trained on, e.g. `web` or `news`.
|
||||
3. **Size:** Package size indicator, `sm`, `md` or `lg`.
|
||||
|
||||
|
|
|
@ -41,11 +41,7 @@ function getCounts(langs = []) {
|
|||
return {
|
||||
langs: langs.length,
|
||||
modelLangs: langs.filter(({ models }) => models && !!models.length).length,
|
||||
starterLangs: langs.filter(({ starters }) => starters && !!starters.length).length,
|
||||
models: langs.map(({ models }) => (models ? models.length : 0)).reduce((a, b) => a + b, 0),
|
||||
starters: langs
|
||||
.map(({ starters }) => (starters ? starters.length : 0))
|
||||
.reduce((a, b) => a + b, 0),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ exports.createPages = ({ graphql, actions }) => {
|
|||
code
|
||||
name
|
||||
models
|
||||
starters
|
||||
example
|
||||
has_examples
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
"code": "en",
|
||||
"name": "English",
|
||||
"models": ["en_core_web_sm", "en_core_web_md", "en_core_web_lg", "en_core_web_trf"],
|
||||
"starters": ["en_vectors_web_lg"],
|
||||
"example": "This is a sentence.",
|
||||
"has_examples": true
|
||||
},
|
||||
|
|
|
@ -52,10 +52,6 @@
|
|||
{
|
||||
"label": "Trained Pipelines",
|
||||
"items": []
|
||||
},
|
||||
{
|
||||
"label": "Starter Packages",
|
||||
"items": []
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -51,17 +51,19 @@ const Docs = ({ pageContext, children }) => (
|
|||
id: model,
|
||||
})),
|
||||
}))
|
||||
sidebar.items[2].items = languages
|
||||
.filter(({ starters }) => starters && starters.length)
|
||||
.map(lang => ({
|
||||
text: lang.name,
|
||||
url: `/models/${lang.code}-starters`,
|
||||
isActive: id === `${lang.code}-starters`,
|
||||
menu: lang.starters.map(model => ({
|
||||
text: model,
|
||||
id: model,
|
||||
})),
|
||||
}))
|
||||
if (sidebar.items.length > 2) {
|
||||
sidebar.items[2].items = languages
|
||||
.filter(({ starters }) => starters && starters.length)
|
||||
.map(lang => ({
|
||||
text: lang.name,
|
||||
url: `/models/${lang.code}-starters`,
|
||||
isActive: id === `${lang.code}-starters`,
|
||||
menu: lang.starters.map(model => ({
|
||||
text: model,
|
||||
id: model,
|
||||
})),
|
||||
}))
|
||||
}
|
||||
}
|
||||
const sourcePath = source ? github(source) : null
|
||||
const currentSource = getCurrentSource(slug, isIndex)
|
||||
|
@ -146,7 +148,6 @@ const query = graphql`
|
|||
code
|
||||
name
|
||||
models
|
||||
starters
|
||||
}
|
||||
nightly
|
||||
sidebars {
|
||||
|
|
|
@ -336,9 +336,7 @@ const landingQuery = graphql`
|
|||
counts {
|
||||
langs
|
||||
modelLangs
|
||||
starterLangs
|
||||
models
|
||||
starters
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user