Edit model card

Model Card for Model ID

料理を検索するための質問文から、検索検索用キーワードである固有表現を抽出します

Model Details

Model Description

例えば、「東京の肉料理で、春に食べられる、鶏肉を使った料理を教えてください」という文章を入力すると、

「東京 → 都道府県/地方(AREA)」 「肉料理 → 種類(TYPE)」 「春 → 季節(SZN)」 「鶏肉 → 食材(INGR)」

のように、固有表現を抽出します

抽出対象は、AREA、TYPE、SZN、INGRの4つです

Model Sources

How to Get Started with the Model

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)

Training Details

Training Data

wolf4032/token-classification-japanese-search-local-cuisine

Evaluation

Testing Data, Factors & Metrics

Testing Data

wolf4032/token-classification-japanese-search-local-cuisine

Metrics

  • F1 Score: 調和平均に基づくメトリクスで、精度と再現率のバランスを示します。
  • Accuracy: モデルが正しく予測したインスタンスの割合を示します。
  • Precision: モデルが真と予測したもののうち、実際に真であったものの割合を示します。
  • Recall: 実際に真であるもののうち、モデルが真と予測したものの割合を示します。

Results

  • f1: 0.9961977186311787
  • accuracy: 0.9995689655172414
  • precision: 0.9940978077571669
  • recall: 0.9983065198983911
Downloads last month
100
Safetensors
Model size
111M params
Tensor type
F32
·

Dataset used to train wolf4032/bert-japanese-token-classification-search-local-cuisine

Space using wolf4032/bert-japanese-token-classification-search-local-cuisine 1