- SpecialPhrasesImporter(
- args.config, args.phplib_dir, db_connection
- ).import_from_wiki()
+ SPImporter(
+ args.config, args.phplib_dir, db_connection, SPWikiLoader(args.config)
+ ).import_phrases(tokenizer)
+
+ if args.csv_file:
+ if not Path(args.csv_file).is_file():
+ LOG.fatal("CSV file '%s' does not exist.", args.csv_file)
+ raise UsageError('Cannot access file.')
+