From efeae639a5f8e44ab18a18d3ff2262826c251427 Mon Sep 17 00:00:00 2001 From: Kenneth Enevoldsen Date: Mon, 10 Apr 2023 20:49:17 -0700 Subject: [PATCH] docs: hide downloads from output --- docs/tutorials/basic.ipynb | 89 +++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/docs/tutorials/basic.ipynb b/docs/tutorials/basic.ipynb index 1274b58a..b1493aab 100644 --- a/docs/tutorials/basic.ipynb +++ b/docs/tutorials/basic.ipynb @@ -218,6 +218,32 @@ "hide-output" ] }, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# load the small dacy model excluding the NER component\n", + "nlp = dacy.load(\"small\", exclude=[\"ner\"])\n", + "# or use an empty spacy model if you only want to do NER\n", + "# nlp = spacy.blank(\"da\")\n", + "\n", + "# add the ner component from the state-of-the-art model\n", + "nlp.add_pipe(\"dacy/ner\")" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, "outputs": [ { "data": { @@ -247,21 +273,6 @@ "output_type": "display_data" } ], - "source": [ - "# load the small dacy model excluding the NER component\n", - "nlp = dacy.load(\"small\", exclude=[\"ner\"])\n", - "# or use an empty spacy model if you only want to do NER\n", - "# nlp = spacy.blank(\"da\")\n", - "\n", - "# add the ner component from the state-of-the-art model\n", - "nlp.add_pipe(\"dacy/ner\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], "source": [ "doc = nlp(\"Denne NER model er trænet af Dan fra Alexandra Instituttet\")\n", "\n", @@ -320,7 +331,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": { "tags": [ "hide-output" @@ -330,10 +341,10 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 7, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -350,7 +361,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -405,7 +416,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -471,13 +482,13 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", + "\n", "\n", " DaCy\n", " PROPN\n", @@ -519,57 +530,57 @@ "\n", "\n", "\n", - " \n", + " \n", " \n", - " nsubj\n", + " nsubj\n", " \n", " \n", "\n", "\n", "\n", - " \n", + " \n", " \n", - " cop\n", + " cop\n", " \n", " \n", "\n", "\n", "\n", - " \n", + " \n", " \n", - " det\n", + " det\n", " \n", " \n", "\n", "\n", "\n", - " \n", + " \n", " \n", - " amod\n", + " amod\n", " \n", " \n", "\n", "\n", "\n", - " \n", + " \n", " \n", - " case\n", + " case\n", " \n", " \n", "\n", "\n", "\n", - " \n", + " \n", " \n", - " amod\n", + " amod\n", " \n", " \n", "\n", "\n", "\n", - " \n", + " \n", " \n", - " nmod\n", + " nmod\n", " \n", " \n", "\n", @@ -601,7 +612,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -633,7 +644,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -673,7 +684,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [ {