Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Natural language support for queries #90

Open
halcyondude opened this issue Aug 4, 2022 · 0 comments
Open

Add Natural language support for queries #90

halcyondude opened this issue Aug 4, 2022 · 0 comments
Labels
brainstorm idea incubation, not always actionable. help wanted Extra attention is needed

Comments

@halcyondude
Copy link
Collaborator

halcyondude commented Aug 4, 2022

outcome: modular graph composition includes Natural Language support w/ low effort.

  • "How many companies have contributed to CloudEvents?"
  • "How many Incubating or Graduated projects have 2 or fewer companies maintaining the project?"
  • "If I want to use $someCncfProject what other projects or packages does it depend on?
  • "Who are the current Tech Leads for TAG xyz?"

This will involve creating an Ontology, that maps phrases/nouns/verbs to Entities (nodes) and Relationships.

Because our data model is already in Neo4j, we can simply create an Ontology and load it into Neo4j using the Neosemantics plugin

In this QuickGraph, we have shown how to leverage existing Ontologies in Neo4j, using them to run powerful inferences that can enhance semantic search engines and smart recommendations.

We have shown how to encode knowledge in an Ontology, combine it with other knowledge fragments, and shown queries that have this explicit knowledge used by the inferencing procedures in Neosemantics to easily add powerful semantic capabilities to search and recommendation tasks.

When your data is connected to, or described in terms of an Ontology, you can modify the behaviour of your queries without having to annotate/update every data point in your graph. All you need to do is add explicit semantic definitions of your data.

For example, in the diagram below (from the blog), each Sub-Graph Module type would map to a Custom Ontology layer, with a "Domain Ontology" per concrete sgm definition.

image

Recent video on how to do this:

How neosemantics (n10s) moves a property graph <-> RDF to leverage semantic libraries.

{drumroll} --> It doesn't! "RDF*" is how this is accomplished.**

details: https://jbarrasa.com/2021/01/19/quickgraph14-using-rdf-with-neo4j

<excerpt>

Level of support of RDF in n10s*

In the draft Community Group Report of 15 January 2021, RDF* triples are defined as triples that include a triple as a subject or an object. This translates into a number of new modelling possibilities one of which is the possibility to offer a simple way to represent properties of relationships.

This is precisely the use supported by n10s: In formal terms, n10s supports RDF* triples that have a triple as subject and a literal as object. The inner triple represents a relationship and the outer triple represents a property of that individual relationship. Here’s an example of these kind of triples:

<<:actor17 n4sch:ACTED_IN :movie32>> n4sch:role "Albert Goldman" .

Which effectively represents the following scenario

image

Export: Serialising a Neo4j database as RDF*

RDF* makes it possible to serialise/export a Property graph as RDF without data loss. Now, properties of relationships can be represented as RDF* triples as described in the previous section. Let’s look at an example using the movie database that you can load into neo4j by running :play movies .

</excerpt>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brainstorm idea incubation, not always actionable. help wanted Extra attention is needed
Projects
Status: Triage
Development

No branches or pull requests

1 participant