Skip to main content

Knowledge graph using Spacy NLP

Project description

NLIGraphSpacy

Knowledge graph using NLP Spacy

Installation

pip install nligraphspacy

Implementation

from nligraphspacy import NLIGRAPH
nligraph = NLIGRAPH.RelationEntityExtract("She worked in the city of London")
nligraph.process_text()
# ('She', 'worked', 'London')

nligraph.get_seperate_entities()
# [{'text': 'A', 'label': ''},
# {'text': 'DAG', 'label': 'SOURCE-NODE'},
# {'text': 'is', 'label': ''},
# {'text': 'used', 'label': 'EDGE'},
# {'text': 'for', 'label': ''},
# {'text': 'organizing', 'label': ''},
# {'text': 'tasks', 'label': 'TARGET-NODE'}]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nligraphspacy-1.1.7.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page