diff --git a/spacy/errors.py b/spacy/errors.py index 69dd77be7..b2ccd3c49 100644 --- a/spacy/errors.py +++ b/spacy/errors.py @@ -95,7 +95,8 @@ class Warnings(object): "you can ignore this warning by setting SPACY_WARNING_IGNORE=W022. " "If this is surprising, make sure you have the spacy-lookups-data " "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 " "the Knowledge Base.") diff --git a/spacy/language.py b/spacy/language.py index 1f6991e01..e9f5d8a3e 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -751,7 +751,8 @@ class Language(object): use. Experimental. component_cfg (dict): An optional dictionary with extra keyword 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. DOCS: https://spacy.io/api/language#pipe @@ -1067,9 +1068,10 @@ def _pipe(docs, proc, kwargs): def _apply_pipes(make_doc, pipes, reciever, sender): """Worker for Language.pipe - Args: - receiver (multiprocessing.Connection): Pipe to receive text. Usually created by `multiprocessing.Pipe()` - sender (multiprocessing.Connection): Pipe to send doc. Usually created by `multiprocessing.Pipe()` + receiver (multiprocessing.Connection): Pipe to receive text. Usually + created by `multiprocessing.Pipe()` + sender (multiprocessing.Connection): Pipe to send doc. Usually created by + `multiprocessing.Pipe()` """ while True: texts = reciever.get()