Update models docs [ci skip]

This commit is contained in:
Ines Montani 2020-10-14 20:50:23 +02:00
parent 82be1478cb
commit a966c271f7
7 changed files with 16 additions and 27 deletions

View File

@ -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`.

View File

@ -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),
}
}

View File

@ -37,7 +37,6 @@ exports.createPages = ({ graphql, actions }) => {
code
name
models
starters
example
has_examples
}

View File

@ -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
},

View File

@ -52,10 +52,6 @@
{
"label": "Trained Pipelines",
"items": []
},
{
"label": "Starter Packages",
"items": []
}
]
},

View File

@ -51,6 +51,7 @@ const Docs = ({ pageContext, children }) => (
id: model,
})),
}))
if (sidebar.items.length > 2) {
sidebar.items[2].items = languages
.filter(({ starters }) => starters && starters.length)
.map(lang => ({
@ -63,6 +64,7 @@ const Docs = ({ pageContext, children }) => (
})),
}))
}
}
const sourcePath = source ? github(source) : null
const currentSource = getCurrentSource(slug, isIndex)
@ -146,7 +148,6 @@ const query = graphql`
code
name
models
starters
}
nightly
sidebars {

View File

@ -336,9 +336,7 @@ const landingQuery = graphql`
counts {
langs
modelLangs
starterLangs
models
starters
}
}
}