Merge branch 'explosion:master' into nv1

This commit is contained in:
Nihesh Rachakonda 2025-05-12 16:42:51 +05:30 committed by GitHub
commit 97161c3ee8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -117,7 +117,7 @@ For detailed installation instructions, see the
- **Operating system**: macOS / OS X · Linux · Windows (Cygwin, MinGW, Visual
Studio)
- **Python version**: Python 3.7+ (only 64 bit)
- **Python version**: Python >=3.7, <=3.12 (only 64 bit)
- **Package managers**: [pip] · [conda] (via `conda-forge`)
[pip]: https://pypi.org/project/spacy/

View File

@ -268,7 +268,12 @@ require_gpu(0)
nlp = spacy.load("en_core_web_trf")
for doc in nlp.pipe(["some text", "some other text"]):
tokvecs = doc._.trf_data.tensors[-1]
# For spaCy v3.0-v3.6, trf pipelines use spacy-transformers and the transformer output in doc._.trf_data is a TransformerData object.
try:
tokvecs = doc._.trf_data.tensors[-1]
# For spaCy v3.7+, trf pipelines use spacy-curated-transformers and doc._.trf_data is a DocTransformerOutput object.
except AttributeError as e:
tokvecs = doc._.trf_data.last_hidden_layer_state # or doc._.trf_data.all_outputs[-1]
```
You can also customize how the [`Transformer`](/api/transformer) component sets

View File

@ -1307,7 +1307,7 @@
},
{
"id": "Chatterbot",
"title": "Chatterbot",
"title": "ChatterBot",
"slogan": "A machine-learning based conversational dialog engine for creating chat bots",
"github": "gunthercox/ChatterBot",
"pip": "chatterbot",