From 04b4df0ec9c99056ca769971f9938119a7b99fa5 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sun, 17 Feb 2019 22:25:42 +0100 Subject: [PATCH] Remove n_threads --- website/docs/api/language.md | 1 - website/docs/api/matcher.md | 5 ++--- website/docs/api/phrasematcher.md | 13 ++++++------- website/docs/api/textcategorizer.md | 11 +++++------ website/docs/api/tokenizer.md | 11 +++++------ 5 files changed, 18 insertions(+), 23 deletions(-) diff --git a/website/docs/api/language.md b/website/docs/api/language.md index 1c35082ab..990a7f962 100644 --- a/website/docs/api/language.md +++ b/website/docs/api/language.md @@ -95,7 +95,6 @@ multiprocessing. | ------------ | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `texts` | - | A sequence of unicode objects. | | `as_tuples` | bool | If set to `True`, inputs should be a sequence of `(text, context)` tuples. Output will then be a sequence of `(doc, context)` tuples. Defaults to `False`. | -| `n_threads` | int | The number of worker threads to use. If `-1`, OpenMP will decide how many to use at run time. Default is `2`. | | `batch_size` | int | The number of texts to buffer. | | `disable` | list | Names of pipeline components to [disable](/usage/processing-pipelines#disabling). | | **YIELDS** | `Doc` | Documents in the order of the original text. | diff --git a/website/docs/api/matcher.md b/website/docs/api/matcher.md index d48d38904..fb0ba1617 100644 --- a/website/docs/api/matcher.md +++ b/website/docs/api/matcher.md @@ -68,7 +68,7 @@ matched phrases with entity types. Instead, actions need to be specified when custom actions per pattern within the same matcher. For example, you might only want to merge some entity types, and set custom flags for other matched patterns. For more details and examples, see the usage guide on -[rule-based matching](/usage/linguistic-features#rule-based-matching). +[rule-based matching](/usage/rule-based-matching). @@ -81,7 +81,7 @@ Match a stream of documents, yielding them in turn. > ```python > from spacy.matcher import Matcher > matcher = Matcher(nlp.vocab) -> for doc in matcher.pipe(docs, batch_size=50, n_threads=4): +> for doc in matcher.pipe(docs, batch_size=50): > pass > ``` @@ -89,7 +89,6 @@ Match a stream of documents, yielding them in turn. | --------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `docs` | iterable | A stream of documents. | | `batch_size` | int | The number of documents to accumulate into a working set. | -| `n_threads` | int | The number of threads with which to work on the buffer in parallel, if the `Matcher` implementation supports multi-threading. | | `return_matches` 2.1 | bool | Yield the match lists along with the docs, making results `(doc, matches)` tuples. | | `as_tuples` | bool | Interpret the input stream as `(doc, context)` tuples, and yield `(result, context)` tuples out. If both `return_matches` and `as_tuples` are `True`, the output will be a sequence of `((doc, matches), context)` tuples. | | **YIELDS** | `Doc` | Documents, in order. | diff --git a/website/docs/api/phrasematcher.md b/website/docs/api/phrasematcher.md index 078ba49fc..c61fa575d 100644 --- a/website/docs/api/phrasematcher.md +++ b/website/docs/api/phrasematcher.md @@ -78,16 +78,15 @@ Match a stream of documents, yielding them in turn. > ```python > from spacy.matcher import PhraseMatcher > matcher = PhraseMatcher(nlp.vocab) -> for doc in matcher.pipe(texts, batch_size=50, n_threads=4): +> for doc in matcher.pipe(texts, batch_size=50): > pass > ``` -| Name | Type | Description | -| ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `docs` | iterable | A stream of documents. | -| `batch_size` | int | The number of documents to accumulate into a working set. | -| `n_threads` | int | The number of threads with which to work on the buffer in parallel, if the `PhraseMatcher` implementation supports multi-threading. | -| **YIELDS** | `Doc` | Documents, in order. | +| Name | Type | Description | +| ------------ | -------- | --------------------------------------------------------- | +| `docs` | iterable | A stream of documents. | +| `batch_size` | int | The number of documents to accumulate into a working set. | +| **YIELDS** | `Doc` | Documents, in order. | ## PhraseMatcher.\_\_len\_\_ {#len tag="method"} diff --git a/website/docs/api/textcategorizer.md b/website/docs/api/textcategorizer.md index 456a92f36..a1fa4c763 100644 --- a/website/docs/api/textcategorizer.md +++ b/website/docs/api/textcategorizer.md @@ -82,12 +82,11 @@ delegate to the [`predict`](/api/textcategorizer#predict) and > pass > ``` -| Name | Type | Description | -| ------------ | -------- | -------------------------------------------------------------------------------------------------------------- | -| `stream` | iterable | A stream of documents. | -| `batch_size` | int | The number of texts to buffer. Defaults to `128`. | -| `n_threads` | int | The number of worker threads to use. If `-1`, OpenMP will decide how many to use at run time. Default is `-1`. | -| **YIELDS** | `Doc` | Processed documents in the order of the original text. | +| Name | Type | Description | +| ------------ | -------- | ------------------------------------------------------ | +| `stream` | iterable | A stream of documents. | +| `batch_size` | int | The number of texts to buffer. Defaults to `128`. | +| **YIELDS** | `Doc` | Processed documents in the order of the original text. | ## TextCategorizer.predict {#predict tag="method"} diff --git a/website/docs/api/tokenizer.md b/website/docs/api/tokenizer.md index 463a1c146..bd4e54dfb 100644 --- a/website/docs/api/tokenizer.md +++ b/website/docs/api/tokenizer.md @@ -61,12 +61,11 @@ Tokenize a stream of texts. > pass > ``` -| Name | Type | Description | -| ------------ | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| `texts` | - | A sequence of unicode texts. | -| `batch_size` | int | The number of texts to accumulate in an internal buffer. | -| `n_threads` | int | The number of threads to use, if the implementation supports multi-threading. The default tokenizer is single-threaded. | -| **YIELDS** | `Doc` | A sequence of Doc objects, in order. | +| Name | Type | Description | +| ------------ | ----- | -------------------------------------------------------- | +| `texts` | - | A sequence of unicode texts. | +| `batch_size` | int | The number of texts to accumulate in an internal buffer. | +| **YIELDS** | `Doc` | A sequence of Doc objects, in order. | ## Tokenizer.find_infix {#find_infix tag="method"}