mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Merge branch 'rethinc2' of ssh://github.com/honnibal/spaCy into rethinc2
This commit is contained in:
commit
4cf34fc170
|
@ -2,7 +2,7 @@ cython
|
|||
cymem>=1.30,<1.31
|
||||
pathlib
|
||||
preshed>=0.46.1,<0.47.0
|
||||
thinc>=4.2.0,<4.3.0
|
||||
thinc>=5.0.0,<5.1.0
|
||||
murmurhash>=0.26,<0.27
|
||||
text-unidecode
|
||||
numpy
|
||||
|
|
3
setup.py
3
setup.py
|
@ -79,6 +79,9 @@ if sys.platform.startswith('darwin'):
|
|||
compile_options['other'].append('-mmacosx-version-min=10.8')
|
||||
compile_options['other'].append('-stdlib=libc++')
|
||||
link_options['other'].append('-lc++')
|
||||
else:
|
||||
compile_options['other'].append('-fopenmp')
|
||||
link_options['other'].append('-fopenmp')
|
||||
|
||||
|
||||
class build_ext_options:
|
||||
|
|
|
@ -271,20 +271,20 @@ class Language(object):
|
|||
|
||||
def pipe(self, texts, tag=True, parse=True, entity=True, n_threads=2,
|
||||
batch_size=1000):
|
||||
stream = self.tokenizer.stream(texts,
|
||||
stream = self.tokenizer.pipe(texts,
|
||||
n_threads=n_threads, batch_size=batch_size)
|
||||
if self.tagger and tag:
|
||||
stream = self.tagger.stream(stream,
|
||||
stream = self.tagger.pipe(stream,
|
||||
n_threads=n_threads, batch_size=batch_size)
|
||||
if self.matcher and entity:
|
||||
stream = self.matcher.stream(stream,
|
||||
stream = self.matcher.pipe(stream,
|
||||
n_threads=n_threads, batch_size=batch_size)
|
||||
if self.parser and parse:
|
||||
stream = self.parser.stream(stream,
|
||||
stream = self.parser.pipe(stream,
|
||||
n_threads=n_threads, batch_size=batch_size)
|
||||
if self.entity and entity:
|
||||
stream = self.entity.stream(stream,
|
||||
n_threads=n_threads, batch_size=batch_size)
|
||||
stream = self.entity.pipe(stream,
|
||||
n_threads=1, batch_size=batch_size)
|
||||
for doc in stream:
|
||||
yield doc
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ MALT-style dependency parser
|
|||
"""
|
||||
from __future__ import unicode_literals
|
||||
cimport cython
|
||||
cimport cython.parallel
|
||||
|
||||
from cpython.ref cimport PyObject, Py_INCREF, Py_XDECREF
|
||||
from cpython.exc cimport PyErr_CheckSignals
|
||||
|
|
Loading…
Reference in New Issue
Block a user