Created
July 15, 2011 20:47
-
-
Save arockwell/1085524 to your computer and use it in GitHub Desktop.
Concatenating rdf/xml files together into one ntriple
This file contains hidden or 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
| #!/usr/bin/python | |
| from rdflib import Graph | |
| import os | |
| path="rdf" | |
| dirList=os.listdir(path) | |
| for fname in dirList: | |
| g = Graph() | |
| g.parse("rdf/" + str(fname)) | |
| print g.serialize(format='nt') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment