mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-12 17:22:25 +03:00
Merge branch 'explosion:master' into nv1
This commit is contained in:
commit
97161c3ee8
|
@ -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/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue
Block a user