Skip to content

Commit

Permalink
Fix spacy NLP load
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasonjo committed Sep 1, 2019
1 parent 58cebf7 commit f163121
Showing 1 changed file with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"source": [
"# import spacy and load an NLP model\n",
"import spacy\n",
"nlp = spacy.load(\"en_core_web_lg\")\n"
"nlp = spacy.load(\"en_core_web_lg\", disable=[\"tagger\", \"parser\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -71,13 +71,14 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Elphbergs Rudolf\n",
"Rudolf Rose\n",
"Robert Ancestry\n",
"Ancestry Rose\n",
Expand All @@ -86,18 +87,18 @@
"Rudolf Robert\n",
"Robert Rudolf\n",
"Ruritania Burlesdon\n",
"Burlesdon George II\n",
"Lady Burlesdon George II\n",
"George II King\n",
"Rudolf the Third Ruritania \n",
"Rudolf the Third Ruritania\n",
"Burlesdon Amelia\n",
"James Burlesdon\n",
"Burlesdon a Knight of the Garter\n",
"a Knight of the Garter Rudolf\n",
"a Knight of the Garter Ruritania \n",
"Rudolf Ruritania \n",
"a Knight of the Garter Ruritania\n",
"Rudolf Ruritania\n",
"Jacob Jacob\n",
"Jacob Rudolf\n",
"Elphberg Elphberg\n",
"Elphbergs Elphberg\n",
"Elphberg Rudolf\n",
"Bob Rose\n"
]
Expand Down Expand Up @@ -155,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -180,7 +181,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -265,7 +266,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 8,
"metadata": {
"scrolled": true
},
Expand All @@ -277,17 +278,17 @@
" <iframe\n",
" width=\"500\"\n",
" height=\"500\"\n",
" src=\"graph-c7184742-d275-4c41-acad-ec7ad9682de7.html\"\n",
" src=\"graph-7285cc03-44b1-45f2-b786-dfedebb1d149.html\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x7ff17bfd9c88>"
"<IPython.lib.display.IFrame at 0x7f8eb1188278>"
]
},
"execution_count": 12,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -316,7 +317,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit f163121

Please sign in to comment.