Files
icon-name-generator/tests/wordlist_test.py

16 lines
685 B
Python

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))