[gen] Real words: memorable passwords from EFF words a US English dictionary knows; strict-site symbols ASCII only (v0.2.1)

This commit is contained in:
2026-10-31 13:54:44 +01:00
parent a68b3b46bf
commit faa5d8dfc9
8 changed files with 7426 additions and 38 deletions
@@ -0,0 +1,24 @@
"""Rebuilds memorable.txt: the EFF large wordlist minus every word that the standard US English
spellchecker dictionary (SCOWL/ESDB size 60, the size of hunspell's en_US) does not list as a plain
lowercase word. That removes brand names (walmart), names and capitalised words (monday) and coinages
(pranker). See SOURCES.md for the exact download.
python derive_memorable.py <scowl-size-60.txt>
"""
import sys
from pathlib import Path
here = Path(__file__).parent
scowl = Path(sys.argv[1]).read_text(encoding="utf-8")
dictionary = set(scowl.split("---", 1)[1].split())
eff = [line.split("\t")[1].strip() for line in (here / "eff_large_wordlist.txt").read_text().splitlines()]
kept = [w for w in eff if w in dictionary]
header = """\
# Memorable-password words: the EFF large wordlist (CC BY 3.0 US, (c) Electronic Frontier Foundation)
# minus the words not in SCOWL/ESDB size 60 (US). Word list (c) 2000-2026 by Kevin Atkinson, see SOURCES.md.
# Generated by derive_memorable.py; do not edit by hand.
"""
(here / "memorable.txt").write_text(header + "\n".join(kept) + "\n", encoding="utf-8", newline="\n")
print(f"kept {len(kept)} of {len(eff)}")