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} ## Package naming conventions {#conventions}
In general, spaCy expects all pipeline packages to follow the naming convention 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: into three components:
1. **Type:** Capabilities (e.g. `core` for general-purpose pipeline with 1. **Type:** Capabilities (e.g. `core` for general-purpose pipeline with
vocabulary, syntax, entities and word vectors, or `depent` for only vocab, vocabulary, syntax, entities and word vectors, or `dep` for only vocab and
syntax and entities). syntax).
2. **Genre:** Type of text the pipeline is trained on, e.g. `web` or `news`. 2. **Genre:** Type of text the pipeline is trained on, e.g. `web` or `news`.
3. **Size:** Package size indicator, `sm`, `md` or `lg`. 3. **Size:** Package size indicator, `sm`, `md` or `lg`.

View File

@ -41,11 +41,7 @@ function getCounts(langs = []) {
return { return {
langs: langs.length, langs: langs.length,
modelLangs: langs.filter(({ models }) => models && !!models.length).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), 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 code
name name
models models
starters
example example
has_examples has_examples
} }

View File

@ -31,7 +31,6 @@
"code": "en", "code": "en",
"name": "English", "name": "English",
"models": ["en_core_web_sm", "en_core_web_md", "en_core_web_lg", "en_core_web_trf"], "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.", "example": "This is a sentence.",
"has_examples": true "has_examples": true
}, },

View File

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

View File

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

View File

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