from pathlib import Path
data_dir = Path(__file__).parent.parent / "data"
dict_file = data_dir / "human_readable_word_list_65k.txt"
with open(dict_file, 'r', encoding='utf-8') as f:
words = [line.strip() for line in f]
print(f'Total words: {len(words)}')
non_ascii = [w for w in words if any(ord(c) > 127 for c in w)]
print(f'Non-ASCII words: {len(non_ascii)}')
short_words = [w for w in words if len(w) < 2]
print(f'Words shorter than 2 chars: {len(short_words)}')
non_alpha = [w for w in words if not w.isalpha()]
print(f'Non-alphabetic words: {len(non_alpha)}')
uppercase = [w for w in words if w != w.lower()]
print(f'Words with uppercase: {len(uppercase)}')
print('\nDictionary validation: ' + ('PASSED' if len(non_ascii) == 0 and len(short_words) == 0 and len(non_alpha) == 0 and len(uppercase) == 0 else 'FAILED'))