Skip to content

Commit d8c5812

Browse files
committed
2 parents 497265a + 7246c49 commit d8c5812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Deep Learning for Natural Language Processing with Pytorch.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@
13931393
"things called data. The evolution of a process is directed by a pattern of rules\n",
13941394
"called a program. People create programs to direct processes. In effect,\n",
13951395
"we conjure the spirits of the computer with our spells.\"\"\".split()\n",
1396-
"word_to_ix = { word: i for i, word in enumerate(raw_text) }\n",
1396+
"word_to_ix = { word: i for i, word in enumerate(set(raw_text)) }\n",
13971397
"data = []\n",
13981398
"for i in xrange(2, len(raw_text) - 2):\n",
13991399
" context = [ raw_text[i-2], raw_text[i-1], raw_text[i+1], raw_text[i+2] ]\n",

0 commit comments

Comments
 (0)