Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

docs(cookbook): install notebook 08 NER model

taoche0dbe9274ebeb
diff --git a/cookbook/introduction/08_Your_First_Knowledge_Graph.ipynb b/cookbook/introduction/08_Your_First_Knowledge_Graph.ipynb
index 65074f87..d63e2890 100644
--- a/cookbook/introduction/08_Your_First_Knowledge_Graph.ipynb
+++ b/cookbook/introduction/08_Your_First_Knowledge_Graph.ipynb
@@ -83,7 +83,18 @@
"cell_type": "code",
"metadata": {},
"source": [
- "!pip install semantica\n"
+ "%pip install semantica\n",
+ "\n",
+ "# spaCy models are distributed separately from the spaCy library. This lesson\n",
+ "# relies on the English model to recognize standalone places such as Cupertino.\n",
+ "import sys\n",
+ "import subprocess\n",
+ "import spacy\n",
+ "\n",
+ "try:\n",
+ " spacy.load(\"en_core_web_sm\")\n",
+ "except OSError:\n",
+ " subprocess.check_call([sys.executable, \"-m\", \"spacy\", \"download\", \"en_core_web_sm\"])\n"
],
"execution_count": null,
"outputs": []