Browse Source

simplify code

rasbt 1 year ago
parent
commit
37a17e2228
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ch02/01_main-chapter-code/ch02.ipynb

+ 2 - 2
ch02/01_main-chapter-code/ch02.ipynb

@@ -401,7 +401,7 @@
     }
     }
    ],
    ],
    "source": [
    "source": [
-    "all_words = sorted(list(set(preprocessed)))\n",
+    "all_words = sorted(set(preprocessed))\n",
     "vocab_size = len(all_words)\n",
     "vocab_size = len(all_words)\n",
     "\n",
     "\n",
     "print(vocab_size)"
     "print(vocab_size)"
@@ -1878,7 +1878,7 @@
    "name": "python",
    "name": "python",
    "nbconvert_exporter": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
    "pygments_lexer": "ipython3",
-   "version": "3.10.10"
+   "version": "3.11.4"
   }
   }
  },
  },
  "nbformat": 4,
  "nbformat": 4,