A Python package for executing graph generation from textual inputs.
Project description
eknowledge
eknowledge is a Python package designed to facilitate the generation of knowledge graphs from textual inputs. It leverages language models to parse text and extract relationships between entities, organizing these relationships into a structured graph format. This tool is ideal for developers, researchers, and anyone interested in structured knowledge extraction from unstructured text.
Installation
Install eknowledge using pip:
pip install eknowledge langchain_llm7
Usage
Here's a simple example to get you started with eknowledge. This example demonstrates how to generate a knowledge graph from a given text input using the package.
Example
from eknowledge import execute_graph_generation
from langchain_llm7 import ChatLLM7
# Initialize the language model
MODEL = "deepseek-r1"
llm = ChatLLM7(model=MODEL)
# Define your input text
input_text = "The quick brown fox jumps over the lazy dog."
# Generate the graph
graph = execute_graph_generation(
text=input_text,
llm=llm,
chunk_size=100,
verbose=True
)
# Output the graph
print(graph)
# > Splitting text into 1 chunks of size 100 words.
# > Processing chunk 1/1...
# > Nodes successfully processed in chunk 1/1.
# > [{'from': 'quick brown fox', 'relationship': 'interacts_with', 'to': 'lazy dog'}]
This script will output a knowledge graph based on the relationships identified in the text.
Contributing
Contributions are welcome! Please open issues or submit pull requests for any bugs, features, or improvements you would like to see.
License
eknowledge is MIT licensed, as found in the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eknowledge-2025.5.21720.tar.gz.
File metadata
- Download URL: eknowledge-2025.5.21720.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3cd486404e8f0a9c90b0d1a7ef11ee66c0a831ffca8f9722799ec4537686e14
|
|
| MD5 |
abbd3ecf3d43cb1942ec232178110645
|
|
| BLAKE2b-256 |
c5216f385a42c06bc05e0e12c1ba1f5e839752363543fc6be0bf3b297ee931ca
|
File details
Details for the file eknowledge-2025.5.21720-py3-none-any.whl.
File metadata
- Download URL: eknowledge-2025.5.21720-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c22794963adae0059af8ec60322a1624413d55845ff7e676439618b73789588e
|
|
| MD5 |
a7096bf3cc965286e35c499987722831
|
|
| BLAKE2b-256 |
291926f4010a0a471729296da2079ccb19021036ceb658e5e0eef5d170c92577
|