implement word list and image gen

This commit is contained in:
2024-12-13 13:11:48 -06:00
commit 2f8f3415fc
11 changed files with 13012 additions and 0 deletions

16
tests/wordlist_test.py Normal file
View File

@@ -0,0 +1,16 @@
from src.wordlist import get_noun_list, get_banned_wordlist, filter_banned_words_list, filter_nonimageable_words
from pathlib import Path
if __name__ == "__main__":
nounlist = get_noun_list(Path("../data"))
banned_words = get_banned_wordlist(Path("../data"))
print(len(nounlist))
print(len( banned_words))
filtered_words = filter_banned_words_list(noun_list=nounlist, banned_words=banned_words)
print(len(filtered_words))
imageable = filter_nonimageable_words(filtered_words)
print(len(imageable))
print(f"imageable: {len(filtered_words) - len(imageable)}")
with open("../data/imageable.txt", "w") as fp:
fp.write("\n".join(imageable))