2 Commits

Author SHA1 Message Date
b221ae4b42 Update README.md 2025-12-27 03:30:28 -08:00
31e1186573 Update README.md 2025-12-27 03:28:59 -08:00
3 changed files with 9 additions and 10 deletions

View File

@@ -1,11 +1,9 @@
# dspy-neo4j-knowledge-graph # text-to-cypher
LLM-driven automated knowledge graph construction from text using DSPy and Neo4j. LLM-driven automated knowledge graph construction from text using DSPy and Neo4j.
![Knowledge Graph](img/kg.png)
## Project Structure ## Project Structure
```sh ```sh
dspy-neo4j-knowledge-graph/ text-to-cypher/
├── README.md ├── README.md
├── examples/ ├── examples/
│ └── wikipedia-abstracts-v0_0_1.ndjson │ └── wikipedia-abstracts-v0_0_1.ndjson
@@ -79,7 +77,7 @@ MODAIC_TOKEN=<your-modaic-token>
Run Neo4j locally using Docker: Run Neo4j locally using Docker:
```sh ```sh
docker run \ docker run \
--name dspy-kg \ --name text-to-cypher \
--publish=7474:7474 \ --publish=7474:7474 \
--publish=7687:7687 \ --publish=7687:7687 \
--env "NEO4J_AUTH=none" \ --env "NEO4J_AUTH=none" \
@@ -153,8 +151,8 @@ neo4j.query(cypher.statement.replace('```', ''))
### Stop Neo4j Docker Container ### Stop Neo4j Docker Container
```sh ```sh
docker stop dspy-kg docker stop text-to-cypher
docker rm dspy-kg docker rm text-to-cypher
``` ```
### Remove Virtual Environment ### Remove Virtual Environment

View File

@@ -63,10 +63,11 @@ if __name__ == "__main__":
cypher = generate_cypher(text=text, neo4j_schema=neo4j.fmt_schema()) cypher = generate_cypher(text=text, neo4j_schema=neo4j.fmt_schema())
neo4j.query(cypher.statement.replace('```', '')) neo4j.query(cypher.statement.replace('```', ''))
print("CYPHER STATEMENT:\n", cypher.statement) print("CYPHER STATEMENT:\n", cypher.statement)
"""
schema = neo4j.fmt_schema() schema = neo4j.fmt_schema()
print("SCHEMA:\n", schema) print("SCHEMA:\n", schema)
generate_cypher.push_to_hub("farouk1/text-to-cypher", with_code=True, tag="v0.0.5", commit_message="Update README.md") """
generate_cypher.push_to_hub("farouk1/text-to-cypher", with_code=True, tag="v0.0.7", commit_message="Update README.md")

View File

@@ -4,4 +4,4 @@ version = "0.1.0"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
requires-python = ">=3.13" requires-python = ">=3.13"
dependencies = ["dspy>=3.0.4", "modaic>=0.8.2", "neo4j~=5.18.0", "python-dotenv~=1.0.1"] dependencies = ["datasets>=4.4.2", "dspy>=3.0.4", "modaic>=0.8.2", "neo4j~=5.18.0", "python-dotenv~=1.0.1"]