Initial commit

This commit is contained in:
2022-05-02 18:34:17 -05:00
commit 23f2dc9eda
5 changed files with 488564 additions and 0 deletions

20
data_cleaner.py Normal file
View File

@@ -0,0 +1,20 @@
input_file_path = 'source_words.txt'
output_file_path = 'cleaned_words.txt'
input_file = open(input_file_path, 'r')
output_file = open(output_file_path, 'w')
def is_five_characters(word):
return len(word) == 5
def is_only_letters(word):
return word.isalpha()
for line in input_file:
word = line.strip()
if is_five_characters(word) and is_only_letters(word):
output_file.write(word.lower() + '\n')
input_file.close()
output_file.close()