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

Parsing turtle with python / rdflib, can't specify IRI prefix

I'm trying to parse a turtle-formatted data file using RDFlib v4.2.2 in Python v3.6.5, running on OS X 10.14.3 Mojave. Based on the initial error messages, I figured out that the turtle file is missing a vocabulary URI prefix: @prefix xsd:…
1
vote
1 answer

RDF4J: Parse query result from endpoint and store it as ntriples file (malformed query)

in this endpoint there is an option to get the result of a query in N-triples format. I want to do the same with the rdf4j library when connecting to the endpoint and save the result in an ntriples format file. So far, I've used a graphQuery…
Manos Ntoulias
  • 513
  • 1
  • 4
  • 21
1
vote
0 answers

How to set property of a relation?

I have the use case where I need to define a relationship between two nodes. but, again that relationship is having the attribute/property. The question is how can I define this property? what needs to be written inside the domain/range constraints?…
samir jamadar
  • 111
  • 1
  • 1
  • 7
1
vote
0 answers

How to convert RDF Turtle into a Java Bean

I am currently learning about RDF and I am attempting to convert an RDF document into a Java Bean. So far I have found and used the Jena library to read in an RDF Turtle document. I can then iterate over the statements within the Jena model and…
crmepham
  • 4,676
  • 19
  • 80
  • 155
1
vote
1 answer

Calling a method from a grammar rule in ANTLR?

I have a grammar file called turtle.g4 which defines the behavior of Turtle files. It contains a rule regarding IRIs. iri: IRIREF | PrefixedName; I have a separate java static method (say ClassStatic.methodx)I need to call every time this rule is…
dia
  • 33
  • 4
1
vote
0 answers

Trying to create RDF graph and get TypeError: '>' not supported between instances of 'int' and 'NoneType'

I'm trying to create RDF graph using graph serialization in python. import rdflib from rdflib import Graph from rdflib import URIRef, BNode, Literal ...some code for cleaning data... g = Graph() def CreateRDF( base, s, p, o, t ): subject =…
Monana
  • 33
  • 5
1
vote
1 answer

one to many relationship definition in ttl and SPARQL-Generate nested GENERATE

I have too many things that I'm not sure of, I may not have asked the right question. I want to use https://ci.mines-stetienne.fr/sparql-generate/playground.html to map some JSON data to turtle RDF format. Here is a working a version, with the…
Mzq
  • 1,796
  • 4
  • 30
  • 65
1
vote
1 answer

Querying a large turtle file

I have a turtle file with more than 70 millions lines which I query using a python script, the thing is that the execution takes too long. Here is an example of what I tried to do: import rdflib import rdfextras rdfextras.registerplugins()…
Bilal
  • 2,883
  • 5
  • 37
  • 60
1
vote
1 answer

List in front of the expression in OWL?

Is it possible to have a list in front of an expression in OWL? Something like: ( :Dairy :Egg :Nut ) rdfs:subClassOf :FoodGroup . or: :Dairy , :Egg , :Nut rdfs:subClassOf :FoodGroup . Or in general, is there a syntactic sugar for a group of…
Siegmeyer
  • 4,312
  • 6
  • 26
  • 43
1
vote
1 answer

Why does Spark fail with "value rdf is not a member of org.apache.spark.sql.SparkSession"?

I am trying to use SANSA-RDF for reading turtle RDF files into Spark and create a graph. I am getting an error when I execute the following code. What am I missing? import org.apache.jena.query.QueryFactory import org.apache.jena.riot.Lang …
1
vote
0 answers

GML 3.2 to Turtle RDF

What would be a valid Turtle RDF representation of the following GML 3.2 description? 3512838.613 5516087.399 126.135 Is there an official GML 3.2 ontology that…
Vertexwahn
  • 7,709
  • 6
  • 64
  • 90
1
vote
0 answers

How to export a Neo4j graph into a Turtle file

I'm trying to export Neo4j graphs into Turtle format but can't find any resource. There have been lots of discussions and some plugin tools for importing different kinds of files into Neo4j, but not much for exporting (except into csv or json). Can…
vw511
  • 171
  • 10
1
vote
1 answer

Does AutoIRIMapper cannot read ontologies from .ttl files?

The AutoIRIMapper does not detect ontologies with turtle format (.ttl file extension), from OWLAPI 5 library. On the following code, the ontologyIRIs variable, does not contain any ontology with .ttl file extension. It just contains the .owl…
tremendows
  • 4,262
  • 3
  • 34
  • 51
1
vote
1 answer

Loading YAGO Ontology with OWL API

I’m using the OWL API (3.4.8 for compatibility reasons) for the first time, and I’m trying to load an ontology that is provided as part of the YAGO knowledge base (http://resources.mpi-inf.mpg.de/yago-naga/yago3.1/yagoSimpleTaxonomy.ttl.7z). However…
paho
  • 1,162
  • 9
  • 13
1
vote
0 answers

Converting GDELT to Turtle Triples

I want to convert GDELT events to turtle triples. Is there a standard for making URIs for instances? Can I just make one up? Something like http://www.gdeltproject.org/Events/1.0/GDELTEventID_674976286 perhaps?
elbillaf
  • 1,952
  • 10
  • 37
  • 73