mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-11 16:52:21 +03:00
Fix formatting [ci skip]
This commit is contained in:
parent
181c01f629
commit
692d7f4291
|
@ -95,7 +95,8 @@ class Warnings(object):
|
||||||
"you can ignore this warning by setting SPACY_WARNING_IGNORE=W022. "
|
"you can ignore this warning by setting SPACY_WARNING_IGNORE=W022. "
|
||||||
"If this is surprising, make sure you have the spacy-lookups-data "
|
"If this is surprising, make sure you have the spacy-lookups-data "
|
||||||
"package installed.")
|
"package installed.")
|
||||||
W023 = ("Multiprocessing of Language.pipe is not supported in Python2. 'n_process' will be set to 1.")
|
W023 = ("Multiprocessing of Language.pipe is not supported in Python 2. "
|
||||||
|
"'n_process' will be set to 1.")
|
||||||
W024 = ("Entity '{entity}' - Alias '{alias}' combination already exists in "
|
W024 = ("Entity '{entity}' - Alias '{alias}' combination already exists in "
|
||||||
"the Knowledge Base.")
|
"the Knowledge Base.")
|
||||||
|
|
||||||
|
|
|
@ -751,7 +751,8 @@ class Language(object):
|
||||||
use. Experimental.
|
use. Experimental.
|
||||||
component_cfg (dict): An optional dictionary with extra keyword
|
component_cfg (dict): An optional dictionary with extra keyword
|
||||||
arguments for specific components.
|
arguments for specific components.
|
||||||
n_process (int): Number of processors to process texts, only supported in Python3. If -1, set `multiprocessing.cpu_count()`.
|
n_process (int): Number of processors to process texts, only supported
|
||||||
|
in Python3. If -1, set `multiprocessing.cpu_count()`.
|
||||||
YIELDS (Doc): Documents in the order of the original text.
|
YIELDS (Doc): Documents in the order of the original text.
|
||||||
|
|
||||||
DOCS: https://spacy.io/api/language#pipe
|
DOCS: https://spacy.io/api/language#pipe
|
||||||
|
@ -1067,9 +1068,10 @@ def _pipe(docs, proc, kwargs):
|
||||||
def _apply_pipes(make_doc, pipes, reciever, sender):
|
def _apply_pipes(make_doc, pipes, reciever, sender):
|
||||||
"""Worker for Language.pipe
|
"""Worker for Language.pipe
|
||||||
|
|
||||||
Args:
|
receiver (multiprocessing.Connection): Pipe to receive text. Usually
|
||||||
receiver (multiprocessing.Connection): Pipe to receive text. Usually created by `multiprocessing.Pipe()`
|
created by `multiprocessing.Pipe()`
|
||||||
sender (multiprocessing.Connection): Pipe to send doc. Usually created by `multiprocessing.Pipe()`
|
sender (multiprocessing.Connection): Pipe to send doc. Usually created by
|
||||||
|
`multiprocessing.Pipe()`
|
||||||
"""
|
"""
|
||||||
while True:
|
while True:
|
||||||
texts = reciever.get()
|
texts = reciever.get()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user