WordNet meets spaCy

spacy-wordnet creates annotations that easily allow the use of WordNet and WordNet Domains by using the NLTK WordNet interface


import spacy from spacy_wordnet.wornet_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()
Author info



Categories pipeline

Submit your project

If you have a project that you want the spaCy community to make use of, you can suggest it by submitting a pull request to the spaCy website repository. The Universe database is open-source and collected in a simple JSON file. For more details on the formats and available fields, see the documentation. Looking for inspiration your own spaCy plugin or extension? Check out the project idea label on the issue tracker.

Read the docsJSON source