Skip to content

Vishnunkumar/nligraphspacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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