11 "from szyfrow.support.language_models import *\n",
12 "from szyfrow.support.utilities import *\n",
31 "output_type": "execute_result"
35 "words8 = [w for w in keywords if len(w) == 8]\n",
47 "anags8 = collections.defaultdict(list)\n",
49 " anags8[cat(sorted(w))] += [w]"
62 "['aegilnrt', 'aeginrst', 'deeinrst', 'ceeprsst', 'aeinrrst']"
67 "output_type": "execute_result"
71 "cands = [w for w in anags8 if len(anags8[w]) >= 5]\n",
84 "output_type": "stream",
86 "aegilnrt ['alerting', 'altering', 'integral', 'relating', 'triangle']\n",
87 "aeginrst ['angriest', 'gantries', 'granites', 'ingrates', 'rangiest', 'tangiers']\n",
88 "deeinrst ['dniester', 'inserted', 'nerdiest', 'resident', 'trendies']\n",
89 "ceeprsst ['respects', 'scepters', 'sceptres', 'specters', 'spectres']\n",
90 "aeinrrst ['restrain', 'retrains', 'strainer', 'terrains', 'trainers']\n"
96 " print(c, anags8[c])"
101 "execution_count": 13,
109 "\"alerting', 'altering', 'integral', 'relating', 'triangle', 'angriest', 'gantries', 'granites', 'ingrates', 'rangiest', 'tangiers', 'dniester', 'inserted', 'nerdiest', 'resident', 'trendies', 'respects', 'scepters', 'sceptres', 'specters', 'spectres', 'restrain', 'retrains', 'strainer', 'terrains', 'trainers\""
112 "execution_count": 13,
114 "output_type": "execute_result"
118 "\"', '\".join(w for c in cands for w in anags8[c])"
123 "execution_count": null,
133 "display_name": "Python 3",
134 "language": "python",
142 "file_extension": ".py",
143 "mimetype": "text/x-python",
145 "nbconvert_exporter": "python",
146 "pygments_lexer": "ipython3",