Commit ed8311fc authored by Ryan Herbert's avatar Ryan Herbert Committed by Mikaël Salson add reset method

resets the parser prefixes and the writer's buffer
parent c24d1324
......@@ -132,6 +132,10 @@ class VidjilParser(object):
def addPrefix(self, prefix, conditional = None, comp = None, value = None):
self.prefixes.append((prefix, Predicate(conditional, comp, value)))
def reset(self):
self.prefixes = []
def extract(self, filepath):
vidjilfile = open(filepath, 'r')
parser = ijson.parse(vidjilfile)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment