implement word list and image gen
This commit is contained in:
16
tests/wordlist_test.py
Normal file
16
tests/wordlist_test.py
Normal 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))
|
||||
Reference in New Issue
Block a user