Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
szweibel committed Oct 27, 2023
1 parent 1759133 commit 62415fc
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions content/text_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,28 @@
},
{
"cell_type": "code",
"source": "import nltk\nimport pyodide_http\npyodide_http.patch_all()\nimport matplotlib\n%matplotlib inline",
"source": "import nltk\nimport pyodide_http\npyodide_http.patch_all()\nimport matplotlib\n%matplotlib inline\n%pip install tk\nimport tk",
"metadata": {
"trusted": true
},
"execution_count": 1,
"execution_count": 13,
"outputs": []
},
{
"cell_type": "code",
"source": "# nltk.download('all-corpora') this is overkill! \nnltk.download (\n 'genesis',\n 'gutenberg',\n 'inaugural',\n 'nps_chat',\n 'treebank',\n 'webtext',\n 'wordnet',\n)",
"source": "# nltk.download('all-corpora') this is overkill! \nnltk.download('genesis')\nnltk.download('gutenberg')\nnltk.download('inaugural')\nnltk.download('nps_chat')\nnltk.download('treebank')\nnltk.download('webtext')\nnltk.download('wordnet')",
"metadata": {
"trusted": true
},
"execution_count": 15,
"execution_count": 6,
"outputs": [
{
"execution_count": 15,
"name": "stderr",
"text": "[nltk_data] Downloading package genesis to /home/pyodide/nltk_data...\n[nltk_data] Unzipping corpora/genesis.zip.\n[nltk_data] Downloading package gutenberg to\n[nltk_data] /home/pyodide/nltk_data...\n[nltk_data] Unzipping corpora/gutenberg.zip.\n[nltk_data] Downloading package inaugural to\n[nltk_data] /home/pyodide/nltk_data...\n[nltk_data] Unzipping corpora/inaugural.zip.\n[nltk_data] Downloading package nps_chat to /home/pyodide/nltk_data...\n[nltk_data] Unzipping corpora/nps_chat.zip.\n[nltk_data] Downloading package treebank to /home/pyodide/nltk_data...\n[nltk_data] Unzipping corpora/treebank.zip.\n[nltk_data] Downloading package webtext to /home/pyodide/nltk_data...\n[nltk_data] Unzipping corpora/webtext.zip.\n[nltk_data] Downloading package wordnet to /home/pyodide/nltk_data...\n",
"output_type": "stream"
},
{
"execution_count": 6,
"output_type": "execute_result",
"data": {
"text/plain": "True"
Expand All @@ -59,7 +64,7 @@
"metadata": {
"trusted": true
},
"execution_count": 9,
"execution_count": 7,
"outputs": [
{
"name": "stdout",
Expand All @@ -79,7 +84,7 @@
"metadata": {
"trusted": true
},
"execution_count": 10,
"execution_count": 8,
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -140,13 +145,8 @@
"metadata": {
"trusted": true
},
"execution_count": 12,
"execution_count": 14,
"outputs": [
{
"name": "stderr",
"text": "/lib/python3.11/site-packages/nltk/draw/__init__.py:15: UserWarning: nltk.draw package not loaded (please install Tkinter library).\n warnings.warn(\"nltk.draw package not loaded (please install Tkinter library).\")\n",
"output_type": "stream"
},
{
"output_type": "display_data",
"data": {
Expand All @@ -163,7 +163,7 @@
"metadata": {
"trusted": true
},
"execution_count": 13,
"execution_count": 15,
"outputs": [
{
"output_type": "display_data",
Expand Down

0 comments on commit 62415fc

Please sign in to comment.