X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=2020%2Fchallenge3-clue.ipynb;h=a79b1990ce9e58ecc29a5651e5d264c72ea36d97;hb=836627202b29b8fb000481bc68bb8089f590c895;hp=ada44458733e900e1bbc15a38639b68bc86524c0;hpb=a2e56feae1a26ca26f5f6cdf290eeab606bd99d9;p=cipher-challenge.git

diff --git a/2020/challenge3-clue.ipynb b/2020/challenge3-clue.ipynb
index ada4445..a79b199 100644
--- a/2020/challenge3-clue.ipynb
+++ b/2020/challenge3-clue.ipynb
@@ -3,7 +3,9 @@
   {
    "cell_type": "code",
    "execution_count": 1,
-   "metadata": {},
+   "metadata": {
+    "Collapsed": "false"
+   },
    "outputs": [],
    "source": [
     "from szyfrow.support.language_models import *\n",
@@ -14,7 +16,9 @@
   {
    "cell_type": "code",
    "execution_count": 2,
-   "metadata": {},
+   "metadata": {
+    "Collapsed": "false"
+   },
    "outputs": [
     {
      "data": {
@@ -34,8 +38,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 4,
-   "metadata": {},
+   "execution_count": 3,
+   "metadata": {
+    "Collapsed": "false"
+   },
    "outputs": [],
    "source": [
     "anags8 = collections.defaultdict(list)\n",
@@ -45,8 +51,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 5,
-   "metadata": {},
+   "execution_count": 4,
+   "metadata": {
+    "Collapsed": "false"
+   },
    "outputs": [
     {
      "data": {
@@ -54,7 +62,7 @@
        "['aegilnrt', 'aeginrst', 'deeinrst', 'ceeprsst', 'aeinrrst']"
       ]
      },
-     "execution_count": 5,
+     "execution_count": 4,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -66,8 +74,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
-   "metadata": {},
+   "execution_count": 5,
+   "metadata": {
+    "Collapsed": "false"
+   },
    "outputs": [
     {
      "name": "stdout",
@@ -86,10 +96,34 @@
     "    print(c, anags8[c])"
    ]
   },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "metadata": {
+    "Collapsed": "false"
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "\"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\""
+      ]
+     },
+     "execution_count": 13,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "\"', '\".join(w for c in cands for w in anags8[c])"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": null,
-   "metadata": {},
+   "metadata": {
+    "Collapsed": "false"
+   },
    "outputs": [],
    "source": []
   }