...
 
Commits (2)
......@@ -173,12 +173,12 @@ if __name__ == '__main__':
ngrams=ngrams,
include_pos=args.include_pos.split(","))
if res:
with open(os.path.join(args.out_folder, "ngrams.txt"), "w", encoding="utf-8") as outf:
with open(os.path.join(args.out_folder,ngs, "ngrams.txt"), "w", encoding="utf-8") as outf:
for r, v in res.items():
outf.write(f"{r}\t{v}\n")
for y, res2 in res_year.items():
with open(os.path.join(args.out_folder, f"ngrams_{y}.txt"), "w", encoding="utf-8") as outf:
with open(os.path.join(args.out_folder,ngs, f"ngrams_{y}.txt"), "w", encoding="utf-8") as outf:
for r, v in res2.items():
outf.write(f"{r}\t{v}\n")
......@@ -196,7 +196,7 @@ if __name__ == '__main__':
ngrams=ngrams,
include_pos=args.include_pos.split(","),
worker=args.worker,
out_folder=args.out_folder
out_folder=os.path.join(args.out_folder,ngs)
)
res = None
......