Downloads · 30 days
7.7K
0% of all-time downloads
llm-book/bert-base-japanese-v3-ner-wikipedia-dataset
bert-base-japanese-v3-ner-wikipedia-dataset is a token classification model from llm-book. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
「大規模言語モデル入門」の第6章で紹介している固有表現認識のモデルです。 cl-tohoku/bert-base-japanese-v3をllm-book/ner-wikipedia-datasetでファインチューニングして構築されています。
Downloads · 30 days
7.7K
0% of all-time downloads
All-time downloads
1.7M
Public
Repo size
3.5 GB
Likes
11
Public
Click a slice to open those files.
.bin443 MB · 100%
From the Hugging Face model README
「大規模言語モデル入門」の第6章で紹介している固有表現認識のモデルです。 cl-tohoku/bert-base-japanese-v3をllm-book/ner-wikipedia-datasetでファインチューニングして構築されています。
from transformers import pipeline
from pprint import pprint
ner_pipeline = pipeline(
model="llm-book/bert-base-japanese-v3-ner-wikipedia-dataset",
aggregation_strategy="simple",
)
text = "大谷翔平は岩手県水沢市出身のプロ野球選手"
# text中の固有表現を抽出
pprint(ner_pipeline(text))
# [{'end': None,
# 'entity_group': '人名',
# 'score': 0.99823624,
# 'start': None,
# 'word': '大谷 翔平'},
# {'end': None,
# 'entity_group': '地名',
# 'score': 0.9986874,
# 'start': None,
# 'word': '岩手 県 水沢 市'}]