Knowledge graph is an enterprise-wide integrated database based on graph technologies. The term was widely introduced by Gartner's Hype Cycle of Emerging Technologies, 2018. Use the 'google-knowledge-graph' tag, if you mean Google Knowledge Graph solely.
Questions tagged [knowledge-graph]
181 questions
2
votes
2 answers
How to impose the uniqueness of data property values via SHACL
I cannot figure out how to impose the uniqueness of a data property value via SHACL.
The following excerpts are lite versions of the examples presented by Henriette Harmse in her personal blog.
Suppose we have the following data:
@prefix ex:…

Stratos K
- 341
- 2
- 14
2
votes
0 answers
Restrict duplicate activities in the hierarchy
Protege: Create a ontology with hierarchy that restrict a instances from using its ancestor to be its child
I have an ontology with class Activity. I want to create a hierarchy of activities. An activity can be decomposed into any number of…

Bao Luong
- 21
- 1
2
votes
0 answers
SPARQL query concatenate results in a column
So I have this turtle file:
@prefix skos: .
@prefix rdf: .
@prefix ex: .
@prefix ex-sample: .
ex:a rdf:type…

rose
- 61
- 4
2
votes
2 answers
How to add external variables to a SPARQL query?
I have the following codes:
name = [str(s) for s, in graph.query('''
SELECT ?lbl
WHERE {
?obj .
?obj rdfs:label ?lbl .
}
…

Ohrwurm
- 21
- 2
2
votes
1 answer
Ontologies only built with classes and not class instances
I am wondering why public biomedical ontologies are often organized in such a way that there are no class instances and only classes? I understand it in a way that all instances are classes, but I do not understand what is the advantage or purpose…

szuszfol
- 117
- 1
- 9
2
votes
0 answers
How do I implement a knowledge base in a Huggingface model?
I made a knowledge base using COMET on the Atomic knowledge graph, using this tutorial.
I would like to include this knowledge in a regular pre-trained BERT model from HuggingFace to see how the model with access to this knowledge performs on a…

IneG
- 73
- 7
2
votes
1 answer
isA relationship: how can we model it in protege? What is its difference with Instance?
For modelling an isA relationship, (1) is it enough to just make sub-properties or sub-classes?
If not, what is the correct way?
(2) What is the difference of isA and Instance?
From what I understood, isA is a predicate for objects whereas Instance…

Arbo94
- 95
- 8
2
votes
2 answers
How can we use a python string variable in a SPARQL query?
I want to use python string variables in my SPARQL query without an IRI (for the sake of looping through a list of variables etc. I tried the code below but it doesn't seem to work.
Please ignore the prefixes etc. I just changed them for the sake of…

shrimpini
- 41
- 3
2
votes
2 answers
Creating Owlready2 properties dynamically
I am in need of creating an ontology dynamically.
for classes I am creating them using below method.
with onto:
NewClass = types.new_class(class_name, tuple(SuperClasses))
But for creating properties(object/data etc..) I am unable to find a way…

Zenmate
- 41
- 4
2
votes
1 answer
Multiple Ontologies Reuse (which partially sourced from a more specific domain)
I need to develop an ontology in computational biochemistry and molecular dynamics. For this, I have collected the terms that is going to be used and attempted to reuse ontologies by searching the terms on ontology search service, such as EBI-OLS.…

fatarms
- 543
- 10
- 19
2
votes
1 answer
How to create a knowledge graph from a pandas dataframe using RDFLIB library in Python
I have a df from which I need to create a Knowledge Graph using RDFlib library in Python.
So that I can visualize the created knowledge graph in various visualization tools like Protege, Webowl etc. How can this be done?

Arya Stark
- 205
- 1
- 11
2
votes
0 answers
How can we visulaize a knowledge graph created using spacy(Python) in protege?
I have created a knowledge graph from below dataframe using spacy and networkx library in Python.
Now I want to visualize this Graph in Protege. Is this possible? If yes then how this can be done?
I am attaching the dataframe and code for creating…

Arya Stark
- 205
- 1
- 11
2
votes
2 answers
Datalog rule on rdf graph changing the (boolean) value of the fact
I'm trying to write a simple datalog rule to manipulate boolean values in an RDF ontology. I'm trying to use RDFox as a reasoner for now.
RDF ontology is something like this
:citizenVaccinated rdfs:label "vaccinated";
a :citizen;
…

Betafish
- 1,212
- 3
- 20
- 45
2
votes
1 answer
Add several links between two nodes in amcharts force directed network
I'm using amcharts force directed network to render a knowledge graph.
In this knowledge graph two nodes can have multiple edges in each direction.
For example:
A "person" can be "born in" a city.
Also,
A "person" can "live in" a city.
From reading…

Tanya Tsodikovich
- 23
- 4
2
votes
1 answer
Convert Natural Language to Cypher queries
I'm working on creating a knowledge graph of relationships between entities in emails, using neo4j. I now need to convert natural language search queries into cypher queries. I have been unable to find anything concrete with regards to this. How do…

Nikhil John
- 64
- 6