Questions tagged [n-triples]

For questions related to N-Triples: a plain text serialization format for RDF and a subset of the Turtle serialization format. N-Triples files usually have the extension ".nt".

Specification

Related specifications

N-Triples should not be confused with the Notation3 () format.

74 questions
2
votes
1 answer

Why does this raptor code parse NTriples but not RDFXML?

I've been trying for a while to parse some RDF/XML files with the raptor2 C library. This example code will read an NTriples file and print it, but not RDF/XML. From the raptor tutorial: #include #include /* rdfcat.c: parse…
jefdaj
  • 2,025
  • 2
  • 21
  • 33
2
votes
1 answer

SPARQL DELETE query Error: EOF while parsing

I'm trying to delete some triples using this query: deleteQuery = """DELETE { ?a ?b ?c } WHERE { mynamespace:List mynamespace:Item ?c. ?a ?b ?c }""" My namespace is already defined, so that's not an issue. I'm not sure if I am using the correct…
John Thompson
  • 1,674
  • 1
  • 20
  • 35
2
votes
2 answers

N-triples to RDF/XML JavaScript converter for NodeJS

I am looking for a JavaScript N-triples to RDF/XML converter. Actually I will use it in NodeJS. Does anybody know of a JavaScript library to convert N-triples into RDF/XML?
Milan
  • 63
  • 4
2
votes
0 answers

Unable to parse .nt file with rdflib

My my_data.nt file looks like this: "Robert" . . I am using this code to parse it: from rdflib import Graph g = Graph() g.parse("my_data.nt", format="nt") for ele in g: print(ele) I am getting this…
Akavall
  • 82,592
  • 51
  • 207
  • 251
2
votes
1 answer

how to find lexicographer id into WorNet's nt file without library

I'm trying to link VerbNet with WordNet using the files they provide to work directly with data: VerbNet => http://verbs.colorado.edu/verb-index/vn/verbnet-3.3.tar.gz WordNet => http://wordnet-rdf.princeton.edu/static/wordnet.nt.gz The verbs in…
2
votes
3 answers

How to encode RDF N-Triples string literals?

The specification for RDF N-Triples states that string literals must be encoded. https://www.w3.org/TR/n-triples/#grammar-production-STRING_LITERAL_QUOTE Does this "encoding" have a name I can look up to use it in my programming language? If not,…
JohnDoe
  • 2,422
  • 5
  • 29
  • 44
2
votes
2 answers

Selecting triples from specific graph in MarkLogic7

I need to provide isolation between similar triples in different graphs (collections) in MarkLogic. For this to work I have to specify which graph I want the triples to be retrieved from, and my approach is this: cts:triples( (), …
John Smith
  • 1,559
  • 1
  • 12
  • 18
2
votes
1 answer

How to load N-TRIPLE file in apache jena?

I am quite new to RDF and Jena. I want load a .nt (N- TRIPLE) file to a model. I have tried read(inputStream, "N-TRIPLE") but did not help. It throws org.apache.jena.riot.RiotException: Element or attribute do not match QName production:…
Sajid
  • 53
  • 2
  • 7
2
votes
2 answers

Marklogic Content Pump Issue

I am trying to load a dbPedia dataset in .nt format into MarkLogic using the MarkLogic Content Pump. I'm using MarkLogic 7, with an XDBC server running on port 8005 on my machine. My data is present in a file, persondata_en.nt, and I am using the…
2
votes
2 answers

How to Convert rdf xml into n-triples?

I an RDF document in RDF/XML file that I want to convert into N-Triples. How can I convert it using Jena?
Anwar Ahmat
  • 219
  • 5
  • 14
2
votes
1 answer

Neo4j SPARQL Query stops working

I´ve wrote two java-classes who are supposed to convert a *.nt file into a neo4j-database. The first one uses the loadTriples() function of the…
mxh
  • 63
  • 8
2
votes
1 answer

About the subject predicate object triplet in RDF

I have a question regaring writing triplets in RDF. According to the description http://www.w3.org/TR/rdf-concepts/#section-triples, it's been said that a predicate should be an URI. But lets say if I want to write something like…
rajan sthapit
  • 4,194
  • 10
  • 42
  • 66
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
1 answer

Use of IRI in RDF N-Triples

I am trying to convert a csv file into RDF N-triples using RDFLib in python. It seems that subject must be an IRI/blank node and also Predicate must be an IRI. For example,
1
vote
1 answer

Parsing Wikidata n-triples data

I'm working with WikiData and RDF for the first time. I downloaded the WikiData 24GB "truthy" dataset (available only in N-Triples .nt format), but now I have a hard time understanding it. Here are some lines from the .nt file related to Jack Bauer…
stackoverflowuser2010
  • 38,621
  • 48
  • 169
  • 217