Created
July 21, 2016 12:53
-
-
Save ahmad88me/befd575c5b97e041e832398b3217891f to your computer and use it in GitHub Desktop.
a sample to use rdflib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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