Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kernel-loophole/kg-graph
Knowledge graph from unstructured text
https://github.com/kernel-loophole/kg-graph
knowledge-graph ml nlp-machine-learning nltk pagerank search-algorithm spacy text text-mining
Last synced: about 1 month ago
JSON representation
Knowledge graph from unstructured text
- Host: GitHub
- URL: https://github.com/kernel-loophole/kg-graph
- Owner: kernel-loophole
- License: mit
- Created: 2024-03-04T12:27:02.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-11T10:42:13.000Z (about 1 month ago)
- Last Synced: 2024-10-14T04:03:01.164Z (about 1 month ago)
- Topics: knowledge-graph, ml, nlp-machine-learning, nltk, pagerank, search-algorithm, spacy, text, text-mining
- Language: HTML
- Homepage:
- Size: 4.26 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: news_graph.py
- License: LICENSE
Awesome Lists containing this project
README
# News Graph
Key information extration from text and graph visilization. Inspired by [TextGrapher](https://github.com/liuhuanyong/TextGrapher).
# Project Introduction
How to represent a text in a simple way is a chanllenge topic. This peoject try to extraction key information from the text by NLP methods, which contain NER extraction, relation detection, keywords extraction, frequencies words extraction. And finally show the key information in a graph way.please read the blog for more in depth details. https://fir-speedboat-5ee.notion.site/Building-Knowledge-Graphs-Using-Python-82276798233c45e8a85280e4a9308a5c?pvs=25
1) ![flow](flow.png)# Example Demo
1) ![image1](image_03.jpg)
1) ![image1](image_05.jpg)
2)
![image02](grap02.png)
# Node coloring
- Red:Location
- Blue:Person
- Green:organization
- Grey:other
# usage
`pip install -r requirements.txt`install the en_core_web_lg before running the scripts
`python -m spacy download en_core_web_lg`
1. **Run `main.py`**: This script will generate the `graph_data.json` file.
2. **Run `main_kg.py`**: This script will generate the `graph_data_kg.json` file.
3. **Run `difference.py`**: This script will compute the difference between the generated files.
4. **Run `find_ner.py`**: This script will filter the data based on Named Entity Recognition (NER).
5. **Run `ner_plot.py`**: This script will generate the HTML file for graph visualization .
## Switch Branch and Review Interconnections Between Documents