Downloads · 30 days
4.2K
2% of all-time downloads
jurabi/bert-ner-japanese
bert-ner-japanese is a token classification model from jurabi. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as cc-by-sa-3.0.
BertForTokenClassificationを用いて、日本語の文から固有表現を抽出します。
Downloads · 30 days
4.2K
2% of all-time downloads
All-time downloads
261K
Public
Repo size
1.3 GB
Likes
11
Public
Click a slice to open those files.
.h5443 MB · 50%
From the Hugging Face model README
BertForTokenClassificationを用いて、日本語の文から固有表現を抽出します。
抽出される固有表現のタイプは、以下の8種類です。
必要なライブラリ(transformers、unidic_lite、fugashi)をpipなどでインストールして、下記のコードを実行するだけです。
from transformers import BertJapaneseTokenizer, BertForTokenClassification
from transformers import pipeline
model = BertForTokenClassification.from_pretrained("jurabi/bert-ner-japanese")
tokenizer = BertJapaneseTokenizer.from_pretrained("jurabi/bert-ner-japanese")
ner_pipeline = pipeline('ner', model=model, tokenizer=tokenizer)
ner_pipeline("株式会社Jurabiは、東京都台東区に本社を置くIT企業である。")
東北大学乾研究室が公開している日本語BERTモデル(cl-tohoku/bert-base-japanese-v2)
ストックマーク株式会社が公開しているWikipediaを用いた日本語の固有表現抽出データセット(stockmarkteam/ner-wikipedia-dataset)
ファインチューニングに使用したプログラムは、jurabiinc/bert-ner-japaneseで公開しています。