mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-13 07:55:49 +03:00
Merge branch 'develop' into nightly.spacy.io
This commit is contained in:
commit
d1755c1ea2
|
@ -86,6 +86,8 @@ cuda101 =
|
||||||
cupy-cuda101>=5.0.0b4,<9.0.0
|
cupy-cuda101>=5.0.0b4,<9.0.0
|
||||||
cuda102 =
|
cuda102 =
|
||||||
cupy-cuda102>=5.0.0b4,<9.0.0
|
cupy-cuda102>=5.0.0b4,<9.0.0
|
||||||
|
cuda110 =
|
||||||
|
cupy-cuda110>=5.0.0b4,<9.0.0
|
||||||
# Language tokenizers with external dependencies
|
# Language tokenizers with external dependencies
|
||||||
ja =
|
ja =
|
||||||
sudachipy>=0.4.9
|
sudachipy>=0.4.9
|
||||||
|
@ -94,8 +96,6 @@ ko =
|
||||||
natto-py==0.9.0
|
natto-py==0.9.0
|
||||||
th =
|
th =
|
||||||
pythainlp>=2.0
|
pythainlp>=2.0
|
||||||
zh =
|
|
||||||
spacy-pkuseg==0.0.26
|
|
||||||
|
|
||||||
[bdist_wheel]
|
[bdist_wheel]
|
||||||
universal = false
|
universal = false
|
||||||
|
|
|
@ -17,7 +17,7 @@ from ... import util
|
||||||
|
|
||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
_PKUSEG_INSTALL_MSG = "install spacy-pkuseg with `pip install spacy-pkuseg==0.0.26`"
|
_PKUSEG_INSTALL_MSG = "install spacy-pkuseg with `pip install \"spacy-pkuseg>=0.0.27,<0.1.0\"` or `conda install -c conda-forge \"spacy-pkuseg>=0.0.27,<0.1.0\"`"
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
||||||
DEFAULT_CONFIG = """
|
DEFAULT_CONFIG = """
|
||||||
|
|
|
@ -174,6 +174,7 @@ $ source .env/bin/activate # activate virtual env
|
||||||
$ export PYTHONPATH=`pwd` # set Python path to spaCy dir
|
$ export PYTHONPATH=`pwd` # set Python path to spaCy dir
|
||||||
$ pip install -r requirements.txt # install all requirements
|
$ pip install -r requirements.txt # install all requirements
|
||||||
$ python setup.py build_ext --inplace # compile spaCy
|
$ python setup.py build_ext --inplace # compile spaCy
|
||||||
|
$ python setup.py install # install spaCy
|
||||||
```
|
```
|
||||||
|
|
||||||
Compared to regular install via pip, the
|
Compared to regular install via pip, the
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { repo } from '../components/util'
|
||||||
const DEFAULT_MODELS = ['en']
|
const DEFAULT_MODELS = ['en']
|
||||||
const DEFAULT_OPT = 'efficiency'
|
const DEFAULT_OPT = 'efficiency'
|
||||||
const DEFAULT_HARDWARE = 'cpu'
|
const DEFAULT_HARDWARE = 'cpu'
|
||||||
const DEFAULT_CUDA = 'cuda100'
|
const DEFAULT_CUDA = 'cuda102'
|
||||||
const CUDA = {
|
const CUDA = {
|
||||||
'8.0': 'cuda80',
|
'8.0': 'cuda80',
|
||||||
'9.0': 'cuda90',
|
'9.0': 'cuda90',
|
||||||
|
@ -16,56 +16,9 @@ const CUDA = {
|
||||||
'10.0': 'cuda100',
|
'10.0': 'cuda100',
|
||||||
'10.1': 'cuda101',
|
'10.1': 'cuda101',
|
||||||
'10.2': 'cuda102',
|
'10.2': 'cuda102',
|
||||||
|
'11.0': 'cuda110',
|
||||||
}
|
}
|
||||||
const LANG_EXTRAS = ['zh', 'ja'] // only for languages with models
|
const LANG_EXTRAS = ['ja'] // only for languages with models
|
||||||
const DATA = [
|
|
||||||
{
|
|
||||||
id: 'os',
|
|
||||||
title: 'Operating system',
|
|
||||||
options: [
|
|
||||||
{ id: 'mac', title: 'macOS / OSX', checked: true },
|
|
||||||
{ id: 'windows', title: 'Windows' },
|
|
||||||
{ id: 'linux', title: 'Linux' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'package',
|
|
||||||
title: 'Package manager',
|
|
||||||
options: [
|
|
||||||
{ id: 'pip', title: 'pip', checked: true },
|
|
||||||
{ id: 'conda', title: 'conda' },
|
|
||||||
{ id: 'source', title: 'from source' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'hardware',
|
|
||||||
title: 'Hardware',
|
|
||||||
options: [
|
|
||||||
{ id: 'cpu', title: 'CPU', checked: DEFAULT_HARDWARE === 'cpu' },
|
|
||||||
{ id: 'gpu', title: 'GPU', checked: DEFAULT_HARDWARE == 'gpu' },
|
|
||||||
],
|
|
||||||
dropdown: Object.keys(CUDA).map(id => ({ id: CUDA[id], title: `CUDA ${id}` })),
|
|
||||||
defaultValue: DEFAULT_CUDA,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'config',
|
|
||||||
title: 'Configuration',
|
|
||||||
multiple: true,
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
id: 'venv',
|
|
||||||
title: 'virtual env',
|
|
||||||
help: 'Use a virtual environment and install spaCy into a user directory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'train',
|
|
||||||
title: 'train models',
|
|
||||||
help:
|
|
||||||
'Check this if you plan to train your own models with spaCy to install extra dependencies and data resources',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
const QuickstartInstall = ({ id, title }) => {
|
const QuickstartInstall = ({ id, title }) => {
|
||||||
const [train, setTrain] = useState(false)
|
const [train, setTrain] = useState(false)
|
||||||
|
@ -99,7 +52,56 @@ const QuickstartInstall = ({ id, title }) => {
|
||||||
const pkg = nightly ? 'spacy-nightly' : 'spacy'
|
const pkg = nightly ? 'spacy-nightly' : 'spacy'
|
||||||
const models = languages.filter(({ models }) => models !== null)
|
const models = languages.filter(({ models }) => models !== null)
|
||||||
const data = [
|
const data = [
|
||||||
...DATA,
|
{
|
||||||
|
id: 'os',
|
||||||
|
title: 'Operating system',
|
||||||
|
options: [
|
||||||
|
{ id: 'mac', title: 'macOS / OSX', checked: true },
|
||||||
|
{ id: 'windows', title: 'Windows' },
|
||||||
|
{ id: 'linux', title: 'Linux' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'package',
|
||||||
|
title: 'Package manager',
|
||||||
|
options: [
|
||||||
|
{ id: 'pip', title: 'pip', checked: true },
|
||||||
|
!nightly ? { id: 'conda', title: 'conda' } : null,
|
||||||
|
{ id: 'source', title: 'from source' },
|
||||||
|
].filter(o => o),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'hardware',
|
||||||
|
title: 'Hardware',
|
||||||
|
options: [
|
||||||
|
{ id: 'cpu', title: 'CPU', checked: DEFAULT_HARDWARE === 'cpu' },
|
||||||
|
{ id: 'gpu', title: 'GPU', checked: DEFAULT_HARDWARE == 'gpu' },
|
||||||
|
],
|
||||||
|
dropdown: Object.keys(CUDA).map(id => ({
|
||||||
|
id: CUDA[id],
|
||||||
|
title: `CUDA ${id}`,
|
||||||
|
})),
|
||||||
|
defaultValue: DEFAULT_CUDA,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'config',
|
||||||
|
title: 'Configuration',
|
||||||
|
multiple: true,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
id: 'venv',
|
||||||
|
title: 'virtual env',
|
||||||
|
help:
|
||||||
|
'Use a virtual environment and install spaCy into a user directory',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'train',
|
||||||
|
title: 'train models',
|
||||||
|
help:
|
||||||
|
'Check this if you plan to train your own models with spaCy to install extra dependencies and data resources',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'models',
|
id: 'models',
|
||||||
title: 'Trained pipelines',
|
title: 'Trained pipelines',
|
||||||
|
@ -141,11 +143,6 @@ const QuickstartInstall = ({ id, title }) => {
|
||||||
setters={setters}
|
setters={setters}
|
||||||
showDropdown={showDropdown}
|
showDropdown={showDropdown}
|
||||||
>
|
>
|
||||||
{nightly && (
|
|
||||||
<QS package="conda" comment prompt={false}>
|
|
||||||
# 🚨 Nightly releases are currently only available via pip
|
|
||||||
</QS>
|
|
||||||
)}
|
|
||||||
<QS config="venv">python -m venv .env</QS>
|
<QS config="venv">python -m venv .env</QS>
|
||||||
<QS config="venv" os="mac">
|
<QS config="venv" os="mac">
|
||||||
source .env/bin/activate
|
source .env/bin/activate
|
||||||
|
@ -180,15 +177,19 @@ const QuickstartInstall = ({ id, title }) => {
|
||||||
</QS>
|
</QS>
|
||||||
<QS package="source">pip install -r requirements.txt</QS>
|
<QS package="source">pip install -r requirements.txt</QS>
|
||||||
<QS package="source">python setup.py build_ext --inplace</QS>
|
<QS package="source">python setup.py build_ext --inplace</QS>
|
||||||
|
<QS package="source">python setup.py install</QS>
|
||||||
{(train || hardware == 'gpu') && (
|
{(train || hardware == 'gpu') && (
|
||||||
<QS package="source">pip install -e '.[{pipExtras}]'</QS>
|
<QS package="source">pip install -e '.[{pipExtras}]'</QS>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<QS config="train" package="conda">
|
<QS config="train" package="conda" comment prompt={false}>
|
||||||
conda install -c conda-forge spacy-transformers
|
# packages only available via pip
|
||||||
</QS>
|
</QS>
|
||||||
<QS config="train" package="conda">
|
<QS config="train" package="conda">
|
||||||
conda install -c conda-forge spacy-lookups-data
|
pip install spacy-transformers
|
||||||
|
</QS>
|
||||||
|
<QS config="train" package="conda">
|
||||||
|
pip install spacy-lookups-data
|
||||||
</QS>
|
</QS>
|
||||||
|
|
||||||
{models.map(({ code, models: modelOptions }) => {
|
{models.map(({ code, models: modelOptions }) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user