Skip to end of metadata
Go to start of metadata

The RDF Export tool is used to export the result of a SPARQL-CONSTRUCT or SeRQL-CONSTRUCT into RDF XML or N-Triple files. The tool allows you to export structured data, generated by KIM, to be used in other applications that can work with RDF, like Protege-OWL or TopBraid Composer .

The RDF Export tool is located in <KIM_HOME>/bin/tools folder and requires a running instance of KIM.


Parameters Description
query SPARQL-CONSTRUCT or SeRQL-CONSTRUCT query or a file containing one
output file name of the file where the output will be written; If a file with the same name exists, it will be rewritten
output format type either NTRIPLES or RDFXML, case-insensitive. The parameter is optional; default is NTRIPLES.

By default, the tool will export data from a KIM server running at localhost. To export data from a KIM server, running on a remote machine, users need to create a configuration file named within the directory from which they are running the tool script. The file should contain at least two key-value pairs representing the KIM server host and port.

An example:


  • Exporting all names of entities that KIM has found in documents using SPARQL-CONSTRUCT

New lines are added for clarification. The command should be executed as a single line.

  • Exporting all names of entities that KIM has found in documents using SeRQL-CONSTRUCT query in a file

To shorten the command, create a text file in <KIM_HOME>/bin/tools called query.txt with the following contents:

Now execute the following command using the system shell:

After the tool finishes, the results can be found in the output-rdf.rdf file written with RDF-XML format.

tools tools Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.