Questions tagged [rdf]

The Resource Description Framework (RDF) is a language for representing information about resources in the World Wide Web. It is a syntax independent data model that may be serialised in a variety of concrete syntaxes. RDF is the core data format used on the Semantic Web.

Filter by
Sorted by
Tagged with
1 vote
0 answers
18 views

Transaction using Jena API on Fuseki SPARQL Endpoint does not actually modify the database

I want to use transactions to execute insert/update/delete queries on a SPARQL endpoint. The problem is that the changes are not actually saved to the endpoint. If I run this small example program: ...
Arturs's user avatar
  • 101
2 votes
0 answers
32 views

How to set a namespace prefix programmatically with RmlMapper?

When using Carml, I can define a namespace prefix in the RML file with: carml:declaresNamespace [ carml:namespacePrefix "tei"; carml:namespaceName "http://www.tei-c.org/ns/1....
Ortomala Lokni's user avatar
0 votes
1 answer
32 views

Exporting result of eye reasoner query into a file

I use Eye Reasoner as a reasoning engine for a set of facts and rules in N3 format. My question is how can I save the result of the Eye reasoner query into a file to use in the next step of my system? ...
Mehdi's user avatar
  • 83
0 votes
0 answers
22 views

create rdf graph using rdflib from yago 40k dataset

I have yago triple dataset splited into train ,test and valid which is format txt.when i tried to serialised it into rdf graph , I got error. so this is the code : from rdflib import Graph, URIRef ...
Halima Aoula's user avatar
1 vote
1 answer
71 views

When to use rdf:Type vs rdfs:subClassOf

I am fairly familiar with ontologies and OWL and use them all the time. But one idea has always eluded me and when I try to find a good answer there are always contradictions. That is, when to use rdf:...
Jeffrey Phillips Freeman's user avatar
3 votes
0 answers
42 views

Defining classes of quoted triples in RDF-star/RDF 1.2

RDF-star (soon to be RDF 1.2) introduces a new term, quoted triples, that can be the subject or object of a triple. In the Turtle 1.2 syntax, an example of a basic quoted triple would be written: <&...
npg22's user avatar
  • 86
0 votes
0 answers
34 views

Rdflib query value of a related triple

On below example ttl I'm trying to run a query that would give me the relationshipLabel for specific combination of subject and object stated as canRelateTo. So for example: I want to query the value ...
Gero's user avatar
  • 2,967
3 votes
2 answers
260 views

Searching for a naming convention for properties in an OWL ontology when coming from an UML Model

Short Version: What is a good naming convention specifically for data & objectproperties in OWL2 when converting an UML model automatically into an OWL2 onthology. Background I am maintaining a ...
Johannes Becker's user avatar
2 votes
1 answer
60 views

Sparql query returns undesired results when using blank nodes (rdflib)

I use rdflib python library to model a graph of contacts, and perform sparql queries to retrieve who knows who. This works fine when people as added as URIRef, but not when using BNode. The example ...
GabrielGodefroy's user avatar
0 votes
1 answer
38 views

Where can I find different plans of a SPARQL query?

I want to see as many plans of a SPARQL query as possible. That is, I don't want the optimized plan only, but all the possible plans, or at least some plans, like p1,p2,p3,p4 of a query q1. Using ...
Khan's user avatar
  • 97
0 votes
0 answers
39 views

Is it possible add JSON value as property value?

I'm trying to add a property value that represent a JSON value and it shouldn't be escaped, but I can't find how properly set the CDATASection. Anyone could help me? const predicate = rdflib.namedNode(...
bronzett's user avatar
1 vote
1 answer
66 views

Protege import schema from schema.org

I have an ontology in Protege and I want to import a schema from schema.org. How can I import a schema in an ontology. Let me give you my current example. I have a class Country in my ontology. I want ...
Andrei's user avatar
  • 746
1 vote
1 answer
108 views

Retrieving property cardinalities from an RDF dataset

How would you go about this in SPARQL: listing the properties used in the dataset together with their respective min/max cardinalities? For example, given this sample RDF dataset: @prefix foaf: <...
Martynas Jusevičius's user avatar
0 votes
0 answers
54 views

SPARQL aggregated query with 2 WHERE and 2 GROUP BY?

I am using a database with bands, their albums and the release date of the albums. I'm trying to get a table with one column for the number of albums released in the 1980s, and one column for the ...
SusVej's user avatar
  • 11
0 votes
2 answers
60 views

validating typed literals in RDF

given this RDF: @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix ex: <http://example.com/>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. ex:bob ex:has '{&...
justin2004's user avatar
0 votes
1 answer
30 views

Why is GraphDB running out of memory during inferencing?

I have a knowledge graph with roughly 10 billion nodes and am using GraphDB as the triplestore. When uploading the ontology to perform reasoning (using the rdfs plus ruleset), I get the following ...
Thomas's user avatar
  • 788
2 votes
1 answer
26 views

How to handle multiple graphs in Blazegraph?

I'm using a public graph that I download and load on Blazegraph. I'm now familiar with SELECT and CONSTRUCT requests on this graph. I don't know if that matters, but the graph includes multiple ...
Corlin's user avatar
  • 57
1 vote
1 answer
29 views

Namespace for declaring SHACL Shape

I am trying to write a SHACL shape for RDF data graph validation. I am having a bit of confusion about which namespace is used for declaring the name of the shape. I saw the SHACL documentation. The ...
AJAY AGRAWAL's user avatar
0 votes
0 answers
34 views

Why do SWRL rules change my class hierarchy?

I'm building a mid-size ontology with only 5 SWRL rules. Every time I run my SWRL rules and try to transfer the inferred axioms to the ontology, my class hierarchy gets changed a lot. Subclasses ...
Pel Olson's user avatar
0 votes
0 answers
41 views

How to convert RDF graph to .dot format?

I have RDF graph g: ex1:Netherlands a ex1:Country ; ex1:hasCapital ex1:Amsterdam ; ex1:hasName "The Netherlands" ; ex1:neighbours ex1:Belgium . I need to convert this to a .dot ...
T O's user avatar
  • 1
0 votes
0 answers
22 views

Does anyone have any example of Python (with RDFLIB, if possible) code for comparing 2 RDF files that works for file size greater than 2 GB?

I found problems comparing large RDF files (2 GB each, for example), as I used RDFLIB library (python) in memory mode. I discovered the possibility of using Oxigraph (external store), so would be ...
Jose Miguel Boeres Filho's user avatar
0 votes
0 answers
24 views

SPARQL query to match the entity type from two ttl files

I have a ttl file from Yago, and ttl file contains NER from DBpedia Examples Yago ttl files <Jungle_Lord> rdf:type <wordnet_oeuvre_103841417> . <Jungle_Lord> rdf:type <...
Rahul's user avatar
  • 11
1 vote
1 answer
41 views

How do I set the language of a variable in SPARQL?

I know how to set the language of a literal: "foo"@en But what about ?foo@en (which doesn't work)? Context: I want to copy a bunch of labels set to en-gb into just en so they play better ...
Paul Kelly's user avatar
2 votes
1 answer
41 views

Virtuoso 42000 Error D1CTX after using curl to retrieve RDF data from dbpedia.org

I am a new user to the technical world of semantic web, RDF and data retrieval using curl. I am trying to use curl from macOS Terminal.app (macOS Ventura 13.3) to retrieve RDF data in XML format from &...
J Blackbeard's user avatar
2 votes
0 answers
42 views

Validating SHACL-Values using explicitly allowed values

I have the following RDF-triples that describe an attribute as well as a constraint class. The constraint class offers three allowed values for the attribute. TestAttribute rdf:type :Attribute ; ...
twes3's user avatar
  • 51
0 votes
0 answers
26 views

Can Neo4j data be exported or converted to linkML format data?

Is it possible to export or convert neo4j data to linkML format, and if so, can this process be reversible?
joylix's user avatar
  • 97
3 votes
2 answers
86 views

CONSTRUCT a DISTINCT set of triples by following paths in SPARQL

I am trying to write a SPARQL query that will extract all relevant triples from a triplestore, using Construct. Essentially, the triplestore is containing a bunch of JSON-LD documents that got parsed ...
qqq's user avatar
  • 1,390
2 votes
1 answer
56 views

How to read XML namespaces attribute in RDF xml file using go

I'm tring to parse following XML file : <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:eu=&...
L Kwiatkowski's user avatar
0 votes
1 answer
88 views

Visualising RDF Triples using D3.js and Vue

I found a pretty good example online of how to visualize RDF triples using D3. The output looks like this: I'm trying to recreate the example in Vue, but I'm not succeeding in generating a proper ...
WLefever's user avatar
  • 383
0 votes
2 answers
70 views

Why does Protégé add owl:NamedIndividual as rdf:type for each instance that has an IRI?

I am struggling to understand the interest of owl:NamedIndividual (https://www.w3.org/2007/OWL/wiki/FullSemanticsNamedIndividuals) If I open the following file into Protegé, and save it back to a .ttl ...
GabrielGodefroy's user avatar
0 votes
0 answers
21 views

GraphDB history and versioning plugin weird behaviour

Trying to go through the guide to use the plugin it looks like the filter behaviour looks inconsistent. After the three steps: Inserting data INSERT DATA { <urn:Kirk> <urn:dateOfBirth&...
Petr Křemen's user avatar
1 vote
1 answer
61 views

How to determine or filter datatype of a rdflib literal?

I haven't used rdflib in a while and am writing some trivial code based on https://rdflib.readthedocs.io/en/stable/intro_to_graphs.html#basic-triple-matching like from rdflib import Graph graph = ...
Mark Miller's user avatar
  • 3,061
2 votes
2 answers
56 views

Convert anyURI-typed string representations of CURIes to real CURIes or IRIs

I have triples like this, where the object is an anyURI-typed string representation of a CURIe. I would like to construct the triples with the object as a true CURIe or IRI. @prefix source: <https:/...
Mark Miller's user avatar
  • 3,061
3 votes
1 answer
93 views

In RDF-star, is there any formal relationship between a quoted triple and a reification of that triple?

The following two graphs clearly express a similar intent, one using RDF-star (soon to be incorporated into the RDF standard as RDF 1.2), and one using RDF reification. :bob :asserts <<:earth :...
levand's user avatar
  • 8,450
1 vote
0 answers
34 views

Is there a way to prevent WebVOWL creating undefined union classes?

I'm working on a digital humanities project where I'm trying to use WebVowl to visualise an ontology I made in Protégé. When I import the ontology into WebVowl it generates a lot of undefined union ...
HEWalker's user avatar
1 vote
2 answers
44 views

RDF vs. RDF Model vs. RDF Data Model

I don't understand whether "RDF", "RDF Model", and "RDF Data Model" are describing different concepts or no, and if yes, what are the differences. For instance, in this ...
Bahar's user avatar
  • 780
1 vote
1 answer
52 views

Display a level three groupby/sum from a SPARQL query as rows and columns and filter on years

I have some RDF data which I simplified with the below table. Subject StartDate EndDate Location Technology Value Subject1 1-1-2005 1-1-2025 ZoneA TechnologyA 100 Subject2 1-1-2007 1-1-2025 ZoneB ...
A. Zuiker's user avatar
0 votes
0 answers
15 views

Is there possible duplicated triples in TDB2?

I'm using Jena TDB2 and I loaded a TDB dataset. I want to know whether TDB will contain two same triples or the loaded triples had been deduplicated when it build the TDB database.
unstuck's user avatar
  • 31
2 votes
1 answer
51 views

What's the correct way to code a named graphs where the main graphs contains a triple that refers to the main graph and also displays the named graph?

I'm using Python with the help of the rdflib import to convert a knowledge graph that is in rdf format into a named graph format. I also wanted to add a triple where the named graph is claimed to be ...
CJ Acosta's user avatar
2 votes
0 answers
47 views

SPARQL Join based on blank RDF nodes

Please excuse the (possible) triviality of the question. I want to confirm that my understanding of the SPARQL specification is correct. I imagine joining in SPARQL based on blank RDF nodes works just ...
Median Hilal's user avatar
  • 1,493
1 vote
0 answers
41 views

How can I nest my list of blank nodes rather than have each one in a different graph

Fuseki returns this from my DESCRIBE query: { "@graph": [ { "@id": "ex:LE-propertyShape", "sh:or": { "@list": [ { ...
agustaf's user avatar
  • 683
1 vote
1 answer
122 views

Knowledge Graph vs Ontology vs RDF Graph

I made a small RDF graph that looks as follows: @prefix ex: http://example.org/ . @prefix rdfs: http://www.w3.org/2000/01/rdf-schema# . ex:a a ex:C, ex:S . ex:C rdfs:subClassOf ex:D . ex:D rdfs:...
izolveidon's user avatar
1 vote
1 answer
38 views

GraphDB rejecting the OGC GeoSparql SHACL

Question: Why is GraphDB rejecting the OGC GeoSparql SHACL constraints? Background GraphDB supports SHACL validation against incoming & existing data. OGC provides shapes for the GeoSparql ...
Thomas's user avatar
  • 788
1 vote
0 answers
48 views

How to find definition of predicate in YAGO like domain,range,comment?

Thesedays I have been struggling to construct a new dataset with opensource dataset. The first opensource dataset I downloaded is YAGO4.5. I have to take all the predicates of triples and analyse ...
unstuck's user avatar
  • 31
0 votes
1 answer
105 views

Why is conversion from JSON-LD to Turtle in rdflib not working?

I am trying to make a simple script which converts JSON-LD to Turtle, and from Turtle to JSON-LD on demand. So far, I was using rdflib, and the Turtle -> JSON-LD part is working fine. I give some ...
Robin's user avatar
  • 135
0 votes
0 answers
38 views

how to add complex object to RDF graph using dotnetrdf?

I want to create RDF output (here shown as RDF/XML) like this: ... <dct:temporal> <dct:PeriodOfTime> <schema:startDate rdf:datatype="http://www.w3.org/2001/XMLSchema#...
chrschtt's user avatar
0 votes
0 answers
39 views

Pizza ontology sparql query

this code works for the specific mushroom topping: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/...
N_m's user avatar
  • 13
1 vote
0 answers
69 views

Why are the spaces in the RDF syntax appearing as %20 (Ontotext Refine and GraphDB)?

I am a beginner to RDFs and I'm creating triples of the data with Ontotext Refine. I'm using the community edition of Ontotext GraphDB for viewing graphs. I created a RDF triple from the Fortune 500 ...
josuk8's user avatar
  • 11
1 vote
1 answer
166 views

Convert xml to rdf format in python

I am new to reading xml file and fetching information from it. Below is the (subset of) xml file I have. <icd_10_v2019> <item type="chapter"> <name>I</name&...
rshar's user avatar
  • 1,395
0 votes
0 answers
52 views

RDFS subClassOf: Can a class be a subclass of itself?

I want to create an ontology where a concept can be a subclass of another concept. For example: a concept called "Planting" with sub-concepts "Propagation" and "Germination&...
June M's user avatar
  • 1

1
2 3 4 5
86