lyceum-env/lexicon/tokens/remdup.py
2024-10-03 10:15:39 +02:00

6 lines
218 B
Python

with open('tokens.txt', 'r', encoding='utf-8') as f:
words = set(line.strip() for line in f.readlines())
with open('roots.txt', 'w', encoding='utf-8') as f:
for token in words:
f.write(token+'\n')