Moved wani.py + Added ignore of .zstd files for valency

This commit is contained in:
Luka 2020-10-01 16:20:52 +02:00
parent 412d0c0f62
commit d5668c8b68
3 changed files with 5 additions and 1 deletions

View File

@ -22,6 +22,10 @@ def load_files(args, database, w_collection=None, input_corpus=None):
if len(filenames) == 1 and os.path.isdir(filenames[0]): if len(filenames) == 1 and os.path.isdir(filenames[0]):
filenames = [os.path.join(filenames[0], file) for file in os.listdir(filenames[0]) if file[-5:] != '.zstd'] filenames = [os.path.join(filenames[0], file) for file in os.listdir(filenames[0]) if file[-5:] != '.zstd']
if len(filenames) > 1:
filenames = [filename for filename in filenames if filename[-5:] != '.zstd']
filenames = sorted(filenames, key=lambda x: int(x.split('.')[-1]))
database.init("CREATE TABLE Files ( filename varchar(2048) )") database.init("CREATE TABLE Files ( filename varchar(2048) )")
for idx, fname in enumerate(filenames): for idx, fname in enumerate(filenames):

View File

@ -1 +1 @@
pypy3 src/wani.py data/Kolokacije_strukture_JOS-32-representation_3D_08_1.xml data/input --out data/output --sloleks_db '<sloleks db data>' --collocation_sentence_map_dest data/collocation-sentence-mapper --db /mnt/tmp/mysql-wani --multiple-output --load-sloleks pypy3 wani.py data/Kolokacije_strukture_JOS-32-representation_3D_08_1.xml data/input --out data/output --sloleks_db '<sloleks db data>' --collocation_sentence_map_dest data/collocation-sentence-mapper --db /mnt/tmp/mysql-wani --multiple-output --load-sloleks