-1

Any ideas about software or methods to convert RDF into TXT? I have many different file into rdf format and I am looking for a converter?

All the best.

  • given that RDF is nothing more than a set of triples, I don't see the problem here? I mean, `txt` is not a standardized format, so I don't get what you expect? And any common RDF format is non-binary, i.e. it can already been opened by any text editor – UninformedUser Jun 14 '22 at 15:06

1 Answers1

0

Search for an RDF parser library for whatever programming language you are using. They typically support reading and writing multiple formats.

If you have files in RDF/XML format that you want to convert into a non-XML text format, the simplest format would probably be N-Triples, which consists of one RDF triple per line.

If you are using Python, have a look at rdflib. Here is an example:

from rdflib import Graph
g = Graph()
g.parse("input.rdf", format="xml")
g.serialize("output.nt", format="nt", encoding="utf-8")
Jukka Matilainen
  • 9,608
  • 1
  • 25
  • 19