nligraphspacy

Knowledge graph using Spacy NLP


Keywords
spacy, nli, keywords, entities
License
MIT
Install
pip install nligraphspacy==1.1.7

Documentation

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'}]