Questions tagged [spacy]

Industrial strength Natural Language Processing (NLP) with Python and Cython

spaCy is a library for advanced Natural Language Processing in Python and Cython. Its features include tokenization, part-of-speech tagging, dependency parsing, sentence boundary detection, named entity recognition and training of statistical neural network models.


Resources

3742 questions
129
votes
33 answers

spacy Can't find model 'en_core_web_sm' on windows 10 and Python 3.5.3 :: Anaconda custom (64-bit)

what is difference between spacy.load('en_core_web_sm') and spacy.load('en')? This link explains different model sizes. But i am still not clear how spacy.load('en_core_web_sm') and spacy.load('en') differ spacy.load('en') runs fine for me. But the…
user2543622
  • 5,760
  • 25
  • 91
  • 159
73
votes
9 answers

What do spaCy's part-of-speech and dependency tags mean?

spaCy tags up each of the Tokens in a Document with a part of speech (in two different formats, one stored in the pos and pos_ properties of the Token and the other stored in the tag and tag_ properties) and a syntactic dependency to its .head token…
Mark Amery
  • 143,130
  • 81
  • 406
  • 459
70
votes
9 answers

How to get the dependency tree with spaCy?

I have been trying to find how to get the dependency tree with spaCy but I can't find anything on how to get the tree, only on how to navigate the tree.
Nicolas Joseph
  • 1,694
  • 3
  • 15
  • 25
66
votes
8 answers

Add/remove custom stop words with spacy

What is the best way to add/remove stop words with spacy? I am using token.is_stop function and would like to make some custom changes to the set. I was looking at the documentation but could not find anything regarding of stop words. Thanks!
E.K.
  • 4,179
  • 8
  • 30
  • 50
63
votes
14 answers

SpaCy OSError: Can't find model 'en'

even though I downloaded the model it cannot load it [jalal@goku entity-sentiment-analysis]$ which python /scratch/sjn/anaconda/bin/python [jalal@goku entity-sentiment-analysis]$ sudo python -m spacy download en [sudo] password for jalal:…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
54
votes
14 answers

ImportError: No module named 'spacy.en'

I'm working on a codebase that uses Spacy. I installed spacy using: sudo pip3 install spacy and then sudo python3 -m spacy download en At the end of this last command, I got a message: Linking…
rayabhik
  • 697
  • 1
  • 5
  • 9
51
votes
7 answers

Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

I was trying to install python -m spacy download en_vectors_web_lg But it was throwing error: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device May I know why is it creating the error ? Is it saying that I…
Vas
  • 918
  • 1
  • 6
  • 19
39
votes
6 answers

How to use spacy's lemmatizer to get a word into basic form

I am new to spacy and I want to use its lemmatizer function, but I don't know how to use it, like I into strings of word, which will return the string with the basic form the words. Examples: 'words'=> 'word' 'did' => 'do' Thank you.
yi wang
  • 403
  • 1
  • 4
  • 8
37
votes
5 answers

Noun phrases with spacy

How can I extract noun phrases from text using spacy? I am not referring to part of speech tags. In the documentation I cannot find anything about noun phrases or regular parse trees.
CentAu
  • 10,660
  • 15
  • 59
  • 85
36
votes
2 answers

How to extract numbers (along with comparison adjectives or ranges)

I am working on two NLP projects in Python, and both have a similar task to extract numerical values and comparison operators from sentences, like the following: "... greater than $10 ... ", "... weight not more than 200lbs ...", "... height in 5-7…
svfat
  • 3,273
  • 1
  • 15
  • 34
35
votes
2 answers

What is difference between en_core_web_sm, en_core_web_md and en_core_web_lg model of spacy?

I installed spacy on my system and I want to parse/extract person name, organization for english. But I saw here, there is 4 model for english. And there is model versioning. I didn't get which model is large and which I have to choose for…
Anil Jagtap
  • 1,740
  • 4
  • 27
  • 44
34
votes
6 answers

How to break up document by sentences with Spacy

How can I break a document (e.g., paragraph, book, etc) into sentences. For example, "The dog ran. The cat jumped" into ["The dog ran", "The cat jumped"] with spacy?
Ulad Kasach
  • 11,558
  • 11
  • 61
  • 87
34
votes
1 answer

Applying Spacy Parser to Pandas DataFrame w/ Multiprocessing

Say I have a dataset, like iris = pd.DataFrame(sns.load_dataset('iris')) I can use Spacy and .apply to parse a string column into tokens (my real dataset has >1 word/token per entry of course) import spacy # (I have version 1.8.2) nlp =…
Max Power
  • 8,265
  • 13
  • 50
  • 91
31
votes
4 answers

Unable to load the spacy model 'en_core_web_lg' on Google colab

I am using spacy in google colab to build an NER model for which I have downloaded the spaCy 'en_core_web_lg' model using import spacy.cli spacy.cli.download("en_core_web_lg") and I get a message saying ✔ Download and installation successful You…
Jithin P James
  • 752
  • 1
  • 7
  • 23
31
votes
8 answers

How to verify installed spaCy version?

I have installed spaCy with python for my NLP project. I have installed that using pip. How can I verify installed spaCy version? using pip install -U spacy What is command to verify installed spaCy version?
Pramod S. Nikam
  • 4,271
  • 4
  • 38
  • 62
1
2 3
99 100