Skip to content

Commit

Permalink
esupar
Browse files Browse the repository at this point in the history
  • Loading branch information
KoichiYasuoka committed Jul 4, 2024
1 parent e4f7317 commit 20b19ac
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions demo/2024-07-05/ja-gpt2-upos.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,25 @@
"for t in doc:\n",
" print(txt[t[\"start\"]:t[\"end\"]],t[\"entity\"])"
]
},
{
"cell_type":"markdown",
"metadata":{ "colab_type":"text" },
"source":[
"Biaffineで係り受け解析"
]
},
{
"cell_type":"code",
"metadata":{ "colab_type":"code" },
"source": [
"!pip install esupar\n",
"nlp=esupar.load(\"KoichiYasuoka/gpt2-small-japanese-upos\")\n",
"txt=\"国境の長いトンネルを抜けると雪国であった。\"\n",
"doc=nlp(txt)\n",
"import deplacy\n",
"deplacy.serve(doc,port=None)"
]
}
]
}

0 comments on commit 20b19ac

Please sign in to comment.