Skip to content

Commit

Permalink
Merge pull request hse-aml#35 from AVBelyy/master
Browse files Browse the repository at this point in the history
Add required import to lemmatization_demo.ipynb
  • Loading branch information
ZEMUSHKA authored Dec 5, 2018
2 parents 7fde864 + e5d31be commit 0b7653f
Showing 1 changed file with 42 additions and 14 deletions.
56 changes: 42 additions & 14 deletions week1/lemmatization_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[nltk_data] Downloading package wordnet to /Users/anton/nltk_data...\n",
"[nltk_data] Package wordnet is already up-to-date!\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import nltk\n",
"nltk.download('wordnet')"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2017-11-05T18:16:27.608310Z",
Expand All @@ -18,13 +47,12 @@
},
"outputs": [],
"source": [
"import nltk\n",
"text = \"This is Andrew's text, isn't it?\""
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2017-11-05T18:16:27.633134Z",
Expand All @@ -38,7 +66,7 @@
"['This', 'is', \"Andrew's\", 'text,', \"isn't\", 'it?']"
]
},
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -50,7 +78,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2017-11-05T18:16:27.647746Z",
Expand All @@ -64,7 +92,7 @@
"['This', 'is', 'Andrew', \"'s\", 'text', ',', 'is', \"n't\", 'it', '?']"
]
},
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -76,7 +104,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2017-11-05T18:16:27.660827Z",
Expand All @@ -90,7 +118,7 @@
"['This', 'is', 'Andrew', \"'\", 's', 'text', ',', 'isn', \"'\", 't', 'it', '?']"
]
},
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -109,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2017-11-05T18:16:27.674332Z",
Expand All @@ -118,15 +146,15 @@
},
"outputs": [],
"source": [
"import nltk\n",
"\n",
"text = \"feet wolves cats talked\"\n",
"tokenizer = nltk.tokenize.TreebankWordTokenizer()\n",
"tokens = tokenizer.tokenize(text)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2017-11-05T18:16:27.693761Z",
Expand All @@ -140,7 +168,7 @@
"u'feet wolv cat talk'"
]
},
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -152,7 +180,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2017-11-05T18:16:30.840117Z",
Expand All @@ -166,7 +194,7 @@
"u'foot wolf cat talked'"
]
},
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -193,7 +221,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.14"
"version": "2.7.15"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0b7653f

Please sign in to comment.