lyceum-env/lexicon/tokens/remdup.py

7 lines
218 B
Python
Raw Normal View History

2024-10-03 08:15:39 +00:00
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')