Skip to content

Instantly share code, notes, and snippets.

@ahmad88me
Created July 21, 2016 12:53
Show Gist options
  • Save ahmad88me/befd575c5b97e041e832398b3217891f to your computer and use it in GitHub Desktop.
Save ahmad88me/befd575c5b97e041e832398b3217891f to your computer and use it in GitHub Desktop.
a sample to use rdflib
import rdflib
def get_ontology_data(ontology_file):
g = rdflib.Graph()
g.parse(ontology_file)
for sub, pred, obj in g:
add_as_tuple(sub, pred, obj)
print_col_tables()
return ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment