Add a short description here!
Project description
Spacy wordnet annotator
spacy-wordnet creates annotations that easily allow the use of wordnet
and wordnet domains by using
the nltk wordnet interface
Install
pip install spacy-wordnet
Requirements
Some nltk data must be installed before using this package
python -m nltk.downloader wordnet
python -m nltk.downloader omw
Usage
import spacy
from spacy_wordnet.wordnet_annotator import WordnetAnnotator
# Load an spacy model (supported models are "es" and "en")
nlp = spacy.load('en')
nlp.add_pipe(WordnetAnnotator(nlp.lang), after='tagger')
token = nlp('prices')[0]
# wordnet object link spacy token with nltk wordnet interface by giving acces to
# synsets and lemmas
token._.wordnet.synsets()
token._.wordnet.lemmas()
# And automatically tags with wordnet domains
token._.wordnet.wordnet_domains()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spacy-wordnet-0.0.3.tar.gz
(646.6 kB
view details)
File details
Details for the file spacy-wordnet-0.0.3.tar.gz.
File metadata
- Download URL: spacy-wordnet-0.0.3.tar.gz
- Upload date:
- Size: 646.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c10815687cd7a7071a4d2d667765f63dbed437dd97bf3ba1dd46d741a238942
|
|
| MD5 |
342e40b2674132300bd7b6f8dd51db43
|
|
| BLAKE2b-256 |
ecb2e147b4565827e1c951bcdb3bfaffcbc40220b60ddae54ea0ce8146bc8d9c
|