jbesomi / texthero

Text preprocessing, representation and visualization from zero to hero.
https://texthero.org
MIT License
2.89k stars 239 forks source link

Lazy load stopwords module to prevent downloading when it's not needed #194

Closed hugoabonizio closed 4 years ago

hugoabonizio commented 4 years ago

Import stopwords module inside replace_stopwords function, so the data is downloaded only when it's necessary.

Fixes #193

hugoabonizio commented 4 years ago

I also moved the spaCy model downloading to nlp.py file.

jbesomi commented 4 years ago

Thank you, Hugo! And welcome to Texthero's contributors family. You can open a new PR and add your name under the contributors in the homepage README.md :)