BharatSahAIyak / kg-markdown-enhancer

3 stars 14 forks source link

Progress made on the Knowledge graph issue #14

Open vsvishalsharma opened 6 months ago

vsvishalsharma commented 6 months ago

Work done till now:

Note: Search with correct name (HTML not html or Html)

run this cypher query to get have a sample database


// Create the nodes
CREATE (Demo:Word {name: 'Demo'})
CREATE (Marked:Word {name: 'Marked'})
CREATE (Markdown:Word {name: 'Markdown'})
CREATE (HTML:Word {name: 'HTML'})
CREATE (Syntax:Word {name: 'Syntax'})

// Create the bidirectional relationships labeled as VERB
CREATE (Demo)-[:VERB]->(Marked)
CREATE (Marked)-[:VERB]->(Demo)

CREATE (Demo)-[:VERB]->(Markdown)
CREATE (Markdown)-[:VERB]->(Demo)

CREATE (Demo)-[:VERB]->(HTML)
CREATE (HTML)-[:VERB]->(Demo)

CREATE (Marked)-[:VERB]->(Markdown)
CREATE (Markdown)-[:VERB]->(Marked)

Next steps:

https://github.com/BharatSahAIyak/kg-markdown-enhancer/assets/131687529/b2a75cc1-f2af-443f-b070-32d2db0a6edb

vsvishalsharma commented 6 months ago

Updated the Neo4j schema for sample implementation run this in noe4j also the search is now case insensitive (html HTML Html hTml all are same)

CREATE (demo:Entity {
    Name: "Demo",
    Description: "A demonstration entity.",
    Version: "1.0",
    VectorEmbedding: [0.1, 0.2, 0.3]
})

CREATE (markdown:Entity {
    Name: "Markdown",
    Description: "An entity representing Markdown.",
    Version: "2.0",
    VectorEmbedding: [0.4, 0.5, 0.6]
})

CREATE (syntax:Entity {
    Name: "Syntax",
    Description: "An entity representing syntax.",
    Version: "1.5",
    VectorEmbedding: [0.7, 0.8, 0.9]
})

CREATE (demo)-[:RELATES_TO]->(markdown)

https://github.com/BharatSahAIyak/kg-markdown-enhancer/assets/131687529/7d4de933-f748-4200-9f13-e1c5c1f648ca

vsvishalsharma commented 6 months ago

Fuzzy search has been implemented via apoc (library provided by neo4j) with a threshold of upto three mistake in the Name property of the entity

https://github.com/BharatSahAIyak/kg-markdown-enhancer/assets/131687529/86902074-2c31-4bd8-9664-6193ec10b6cb

vsvishalsharma commented 5 months ago

@KDwevedi sir Could you please review and merge this pull request? Once it is merged, we can proceed with the next steps of the project.