Skip to content

Commit 3ff4b87

Browse files
committed
sync with upstream master
1 parent 7ec042e commit 3ff4b87

File tree

102 files changed

+0
-2186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+0
-2186
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ so it only becomes visible on click, making the issue easier to read and follow.
7373
### Issue labels
7474

7575
To distinguish issues that are opened by us, the maintainers, we usually add a
76-
<<<<<<< HEAD
77-
💫 to the title. [See this page](https://github.com/explosion/spaCy/labels)
78-
=======
7976
💫 to the title. [See this page](https://github.com/explosion/spaCy/labels)
80-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
8177
for an overview of the system we use to tag our issues and pull requests.
8278

8379
## Contributing to the code base

README.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ integration. It's commercial open-source software, released under the MIT licens
4949
`New in v2.0`_ New features, backwards incompatibilities and migration guide.
5050
`API Reference`_ The detailed reference for spaCy's API.
5151
`Models`_ Download statistical language models for spaCy.
52-
<<<<<<< HEAD
53-
`Resources`_ Libraries, extensions, demos, books and courses.
54-
=======
5552
`Universe`_ Libraries, extensions, demos, books and courses.
56-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
5753
`Changelog`_ Changes and version history.
5854
`Contribute`_ How to contribute to the spaCy project and code base.
5955
=================== ===
@@ -63,11 +59,7 @@ integration. It's commercial open-source software, released under the MIT licens
6359
.. _Usage Guides: https://spacy.io/usage/
6460
.. _API Reference: https://spacy.io/api/
6561
.. _Models: https://spacy.io/models
66-
<<<<<<< HEAD
67-
.. _Resources: https://spacy.io/usage/resources
68-
=======
6962
.. _Universe: https://spacy.io/universe
70-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
7163
.. _Changelog: https://spacy.io/usage/#changelog
7264
.. _Contribute: https://github.com/explosion/spaCy/blob/master/CONTRIBUTING.md
7365

@@ -207,14 +199,11 @@ or manually by pointing pip to a path or URL.
207199
# pip install .tar.gz archive from path or URL
208200
pip install /Users/you/en_core_web_sm-2.0.0.tar.gz
209201
210-
<<<<<<< HEAD
211-
=======
212202
If you have SSL certification problems, SSL customization options are described in the help:
213203

214204
# help for the download command
215205
python -m spacy download --help
216206

217-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
218207
Loading and using models
219208
------------------------
220209

examples/information_extraction/phrase_matcher.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,10 @@
3434
{"text":"Appalachia"}
3535
{"text":"Argentina"}
3636
37-
<<<<<<< HEAD
38-
=======
3937
Reddit comments corpus:
4038
* https://files.pushshift.io/reddit/
4139
* https://archive.org/details/2015_reddit_comments_corpus
4240
43-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
4441
Compatible with: spaCy v2.0.0+
4542
"""
4643
from __future__ import print_function, unicode_literals, division

examples/pipeline/custom_component_countries_api.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,9 @@ def __init__(self, nlp, label='GPE'):
6868
# the matches, so we're only setting a default value, not a getter.
6969
# If no default value is set, it defaults to None.
7070
Token.set_extension('is_country', default=False)
71-
<<<<<<< HEAD
72-
Token.set_extension('country_capital')
73-
Token.set_extension('country_latlng')
74-
Token.set_extension('country_flag')
75-
=======
7671
Token.set_extension('country_capital', default=False)
7772
Token.set_extension('country_latlng', default=False)
7873
Token.set_extension('country_flag', default=False)
79-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
8074

8175
# Register attributes on Doc and Span via a getter that checks if one of
8276
# the contained tokens is set to is_country == True.

examples/training/train_textcat.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/usr/bin/env python
22
# coding: utf8
3-
<<<<<<< HEAD
4-
"""Train a multi-label convolutional neural network text classifier on the
5-
=======
63
"""Train a convolutional neural network text classifier on the
7-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
84
IMDB dataset, using the TextCategorizer component. The dataset will be loaded
95
automatically via Thinc's built-in dataset loader. The model is added to
106
spacy.pipeline, and predictions are available via `doc.cats`. For more details,

requirements.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ plac<1.0.0,>=0.9.6
99
ujson>=1.35
1010
dill>=0.2,<0.3
1111
regex==2017.4.5
12-
<<<<<<< HEAD
13-
pytest>=3.0.6,<4.0.0
14-
=======
1512
requests>=2.13.0,<3.0.0
1613
pytest>=3.6.0,<4.0.0
17-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
1814
mock>=2.0.0,<3.0.0

setup.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,8 @@ def setup_package():
195195
'pathlib',
196196
'ujson>=1.35',
197197
'dill>=0.2,<0.3',
198-
<<<<<<< HEAD
199-
'regex==2017.4.5'],
200-
=======
201198
'regex==2017.4.5',
202199
'requests>=2.13.0,<3.0.0'],
203-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
204200
classifiers=[
205201
'Development Status :: 5 - Production/Stable',
206202
'Environment :: Console',

spacy/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,5 @@ def blank(name, **kwargs):
2020
return LangClass(**kwargs)
2121

2222

23-
<<<<<<< HEAD
24-
def info(model=None, markdown=False):
25-
return cli_info(model, markdown)
26-
=======
2723
def info(model=None, markdown=False, silent=False):
2824
return cli_info(model, markdown, silent)
29-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c

spacy/cli/_messages.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ class Messages(object):
77
M002 = ("Creating a shortcut link for 'en' didn't work (maybe you "
88
"don't have admin permissions?), but you can still load the "
99
"model via its full package name: nlp = spacy.load('{name}')")
10-
<<<<<<< HEAD
11-
M003 = ("Server error ({code}: {desc})")
12-
=======
1310
M003 = ("Server error ({code})")
14-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
1511
M004 = ("Couldn't fetch {desc}. Please find a model for your spaCy "
1612
"installation (v{version}), and download it manually. For more "
1713
"details, see the documentation: https://spacy.io/usage/models")

spacy/cli/download.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22
from __future__ import unicode_literals
33

44
import plac
5-
<<<<<<< HEAD
6-
import os
7-
import subprocess
8-
import sys
9-
import ujson
10-
11-
from .link import link
12-
from ._messages import Messages
13-
from ..util import prints, get_package_path
14-
from ..compat import url_read, HTTPError
15-
=======
165
import requests
176
import os
187
import subprocess
@@ -21,45 +10,30 @@
2110
from ._messages import Messages
2211
from .link import link
2312
from ..util import prints, get_package_path
24-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
2513
from .. import about
2614

2715

2816
@plac.annotations(
2917
model=("model to download, shortcut or name)", "positional", None, str),
3018
direct=("force direct download. Needs model name with version and won't "
31-
<<<<<<< HEAD
32-
"perform compatibility check", "flag", "d", bool))
33-
def download(model, direct=False):
34-
=======
3519
"perform compatibility check", "flag", "d", bool),
3620
pip_args=("additional arguments to be passed to `pip install` when "
3721
"installing the model"))
3822
def download(model, direct=False, *pip_args):
39-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
4023
"""
4124
Download compatible model from default download path using pip. Model
4225
can be shortcut, model name or, if --direct flag is set, full model name
4326
with version.
4427
"""
4528
if direct:
46-
<<<<<<< HEAD
47-
dl = download_model('{m}/{m}.tar.gz'.format(m=model))
48-
=======
4929
dl = download_model('{m}/{m}.tar.gz#egg={m}'.format(m=model), pip_args)
50-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
5130
else:
5231
shortcuts = get_json(about.__shortcuts__, "available shortcuts")
5332
model_name = shortcuts.get(model, model)
5433
compatibility = get_compatibility()
5534
version = get_version(model_name, compatibility)
56-
<<<<<<< HEAD
57-
dl = download_model('{m}-{v}/{m}-{v}.tar.gz'.format(m=model_name,
58-
v=version))
59-
=======
6035
dl = download_model('{m}-{v}/{m}-{v}.tar.gz#egg={m}=={v}'
6136
.format(m=model_name, v=version), pip_args)
62-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
6337
if dl != 0: # if download subprocess doesn't return 0, exit
6438
sys.exit(dl)
6539
try:
@@ -68,12 +42,7 @@ def download(model, direct=False, *pip_args):
6842
# package, which fails if model was just installed via
6943
# subprocess
7044
package_path = get_package_path(model_name)
71-
<<<<<<< HEAD
72-
link(model_name, model, force=True,
73-
model_path=package_path)
74-
=======
7545
link(model_name, model, force=True, model_path=package_path)
76-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
7746
except:
7847
# Dirty, but since spacy.download and the auto-linking is
7948
# mostly a convenience wrapper, it's best to show a success
@@ -82,20 +51,11 @@ def download(model, direct=False, *pip_args):
8251

8352

8453
def get_json(url, desc):
85-
<<<<<<< HEAD
86-
try:
87-
data = url_read(url)
88-
except HTTPError as e:
89-
prints(Messages.M004.format(desc, about.__version__),
90-
title=Messages.M003.format(e.code, e.reason), exits=1)
91-
return ujson.loads(data)
92-
=======
9354
r = requests.get(url)
9455
if r.status_code != 200:
9556
prints(Messages.M004.format(desc=desc, version=about.__version__),
9657
title=Messages.M003.format(code=r.status_code), exits=1)
9758
return r.json()
98-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c
9959

10060

10161
def get_compatibility():
@@ -117,18 +77,10 @@ def get_version(model, comp):
11777
return comp[model][0]
11878

11979

120-
<<<<<<< HEAD
121-
def download_model(filename):
122-
download_url = about.__download_url__ + '/' + filename
123-
return subprocess.call(
124-
[sys.executable, '-m', 'pip', 'install', '--no-cache-dir', '--no-deps',
125-
download_url], env=os.environ.copy())
126-
=======
12780
def download_model(filename, user_pip_args=None):
12881
download_url = about.__download_url__ + '/' + filename
12982
pip_args = ['--no-cache-dir', '--no-deps']
13083
if user_pip_args:
13184
pip_args.extend(user_pip_args)
13285
cmd = [sys.executable, '-m', 'pip', 'install'] + pip_args + [download_url]
13386
return subprocess.call(cmd, env=os.environ.copy())
134-
>>>>>>> 14d9007efd2ca457c6e6549d5599e460e198904c

0 commit comments

Comments
 (0)