Commit a212cd9f authored by Ryan Herbert's avatar Ryan Herbert

vidjilparser.py add reset method

resets the parser prefixes and the writer's buffer
parent 3ba0df3e
......@@ -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 = []
self._writer.purgeBuffer()
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