mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 21:54:54 +03:00
Apply prettier
This commit is contained in:
parent
d62a1d3f9c
commit
87d1bcfcf4
|
@ -123,7 +123,7 @@ function formatVectors(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatAccuracy(data, lang) {
|
function formatAccuracy(data, lang) {
|
||||||
const exclude = (lang !== "ja") ? ['speed'] : ['speed', 'morph_acc']
|
const exclude = lang !== 'ja' ? ['speed'] : ['speed', 'morph_acc']
|
||||||
if (!data) return []
|
if (!data) return []
|
||||||
return Object.keys(data)
|
return Object.keys(data)
|
||||||
.map(label => {
|
.map(label => {
|
||||||
|
@ -140,10 +140,14 @@ function formatAccuracy(data, lang) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDownloadLink(lang, name, version) {
|
function formatDownloadLink(lang, name, version) {
|
||||||
const fullName = `${lang}_${name}-${version}`
|
const fullName = `${lang}_${name}-${version}`
|
||||||
const filename = `${fullName}-py3-none-any.whl`
|
const filename = `${fullName}-py3-none-any.whl`
|
||||||
const url = `https://github.com/explosion/spacy-models/releases/download/${fullName}/${filename}`
|
const url = `https://github.com/explosion/spacy-models/releases/download/${fullName}/${filename}`
|
||||||
return <Link to={url} hideIcon>{filename}</Link>
|
return (
|
||||||
|
<Link to={url} hideIcon>
|
||||||
|
{filename}
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatModelMeta(data) {
|
function formatModelMeta(data) {
|
||||||
|
@ -210,7 +214,8 @@ const Model = ({
|
||||||
const [isError, setIsError] = useState(true)
|
const [isError, setIsError] = useState(true)
|
||||||
const [meta, setMeta] = useState({})
|
const [meta, setMeta] = useState({})
|
||||||
const { type, genre, size } = getModelComponents(name)
|
const { type, genre, size } = getModelComponents(name)
|
||||||
const display_type = type === 'core' && (size === 'sm' || size === 'trf') ? 'core_no_vectors' : type
|
const display_type =
|
||||||
|
type === 'core' && (size === 'sm' || size === 'trf') ? 'core_no_vectors' : type
|
||||||
const version = useMemo(() => getLatestVersion(name, compatibility, prereleases), [
|
const version = useMemo(() => getLatestVersion(name, compatibility, prereleases), [
|
||||||
name,
|
name,
|
||||||
compatibility,
|
compatibility,
|
||||||
|
|
|
@ -142,7 +142,13 @@ const UniverseContent = ({ content = [], categories, theme, pageContext, mdxComp
|
||||||
The Universe database is open-source and collected in a simple JSON file.
|
The Universe database is open-source and collected in a simple JSON file.
|
||||||
For more details on the formats and available fields, see the documentation.
|
For more details on the formats and available fields, see the documentation.
|
||||||
Looking for inspiration your own spaCy plugin or extension? Check out the
|
Looking for inspiration your own spaCy plugin or extension? Check out the
|
||||||
<Link to={"https://github.com/explosion/spaCy/discussions/categories/new-features-project-ideas/"} hideIcon ws>
|
<Link
|
||||||
|
to={
|
||||||
|
'https://github.com/explosion/spaCy/discussions/categories/new-features-project-ideas/'
|
||||||
|
}
|
||||||
|
hideIcon
|
||||||
|
ws
|
||||||
|
>
|
||||||
project idea
|
project idea
|
||||||
</Link>
|
</Link>
|
||||||
section in Discussions.
|
section in Discussions.
|
||||||
|
|
|
@ -43,7 +43,7 @@ const QuickstartInstall = ({ id, title }) => {
|
||||||
const modelExtras = train ? selectedModels.filter(m => LANG_EXTRAS.includes(m)) : []
|
const modelExtras = train ? selectedModels.filter(m => LANG_EXTRAS.includes(m)) : []
|
||||||
const apple = os === 'mac' && platform === 'arm'
|
const apple = os === 'mac' && platform === 'arm'
|
||||||
const pipExtras = [
|
const pipExtras = [
|
||||||
(hardware === 'gpu' && (platform !== 'arm' || os === 'linux')) && cuda,
|
hardware === 'gpu' && (platform !== 'arm' || os === 'linux') && cuda,
|
||||||
train && 'transformers',
|
train && 'transformers',
|
||||||
train && 'lookups',
|
train && 'lookups',
|
||||||
apple && 'apple',
|
apple && 'apple',
|
||||||
|
@ -220,7 +220,8 @@ const QuickstartInstall = ({ id, title }) => {
|
||||||
<QS package="source">cd spaCy</QS>
|
<QS package="source">cd spaCy</QS>
|
||||||
<QS package="source">pip install -r requirements.txt</QS>
|
<QS package="source">pip install -r requirements.txt</QS>
|
||||||
<QS package="source">
|
<QS package="source">
|
||||||
pip install --no-build-isolation --editable {train || hardware == 'gpu' ? `'.[${pipExtras}]'` : '.'}
|
pip install --no-build-isolation --editable{' '}
|
||||||
|
{train || hardware == 'gpu' ? `'.[${pipExtras}]'` : '.'}
|
||||||
</QS>
|
</QS>
|
||||||
<QS config="train" package="conda" comment prompt={false}>
|
<QS config="train" package="conda" comment prompt={false}>
|
||||||
# packages only available via pip
|
# packages only available via pip
|
||||||
|
|
|
@ -10,7 +10,15 @@ const DEFAULT_LANG = 'en'
|
||||||
const DEFAULT_HARDWARE = 'cpu'
|
const DEFAULT_HARDWARE = 'cpu'
|
||||||
const DEFAULT_OPT = 'efficiency'
|
const DEFAULT_OPT = 'efficiency'
|
||||||
const DEFAULT_TEXTCAT_EXCLUSIVE = true
|
const DEFAULT_TEXTCAT_EXCLUSIVE = true
|
||||||
const COMPONENTS = ['tagger', 'morphologizer', 'trainable_lemmatizer', 'parser', 'ner', 'spancat', 'textcat']
|
const COMPONENTS = [
|
||||||
|
'tagger',
|
||||||
|
'morphologizer',
|
||||||
|
'trainable_lemmatizer',
|
||||||
|
'parser',
|
||||||
|
'ner',
|
||||||
|
'spancat',
|
||||||
|
'textcat',
|
||||||
|
]
|
||||||
const COMMENT = `# This is an auto-generated partial config. To use it with 'spacy train'
|
const COMMENT = `# This is an auto-generated partial config. To use it with 'spacy train'
|
||||||
# you can run spacy init fill-config to auto-fill all default settings:
|
# you can run spacy init fill-config to auto-fill all default settings:
|
||||||
# python -m spacy init fill-config ./base_config.cfg ./config.cfg`
|
# python -m spacy init fill-config ./base_config.cfg ./config.cfg`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user