Questions tagged [n3]

N3 stands for Notation 3, an assertion and logic language which is a superset of RDF.

N3 stands for Notation 3, an assertion and logic language which is a superset of RDF.

N3 extends the RDF datamodel by adding formulae (literals which are graphs themselves), variables, logical implication, and functional predicates, as well as providing an textual syntax alternative to RDF/XML.

43 questions
6
votes
1 answer

Loading Notation3 into a Database

How do you parse and load the triples represented by a Notation3 file into a database? I'm somewhat familiar with Jena and Sesame, but these seemed geared to process RDF or Turtle, not full Notation3. I've found relatively few robust tools for…
Cerin
  • 60,957
  • 96
  • 316
  • 522
5
votes
3 answers

N3 notation to RDF/XML

I have to sample N3 and I need to convert it to the corresponds RDF/XML format please , any help ? crop:AttributeValue a rdfs:Class . crop:SomeValue a rdfs:Class; rdfs:subClassOf crops:AttributeValue . crop:SomeValue/7 a crops:SomeValue . …
M.M
  • 1,343
  • 7
  • 20
  • 49
5
votes
2 answers

Ensure that multiple subjects point to same list of blank nodes

Consider the following instance of SomeClass: instances:some_thing1 a semapi:SomeClass ; semapi:hasChainTo ( [ ... ] [ ... ] [ ... ] ) . I need every instance (some_thing2,…
parliament
  • 21,544
  • 38
  • 148
  • 238
5
votes
2 answers

Is there a shortcut for creating a class in N3/Turtle ontology language

Here is how I know to create a class in N3: :Person a rdfs:Class. And here is how to specify that a specific ressource is an instance of that class: :Pat a :Person. Problem: I want to create a class with more than 20000 instances (programmatically…
user14750
  • 157
  • 4
4
votes
2 answers

how can i save my n3 file formate like it's origin file

i programing with c# and dotnetrdflibrery'I have an n3 file that i open it in a notpad and show it below @prefix my: . my:Peter a my:person, my:boy;     my:suffers my:acrophobia, my:insomnia,…
ghasedak
  • 41
  • 1
  • 5
4
votes
2 answers

Simple Format for Implicit Reification

Is there any RDF serialization format (like Notation 3) that supports implicit reification for easily representing statements about statements? For example, say I have the statement "Mary bought a house", which I would represent in N3 like: :Mary…
Cerin
  • 60,957
  • 96
  • 316
  • 522
3
votes
1 answer

How to properly remove # comments in a semantic .n3 file without affecting the rest of the #s?

I'm dealing with cleaning semantic .n3 and rdf files manually from comments and compacting and pretty printing those ones with Regex in C#. However # is a very common character in semantic files for describing resources. Example code: #Processed by…
3
votes
1 answer

Reduce string length of query sparql with fuseki

When I start a Fuseki server, I use this command : fuseki-server --config=config-orphadata.ttl In this ttl file, I can writte some prefix rules : @prefix orphanet: . @prefix ORDO:…
Matthieu
  • 221
  • 1
  • 11
3
votes
2 answers

How to parse N3 in RDFlib

I am trying to convert a file into XML using the N3 parser in RDFlib but I am not sure if I am doing it right or even if I have the n3 plugin installed. This is what I have so far: import rdflib from rdflib import URIRef, Graph, Namespace from…
Johnnerz
  • 1,365
  • 4
  • 17
  • 29
3
votes
1 answer

notation 3 URI to RDF/XML

I'm trying to convert an n3 file to rdf/xml through rdf:about converter. Unfortunately some URIs have special characters like: . -> gene:01.01.01 % -> gene:fog2/zfpm2 | -> gene:17867|203045 and the convertor note this examples as a…
2
votes
1 answer

How to use :notIncludes in Notation 3 rules?

I'm currently learning how to use the rules in Notation 3 with CWM. I want to build a rule that gives the stepchilds in a family ontology. So, the stepchild is the child of someone but not the child of this someone's spouse. @prefix ex:…
WSH
  • 331
  • 1
  • 2
  • 10
2
votes
1 answer

Create multiple skolems with Jena rules

What is an easy way to create multiple skolems without copying the rule multiple times? [ AddingMother: makeSkolem(?mother, "a mother") -> (?mother rdf:title "mother") (?mother rdf:type _:Mother) ] [ AddingChild: (?mother rdf:type…
user1091344
  • 612
  • 6
  • 27
2
votes
2 answers

Error in serializing Notation3 file into RDFXML format in python

So I have a Notation3 file that looks like this: @prefix wn: . @prefix lemon: . @prefix lexinfo: . :lexicon a lemon:Lexicon ; …
Johnnerz
  • 1,365
  • 4
  • 17
  • 29
2
votes
1 answer

trim whitespace inside angle brackets in sed

I actually solved this while composing the question but I think it could be neater than the way I did it. I wanted to trim whitespace and most punctation except url legal stuff (from rdf/n3 entities) that appears inside <>s. An example of the source…
user1616353
  • 135
  • 7
2
votes
1 answer

Converting any RDF serialization into RDF/XML

I have seen some examples where there is a possibility to convert known serializations in RDF/XML but when the input format (e.g. XML/Turtle/N3) is not known, is there any way of achieving the conversion? I am writing a tool that receives RDF in…
1
2 3