explosion / explosion/spaCy

sample did not work

Open
#13,806 2 comments 0 reactions 0 assignees View on GitHub
docs
Dominant language
Python
Stars
33.9k
Forks
4.7k
Avg merge
3m
Merged PRs (30d)
1

Description

![Image](https://github.com/user-attachments/assets/bc3f37d8-22ca-48e7-90c0-262c263f37ce)

```python
import torch
print(torch.__version__)

!pip install spacy

!python -m spacy download en_core_web_trf

import spacy
nlp = spacy.load("en_core_web_trf")
import en_core_web_trf
nlp = en_core_web_trf.load()
doc = nlp("This is a sentence.")
print([(w.text, w.pos_) for w in doc])
```

error

```python
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[7], line 4
1 get_ipython().system('python -m spacy download en_core_web_trf')
3 import spacy
----> 4 nlp = spacy.load("en_core_web_trf")
5 import en_core_web_trf
6 nlp = en_core_web_trf.load()

File [~\AppData\Local\Programs\Python\Python310\lib\site-packages\spacy\__init__.py:51](http://localhost:8888/lab/tree/~/AppData/Local/Programs/Python/Python310/lib/site-packages/spacy/__init__.py#line=50), in load(name, vocab, disable, enable, exclude, config)
27 def load(
28 name: Union[str, Path],
29 *,
(...)
34 config: Union[Dict[str, Any], Config] = util.SimpleFrozenDict(),
35 ) -> Language:
36 """Load a spaCy model from an installed package or a local path.
37
38 name (str): Package name or model path.
(...)
49 RETURNS (Language): The loaded nlp object.
50 """
---> 51 return util.load_model(
52 name,
53 vocab=vocab,
54 disable=disable,
55 enable=enable,
56 exclude=exclude,
57 config=config,
58 )
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.