Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Apr 19, 2020
1 parent 67b9173 commit 187fbb2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 36 deletions.
12 changes: 6 additions & 6 deletions 11_midlevel_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
{
"data": {
"text/plain": [
"(#228) ['xxbos','xxmaj','this','movie',',','which','i','just','discovered','at'...]"
"(#374) ['xxbos','xxmaj','well',',','\"','cube','\"','(','1997',')'...]"
]
},
"execution_count": null,
Expand Down Expand Up @@ -162,7 +162,7 @@
{
"data": {
"text/plain": [
"tensor([ 2, 8, 20, 27, 11, 88, 18, 53, 3286, 45])"
"tensor([ 2, 8, 76, 10, 23, 3112, 23, 34, 3113, 33])"
]
},
"execution_count": null,
Expand Down Expand Up @@ -192,7 +192,7 @@
{
"data": {
"text/plain": [
"(#10) ['xxbos','xxmaj','this','movie',',','which','i','just','discovered','at']"
"(#10) ['xxbos','xxmaj','well',',','\"','cube','\"','(','1997',')']"
]
},
"execution_count": null,
Expand All @@ -219,7 +219,7 @@
{
"data": {
"text/plain": [
"'xxbos xxmaj this movie , which i just discovered at'"
"'xxbos xxmaj well , \" cube \" ( 1997 )'"
]
},
"execution_count": null,
Expand Down Expand Up @@ -256,8 +256,8 @@
{
"data": {
"text/plain": [
"((#228) ['xxbos','xxmaj','this','movie',',','which','i','just','discovered','at'...],\n",
" (#238) ['xxbos','i','stopped','watching','this','film','half','way','through','.'...])"
"((#374) ['xxbos','xxmaj','well',',','\"','cube','\"','(','1997',')'...],\n",
" (#207) ['xxbos','xxmaj','conrad','xxmaj','hall','went','out','with','a','bang'...])"
]
},
"execution_count": null,
Expand Down
37 changes: 7 additions & 30 deletions clean/11_midlevel_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
{
"data": {
"text/plain": [
"(#228) ['xxbos','xxmaj','this','movie',',','which','i','just','discovered','at'...]"
"(#374) ['xxbos','xxmaj','well',',','\"','cube','\"','(','1997',')'...]"
]
},
"execution_count": null,
Expand All @@ -99,7 +99,7 @@
{
"data": {
"text/plain": [
"tensor([ 2, 8, 20, 27, 11, 88, 18, 53, 3286, 45])"
"tensor([ 2, 8, 76, 10, 23, 3112, 23, 34, 3113, 33])"
]
},
"execution_count": null,
Expand All @@ -122,30 +122,7 @@
{
"data": {
"text/plain": [
"tensor([ 2, 8, 20, 27, 11, 88, 18, 53, 3286, 45])"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"num = Numericalize()\n",
"num.setup(toks)\n",
"nums = toks.map(num)\n",
"nums[0][:10]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(#10) ['xxbos','xxmaj','this','movie',',','which','i','just','discovered','at']"
"(#10) ['xxbos','xxmaj','well',',','\"','cube','\"','(','1997',')']"
]
},
"execution_count": null,
Expand All @@ -165,7 +142,7 @@
{
"data": {
"text/plain": [
"'xxbos xxmaj this movie , which i just discovered at'"
"'xxbos xxmaj well , \" cube \" ( 1997 )'"
]
},
"execution_count": null,
Expand All @@ -185,8 +162,8 @@
{
"data": {
"text/plain": [
"((#228) ['xxbos','xxmaj','this','movie',',','which','i','just','discovered','at'...],\n",
" (#238) ['xxbos','i','stopped','watching','this','film','half','way','through','.'...])"
"((#374) ['xxbos','xxmaj','well',',','\"','cube','\"','(','1997',')'...],\n",
" (#207) ['xxbos','xxmaj','conrad','xxmaj','hall','went','out','with','a','bang'...])"
]
},
"execution_count": null,
Expand Down Expand Up @@ -269,7 +246,7 @@
{
"data": {
"text/plain": [
"(3.0, 5.0, 2.0)"
"(3.0, -1.0, 2.0)"
]
},
"execution_count": null,
Expand Down

0 comments on commit 187fbb2

Please sign in to comment.