Downloads · 30 days
42
6% of all-time downloads
wolf4032/bert-japanese-token-classification-search-local-cuisine
bert-japanese-token-classification-search-local-cuisine is a token classification model from wolf4032. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
42
6% of all-time downloads
All-time downloads
697
Public
Parameters
111M
443 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors443 MB · 100%
From the Hugging Face model README
料理を検索するための質問文から、検索検索用キーワードである固有表現を抽出します
例えば、「東京の肉料理で、春に食べられる、鶏肉を使った料理を教えてください」という文章を入力すると、
「東京 → 都道府県/地方(AREA)」 「肉料理 → 種類(TYPE)」 「春 → 季節(SZN)」 「鶏肉 → 食材(INGR)」
のように、固有表現を抽出します
抽出対象は、AREA、TYPE、SZN、INGRの4つです
Google Colaboratoryの場合
!pip install transformers fugashi ipadic
!pip install unidic-lite
from transformers import BertJapaneseTokenizer, BertForTokenClassification
from transformers import pipeline
model_name = 'wolf4032/bert-japanese-token-classification-search-local-cuisine'
model = BertForTokenClassification.from_pretrained(model_name)
tokenizer = BertJapaneseTokenizer.from_pretrained(model_name)
ner_pipeline = pipeline(
'token-classification',
model=model,
tokenizer=tokenizer,
aggregation_strategy='simple'
)
input = '東京の肉料理で、春に食べられる、鶏肉を使った料理を教えてください'
ner_pipeline(input)
wolf4032/token-classification-japanese-search-local-cuisine
wolf4032/token-classification-japanese-search-local-cuisine