Converting Ontologies to CSV
Sometimes it is useful to be able to manage many ontology specifications in a spreadsheet. CSV is generally acknowledged as the most flexible format for using with spreadsheets. Unfortunately, Protégé does not support saving ontologies in CSV format, and most other tools do not as well.
As one workaround, here are a series of steps that can be followed to create CSV output starting with Protege.
- In Protege, save the candidate ontology in RDF/XML format
- Open the file in an editor and remove all Named Individuals specifications (generally is found at the bottom of the file)
- Post the file to a Web-accessible location; note its URL
- Using the EasyRDF converter, load the URL into the online converter and specify RDF/JSON as the output format; save as a file with the *.json extension
- Upload the JSON file to the json-csv.com online converter site and convert
- Download the resulting file to your local computer
- Clean up and make the modifications as appropriate.
There are in fact many online converters and other combinations than what is listed could conceivably work. However, in testing many of them, they were unable to process other formats or had other errors. Starting with RDF in XML format appears to be the most widely supported (even though some options allow going more directly to JSON).