'How to add instances in ontology from CSV file

I tried to add instances in ontology using WebProtege. But the problem is that data is not assigned as data/object property instead it is in the 'type' the heading under the 'Description'. Is there any other quick way to add indvisuals from CSV file.



Solution 1:[1]

Steps:

  1. Using Jena to read the ontology into Model X
  2. Write small java code that will read each row of CSV file and convert it according the ontology vocabulary in the form of RDF statement.
  3. RDF Statements can then be stored into the same Model X. So at the end you will have both your ontology and data instances in the same model X. Then print your model X into some file with extension of saved file as "RDF/XML".

Solution 2:[2]

If using the Protégé Ontology editor environment you can use the plugin called "Cellfie" A Protégé Desktop plugin for mapping spreadsheets to OWL ontologies. The plugin is available in the menu item "Tools > Create axioms from Excel workbook..."

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Haroon Rashid
Solution 2 arash