Universe

concepCy

A multilingual knowledge graph in spaCy

A spaCy wrapper for ConceptNet, a freely-available semantic network designed to help computers understand the meaning of words.

Example

import spacy import concepcy nlp = spacy.load('en_core_web_sm') # Using default concepCy configuration nlp.add_pipe('concepcy') doc = nlp('WHO is a lovely company') # Access all the 'RelatedTo' relations from the Doc for word, relations in doc._.relatedto.items(): print(f'Word: {word} {relations}') # Access the 'RelatedTo' relations word by word for token in doc: print(f'Word: {token} {token._.relatedto}')

Author info

Jules Belveze

GitHubJulesBelveze/concepcy

Categories pipeline

Found a mistake or something isn't working?

If you've come across a universe project that isn't working or is incompatible with the reported spaCy version, let us know by opening a discussion thread.


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 section in Discussions.

Read the docsJSON source