-
-
Save ozekik/b2ae3be0fcaa59670d4dd4759cdffbed to your computer and use it in GitHub Desktop.
LightPDF Bench 1
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 lightrdf | |
import sys | |
parser = lightrdf.Parser() | |
cnt = 0 | |
for triple in parser.parse(sys.argv[1]): | |
cnt += 1 | |
print(cnt) |
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
from lightrdf import RDFDocument | |
import sys | |
doc = RDFDocument(sys.argv[1]) | |
cnt = 0 | |
for triple in doc.search_triples(None, None, None): | |
cnt += 1 | |
print(cnt) |
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
from rdflib import Graph | |
import sys | |
g = Graph() | |
g.parse(sys.argv[1]) | |
cnt = 0 | |
for triple in g: | |
cnt += 1 | |
print(cnt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment