Questions tagged [turtle-rdf]

Turtle is a textual syntax that allows RDF graphs to be written in a compact and natural text form, with abbreviations for common usage patterns and datatypes

About

Turtle (Terse RDF Triple Language) is a format for expressing data in the Resource Description Framework () data model with a syntax similar to . RDF, in turn, represents information using "triples", each of which consists of a subject, a predicate, and an object. Each of those items is expressed as a Web URI. Hence Turtle provides levels of compatibility with the existing and formats as well as the triple pattern syntax of .

Links

273 questions
1
vote
1 answer

SPARQL property path - Retrieve the closest node only

Suppose we have an ontology recording log events, with 2 distinct types of events: info and warning. Each entry is linked to the previous one via the non-transitive property hasPreviousEvent as shown below: For all the info nodes I would like to…
Stratos K
  • 341
  • 2
  • 14
1
vote
2 answers

Validating RDF data against an ontology for consistency check

I would like to validate RDF data (irrespective of the format), against an ontology that is constructed. Can we solve this program programmatically (model checker) to identify the consistency of the dataset ontology? For ex, aaa
1
vote
0 answers

Is there a way to automatically generate an ID/UUID in RML?

I am currently mapping a JSON file through RML, and the file I'm mapping doesn't have any ID's that I can use. Is there any way to generate an ID through RML, or is doing something like this impossible? Thanks in advance.
1
vote
1 answer

Can ObjectProperty domain/range be redundant with ObjectAllValuesFrom?

I'm reading through an ontology (the HL7 FHIR ontology) and trying to understand why certain choices were made. I've distilled my question down to a basic example: ex:Pet a owl:Class . ex:hasPet a owl:ObjectProperty ; rdfs:domain ex:Person ; …
1
vote
1 answer

Workflow for interpreting linked data in .ttl files with Python RDFLib

I am using turtle files containing biographical information for historical research. Those files are provided by a major library and most of the information in the files is not explicit. While people's professions, for instance, are sometimes stated…
OnceUponATime
  • 450
  • 4
  • 12
1
vote
1 answer

LinkedData links in text

My question is specific about Semantically Linked Data Consider following skos:label "Some Label" A resource can have label which is semantically tagged. I am trying to build data set where label/title contains citations, how can i…
Zafar Ali
  • 37
  • 1
  • 8
1
vote
1 answer

How to parse a TriG file to a RDF Model in Apache Jena?

I am writing a Java app using Apache Jena as a framework to handle RDF. The goal is a consistency check after doing OWL reasoning. The app is already working, but lacks support for TriG files. In the Jena doc it says TriG is supported…
DHen
  • 38
  • 4
1
vote
1 answer

Can a query infer a subClassOf?

I have a set of information (not all shown, of course): s:Marshmallow rdfs:subClassOf s:Android s:galaxyEdge6 s:OS s:Marshmallow; s:price 350. ... I want to query phones that are both Android and have a price…
Jake Jackson
  • 1,055
  • 1
  • 12
  • 34
1
vote
0 answers

Nested XML to Turtle mapping using RMLMapper

I'm trying to create nested mappings between XML and Turtle. I'm using the RMLMapper v4.9.0 for this purpose. Here is a sample XML file that I would like to map:
1
vote
2 answers

RDFlib Blank node update query

I am trying to update the object of a triple with a blank node as its subject using RDFlib. I firstly select the blank node in the first function and insert this blank node into the update query in the second function, however, this doesn't provide…
Alex
  • 21
  • 5
1
vote
0 answers

Renaming a namespace's prefix

I have a TTL file like so: @prefix owl: . @prefix : . :Custom_Object a owl:Class . Ideally using rdflib or similar, I would like to load this file and change the prefix for http://example.com…
jarthur
  • 393
  • 1
  • 2
  • 18
1
vote
1 answer

SPARQL: Exclude double resources in COUNT

I am trying to write a SPARQL query that only counts the number of dutch politicians for each university. How ever, for each dbo:almaMater there is for some politicians one extra resource (their major, dbr:Sociology for example). This is also…
Cro-Magnon
  • 193
  • 7
1
vote
1 answer

Validating .ttl elements with rdflib

Is there a way using rdflib or a similar package to validate a set of elements? e.g. from rdflib import Graph, Namespace, Literal from rdflib.namespace import DCTERMS n = Namespace("http://example.org/books/") n.book g = Graph() g.bind("dc",…
jarthur
  • 393
  • 1
  • 2
  • 18
1
vote
1 answer

How to automatically extract Shape Expressions from RDF triples?

I've started using shape expression do describe Resource Description Framework (RDF) models. How can I extract a draft ShEx from an RDF sample, such as: a wp:DataNode ,…
Egon Willighagen
  • 1,621
  • 4
  • 19
  • 36
1
vote
2 answers

Protege/Turtle/OWL difficulties making object properties for reified statements work

Suppose I want to represent that Bill exercises once a week. I want to explore various ways of representing this in owl as I'm getting more familiar with building ontologies in owl and formulating them in turtle. I'm open to hear alternative…
stcTempest
  • 11
  • 1