mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Update docs [ci skip]
This commit is contained in:
parent
febb99916d
commit
1316071086
|
@ -61,17 +61,13 @@ import Benchmarks from 'usage/\_benchmarks-models.md'
|
||||||
|
|
||||||
<Benchmarks />
|
<Benchmarks />
|
||||||
|
|
||||||
<!-- TODO:
|
<Project id="benchmarks/parsing_penn_treebank">
|
||||||
|
|
||||||
<Project id="benchmarks/penn_treebank">
|
|
||||||
|
|
||||||
The easiest way to reproduce spaCy's benchmarks on the Penn Treebank is to clone
|
The easiest way to reproduce spaCy's benchmarks on the Penn Treebank is to clone
|
||||||
our project template.
|
our project template.
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- ## Citing spaCy {#citation}
|
<!-- ## Citing spaCy {#citation}
|
||||||
|
|
||||||
<!-- TODO: update -->
|
<!-- TODO: update -->
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ relations and tokens we want to match:
|
||||||
|
|
||||||
> #### Visualizing the parse
|
> #### Visualizing the parse
|
||||||
>
|
>
|
||||||
> The [`displacy` visualizer](/usage/visualizer) lets you render `Doc` objects
|
> The [`displacy` visualizer](/usage/visualizers) lets you render `Doc` objects
|
||||||
> and their dependency parse and part-of-speech tags:
|
> and their dependency parse and part-of-speech tags:
|
||||||
>
|
>
|
||||||
> ```python
|
> ```python
|
||||||
|
|
|
@ -26,11 +26,27 @@ const replacements = {
|
||||||
GITHUB_SPACY: `https://github.com/explosion/spaCy/tree/${branch}`,
|
GITHUB_SPACY: `https://github.com/explosion/spaCy/tree/${branch}`,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the overall total counts of models and languages
|
||||||
|
*/
|
||||||
|
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),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
siteMetadata: {
|
siteMetadata: {
|
||||||
...site,
|
...site,
|
||||||
sidebars,
|
sidebars,
|
||||||
...models,
|
...models,
|
||||||
|
counts: getCounts(models.languages),
|
||||||
universe,
|
universe,
|
||||||
nightly: isNightly,
|
nightly: isNightly,
|
||||||
binderBranch,
|
binderBranch,
|
||||||
|
|
|
@ -38,8 +38,8 @@ export const LandingSubtitle = ({ children }) => (
|
||||||
)
|
)
|
||||||
|
|
||||||
export const LandingGrid = ({ cols = 3, blocks = false, style, children }) => (
|
export const LandingGrid = ({ cols = 3, blocks = false, style, children }) => (
|
||||||
<Content className={classNames(classes.grid, { [classes.blocks]: blocks })}>
|
<Content className={classNames({ [classes.blocks]: blocks })}>
|
||||||
<Grid cols={cols} narrow={blocks} style={style}>
|
<Grid cols={cols} narrow={blocks} className={classes.grid} style={style}>
|
||||||
{children}
|
{children}
|
||||||
</Grid>
|
</Grid>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
|
@ -26,8 +26,11 @@
|
||||||
border-bottom-right-radius: 0
|
border-bottom-right-radius: 0
|
||||||
|
|
||||||
.icon
|
.icon
|
||||||
width: 2rem
|
$width: 2rem
|
||||||
height: 2rem
|
|
||||||
|
width: $width
|
||||||
|
height: $width
|
||||||
|
flex: 0 0 $width
|
||||||
background: var(--color-theme)
|
background: var(--color-theme)
|
||||||
color: var(--color-back)
|
color: var(--color-back)
|
||||||
border-radius: 50%
|
border-radius: 50%
|
||||||
|
|
|
@ -128,14 +128,17 @@
|
||||||
padding-right: 2rem
|
padding-right: 2rem
|
||||||
|
|
||||||
@include breakpoint(max, md)
|
@include breakpoint(max, md)
|
||||||
|
.banner
|
||||||
|
padding: 1rem 3rem
|
||||||
|
|
||||||
.banner-content
|
.banner-content
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
.banner-text
|
.banner-text
|
||||||
padding-top: 0
|
padding-top: 0
|
||||||
|
|
||||||
.col
|
.grid
|
||||||
grid-column: 1 / span 2
|
grid-template-columns: 1fr !important
|
||||||
|
|
||||||
.banner-button
|
.banner-button
|
||||||
margin-bottom: var(--spacing-sm)
|
margin-bottom: var(--spacing-sm)
|
||||||
|
|
|
@ -54,23 +54,8 @@ for entity in doc.ents:
|
||||||
print(entity.text, entity.label_)
|
print(entity.text, entity.label_)
|
||||||
`
|
`
|
||||||
|
|
||||||
/**
|
|
||||||
* Compute the overall total counts of models and languages
|
|
||||||
*/
|
|
||||||
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),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const Landing = ({ data }) => {
|
const Landing = ({ data }) => {
|
||||||
const counts = getCounts(data.languages)
|
const { counts } = data
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LandingHeader nightly={data.nightly}>
|
<LandingHeader nightly={data.nightly}>
|
||||||
|
@ -345,7 +330,10 @@ const landingQuery = graphql`
|
||||||
siteMetadata {
|
siteMetadata {
|
||||||
nightly
|
nightly
|
||||||
repo
|
repo
|
||||||
languages {
|
counts {
|
||||||
|
langs
|
||||||
|
modelLangs
|
||||||
|
starterLangs
|
||||||
models
|
models
|
||||||
starters
|
starters
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user