Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self):
self.parser = NERScanner()
)
else:
for root, subdirs, files in os.walk(self._path):
for filename in files:
file_path = os.path.join(root, filename)
mime_type = magic.from_file(file_path, mime=True)
logging.debug(
"\t- full path: %s, mime_type: %s" % (file_path, mime_type)
)
self._files.append(File(file_path, mime_type))
context = {
"tokenizer": Tokenizer(),
"regex": RegexScanner(),
"ner": NERScanner(),
}
for f in self._files:
f.scan(context)