Datasets:
language:
- ja
license: cc-by-sa-4.0
size_categories:
- 100M<n<1B
task_categories:
- text-classification
- question-answering
- zero-shot-classification
- sentence-similarity
pretty_name: Japanese Massive Text Embedding Benchmark
dataset_info:
- config_name: amazon_counterfactual_classification
features:
- name: text
dtype: string
- name: label
dtype: int32
- name: label_text
dtype: string
splits:
- name: train
num_bytes: 862548
num_examples: 5600
- name: validation
num_bytes: 73019
num_examples: 466
- name: test
num_bytes: 143450
num_examples: 934
download_size: 564439
dataset_size: 1079017
- config_name: amazon_review_classification
features:
- name: id
dtype: string
- name: text
dtype: string
- name: label
dtype: int32
- name: label_text
dtype: string
splits:
- name: train
num_bytes: 70483811
num_examples: 200000
- name: validation
num_bytes: 1737207
num_examples: 5000
- name: test
num_bytes: 1750094
num_examples: 5000
download_size: 42683660
dataset_size: 73971112
- config_name: jagovfaqs_22k-corpus
features:
- name: docid
dtype: int64
- name: text
dtype: string
splits:
- name: corpus
num_bytes: 14094076
num_examples: 22794
download_size: 5998948
dataset_size: 14094076
- config_name: jagovfaqs_22k-query
features:
- name: query
dtype: string
- name: relevant_docs
sequence: int64
splits:
- name: train
num_bytes: 3082736
num_examples: 15955
- name: validation
num_bytes: 649734
num_examples: 3419
- name: test
num_bytes: 644182
num_examples: 3420
download_size: 2480610
dataset_size: 4376652
- config_name: jaqket-corpus
features:
- name: docid
dtype: string
- name: title
dtype: string
- name: text
dtype: string
splits:
- name: corpus
num_bytes: 1088030699
num_examples: 114229
download_size: 603763755
dataset_size: 1088030699
- config_name: jaqket-query
features:
- name: qid
dtype: string
- name: query
dtype: string
- name: relevant_docs
sequence: string
splits:
- name: train
num_bytes: 2395970
num_examples: 13061
- name: validation
num_bytes: 189987
num_examples: 995
- name: test
num_bytes: 190981
num_examples: 997
download_size: 1664963
dataset_size: 2776938
- config_name: jsick
features:
- name: idx
dtype: int32
- name: sentence1
dtype: string
- name: sentence2
dtype: string
- name: label
dtype: float32
splits:
- name: train
num_bytes: 862384
num_examples: 5956
- name: validation
num_bytes: 289049
num_examples: 1985
- name: test
num_bytes: 284469
num_examples: 1986
download_size: 641501
dataset_size: 1435902
- config_name: jsts
features:
- name: sentence_pair_id
dtype: string
- name: yjcaptions_id
dtype: string
- name: sentence1
dtype: string
- name: sentence2
dtype: string
- name: label
dtype: float32
splits:
- name: train
num_bytes: 2243442
num_examples: 12451
- name: test
num_bytes: 264435
num_examples: 1457
download_size: 1238128
dataset_size: 2507877
- config_name: livedoor_news
features:
- name: url
dtype: string
- name: timestamp
dtype: string
- name: title
dtype: string
- name: text
dtype: string
- name: label
dtype:
class_label:
names:
'0': dokujo-tsushin
'1': it-life-hack
'2': kaden-channel
'3': livedoor-homme
'4': movie-enter
'5': peachy
'6': smax
'7': sports-watch
'8': topic-news
splits:
- name: train
num_bytes: 16489474
num_examples: 5163
- name: validation
num_bytes: 3641617
num_examples: 1106
- name: test
num_bytes: 3516715
num_examples: 1107
download_size: 13724805
dataset_size: 23647806
- config_name: massive_intent_classification
features:
- name: id
dtype: string
- name: label
dtype:
class_label:
names:
'0': datetime_query
'1': iot_hue_lightchange
'2': transport_ticket
'3': takeaway_query
'4': qa_stock
'5': general_greet
'6': recommendation_events
'7': music_dislikeness
'8': iot_wemo_off
'9': cooking_recipe
'10': qa_currency
'11': transport_traffic
'12': general_quirky
'13': weather_query
'14': audio_volume_up
'15': email_addcontact
'16': takeaway_order
'17': email_querycontact
'18': iot_hue_lightup
'19': recommendation_locations
'20': play_audiobook
'21': lists_createoradd
'22': news_query
'23': alarm_query
'24': iot_wemo_on
'25': general_joke
'26': qa_definition
'27': social_query
'28': music_settings
'29': audio_volume_other
'30': calendar_remove
'31': iot_hue_lightdim
'32': calendar_query
'33': email_sendemail
'34': iot_cleaning
'35': audio_volume_down
'36': play_radio
'37': cooking_query
'38': datetime_convert
'39': qa_maths
'40': iot_hue_lightoff
'41': iot_hue_lighton
'42': transport_query
'43': music_likeness
'44': email_query
'45': play_music
'46': audio_volume_mute
'47': social_post
'48': alarm_set
'49': qa_factoid
'50': calendar_set
'51': play_game
'52': alarm_remove
'53': lists_remove
'54': transport_taxi
'55': recommendation_movies
'56': iot_coffee
'57': music_query
'58': play_podcasts
'59': lists_query
- name: label_text
dtype: string
- name: text
dtype: string
splits:
- name: train
num_bytes: 952706
num_examples: 11514
- name: validation
num_bytes: 167146
num_examples: 2033
- name: test
num_bytes: 244800
num_examples: 2974
download_size: 561181
dataset_size: 1364652
- config_name: massive_scenario_classification
features:
- name: id
dtype: string
- name: label
dtype:
class_label:
names:
'0': social
'1': transport
'2': calendar
'3': play
'4': news
'5': datetime
'6': recommendation
'7': email
'8': iot
'9': general
'10': audio
'11': lists
'12': qa
'13': cooking
'14': takeaway
'15': music
'16': alarm
'17': weather
- name: label_text
dtype: string
- name: text
dtype: string
splits:
- name: train
num_bytes: 869565
num_examples: 11514
- name: validation
num_bytes: 152631
num_examples: 2033
- name: test
num_bytes: 223304
num_examples: 2974
download_size: 539275
dataset_size: 1245500
- config_name: mewsc16_ja
features:
- name: idx
dtype: int32
- name: text
dtype: string
- name: label
dtype:
class_label:
names:
'0': 経済
'1': 政治
'2': 事故
'3': 科学技術
'4': 文化
'5': 気象
'6': スポーツ
'7': 事件
'8': 教育
'9': 健康
'10': 訃報
'11': 環境
splits:
- name: validation
num_bytes: 268986
num_examples: 992
- name: test
num_bytes: 274020
num_examples: 992
download_size: 343843
dataset_size: 543006
- config_name: mrtydi-corpus
features:
- name: docid
dtype: string
- name: title
dtype: string
- name: text
dtype: string
splits:
- name: corpus
num_bytes: 3006085074
num_examples: 7000027
download_size: 1691587026
dataset_size: 3006085074
- config_name: mrtydi-query
features:
- name: qid
dtype: string
- name: query
dtype: string
- name: relevant_docs
sequence: string
splits:
- name: train
num_bytes: 295489
num_examples: 3697
- name: validation
num_bytes: 74818
num_examples: 928
- name: test
num_bytes: 61080
num_examples: 720
download_size: 264443
dataset_size: 431387
- config_name: paws_x_ja
features:
- name: id
dtype: int32
- name: sentence1
dtype: string
- name: sentence2
dtype: string
- name: label
dtype: int32
splits:
- name: train
num_bytes: 14843988
num_examples: 49401
- name: validation
num_bytes: 653770
num_examples: 2000
- name: test
num_bytes: 660628
num_examples: 2000
download_size: 10432627
dataset_size: 16158386
configs:
- config_name: amazon_counterfactual_classification
data_files:
- split: train
path: amazon_counterfactual_classification/train-*
- split: validation
path: amazon_counterfactual_classification/validation-*
- split: test
path: amazon_counterfactual_classification/test-*
- config_name: amazon_review_classification
data_files:
- split: train
path: amazon_review_classification/train-*
- split: validation
path: amazon_review_classification/validation-*
- split: test
path: amazon_review_classification/test-*
- config_name: jagovfaqs_22k-corpus
data_files:
- split: corpus
path: jagovfaqs_22k-corpus/corpus-*
- config_name: jagovfaqs_22k-query
data_files:
- split: train
path: jagovfaqs_22k-query/train-*
- split: validation
path: jagovfaqs_22k-query/validation-*
- split: test
path: jagovfaqs_22k-query/test-*
- config_name: jaqket-corpus
data_files:
- split: corpus
path: jaqket-corpus/corpus-*
- config_name: jaqket-query
data_files:
- split: train
path: jaqket-query/train-*
- split: validation
path: jaqket-query/validation-*
- split: test
path: jaqket-query/test-*
- config_name: jsick
data_files:
- split: train
path: jsick/train-*
- split: validation
path: jsick/validation-*
- split: test
path: jsick/test-*
- config_name: jsts
data_files:
- split: train
path: jsts/train-*
- split: test
path: jsts/test-*
- config_name: livedoor_news
data_files:
- split: train
path: livedoor_news/train-*
- split: validation
path: livedoor_news/validation-*
- split: test
path: livedoor_news/test-*
- config_name: massive_intent_classification
data_files:
- split: train
path: massive_intent_classification/train-*
- split: validation
path: massive_intent_classification/validation-*
- split: test
path: massive_intent_classification/test-*
- config_name: massive_scenario_classification
data_files:
- split: train
path: massive_scenario_classification/train-*
- split: validation
path: massive_scenario_classification/validation-*
- split: test
path: massive_scenario_classification/test-*
- config_name: mewsc16_ja
data_files:
- split: validation
path: mewsc16_ja/validation-*
- split: test
path: mewsc16_ja/test-*
- config_name: mrtydi-corpus
data_files:
- split: corpus
path: mrtydi-corpus/corpus-*
- config_name: mrtydi-query
data_files:
- split: train
path: mrtydi-query/train-*
- split: validation
path: mrtydi-query/validation-*
- split: test
path: mrtydi-query/test-*
- config_name: paws_x_ja
data_files:
- split: train
path: paws_x_ja/train-*
- split: validation
path: paws_x_ja/validation-*
- split: test
path: paws_x_ja/test-*
JMTEB-fixed
このリポジトリは元のJMTEBデータセットのUTF-8エンコーディングエラーを修正したバージョンです。
修正内容
問題
NLP Journal LaTeXコーパスの一部ファイル(例: V28N02-25.tex)が異なるエンコーディング(Shift-JIS、EUC-JPなど)で保存されており、UTF-8デコーディングエラーが発生していました。
解決策
retrieval.pyのNLPJournalHelper.load_txtメソッドを修正し、複数のエンコーディングを順次試行するようにしました。
使用方法
from datasets import load_dataset
dataset = load_dataset(
"ks-pf/JMTEB-fixed",
name="nlp_journal_title_abs-corpus",
trust_remote_code=True
)
# JMTEB: Japanese Massive Text Embedding Benchmark
JMTEB is a benchmark for evaluating Japanese text embedding models. It consists of 6 tasks, currently involving 24 datasets in total.
## TL;DR
```python
from datasets import load_dataset
dataset = load_dataset("sbintuitions/JMTEB", name="<dataset_name>", split="<split>")
JMTEB_DATASET_NAMES = (
'livedoor_news',
'mewsc16_ja',
'amazon_review_classification',
'amazon_counterfactual_classification',
'massive_intent_classification',
'massive_scenario_classification',
'jsts',
'jsick',
'paws_x_ja',
'jaqket-query',
'jaqket-corpus',
'mrtydi-query',
'mrtydi-corpus',
'jagovfaqs_22k-query',
'jagovfaqs_22k-corpus',
'nlp_journal_title_abs-query',
'nlp_journal_title_abs-corpus',
'nlp_journal_title_intro-query',
'nlp_journal_title_intro-corpus',
'nlp_journal_abs_intro-query',
'nlp_journal_abs_intro-corpus',
'nlp_journal_abs_article-query',
'nlp_journal_abs_article-corpus',
'jacwir-retrieval-query',
'jacwir-retrieval-corpus',
'miracl-retrieval-query',
'miracl-retrieval-corpus',
'mldr-retrieval-query',
'mldr-retrieval-corpus',
'esci-query',
'esci-corpus',
'jqara-query',
'jqara-corpus',
'jacwir-reranking-query',
'jacwir-reranking-corpus',
'miracl-reranking-query',
'miracl-reranking-corpus',
'mldr-reranking-query',
'mldr-reranking-corpus',
)
Introduction
We introduce JMTEB (Japanese Massive Text Embedding Benchmark), an evaluation benchmark including 6 tasks (Clustering, Classification, STS, PairClassification, Retrieval and Reranking). 24 datasets in total are collected to conduct these tasks. Similar with MTEB, we aim to provide a diverse and extensible evaluation benchmark for Japanese embedding models, enabling more insightful analysis on model performance, thus benefitting the emerging of more powerful models.
We also provide an easy-to-use evaluation script to perform the evaluation just with a one-line command. Refer to https://https://github.com/sbintuitions/JMTEB-eval-scripts.
We encourage anyone interested to contribute to this benchmark!
Tasks and Datasets
Here is an overview of the tasks and datasets currently included in JMTEB.
| Task | Dataset | Train | Dev | Test | Document (Retrieval) |
|---|---|---|---|---|---|
| Clustering | Livedoor-News | 5,163 | 1,106 | 1,107 | - |
| MewsC-16-ja | - | 992 | 992 | - | |
| Classification | AmazonCounterfactualClassification | 5,600 | 466 | 934 | - |
| AmazonReviewClassification | 200,000 | 5,000 | 5,000 | - | |
| MassiveIntentClassification | 11,514 | 2,033 | 2,974 | - | |
| MassiveScenarioClassification | 11,514 | 2,033 | 2,974 | - | |
| STS | JSTS | 12,451 | - | 1,457 | - |
| JSICK | 5,956 | 1,985 | 1,986 | - | |
| PairClassification | PAWS-X-ja | 49,401 | 2,000 | 2,000 | - |
| Retrieval | JAQKET | 13,061 | 995 | 997 | 114,229 |
| Mr.TyDi-ja | 3,697 | 928 | 720 | 7,000,027 | |
| NLP Journal title-abs | - | 100 | 404 | 504 | |
| NLP Journal title-intro | - | 100 | 404 | 504 | |
| NLP Journal abs-intro | - | 100 | 404 | 504 | |
| NLP Journal abs-abstract | - | 100 | 404 | 504 | |
| JaGovFaqs-22k | 15,955 | 3,419 | 3,420 | 22,794 | |
| JaCWIR-Retrieval | - | 1,000 | 4,000 | 513,107 | |
| MIRACL-Retrieval | 2,433 | 1,044 | 860 | 6,953,614 | |
| MLDR-Retrieval | 2,262 | 200 | 200 | 10,000 | |
| Reranking | Esci | 10,141 | 1,790 | 4,206 | 149,999 |
| JaCWIR-Reranking | - | 1,000 | 4,000 | 513,107 | |
| JQaRA | 498 | 1,737 | 1,667 | 250,609 | |
| MIRACL-Reranking | 2,433 | 1,044 | 860 | 37,124 | |
| MLDR-Reranking | 2,262 | 200 | 200 | 5,339 |
Clustering
The goal of the Clustering task is to correctly distribute texts with similar semantics/topic to the same cluster. It is an unsupervised process in evaluating embedding models. We have 2 datasets for Clustering.
Livedoor News
Livedoor News is a dataset collected from the news reports of a Japanese news site by RONDHUIT Co, Ltd. in 2012. It contains over 7,000 news report texts across 9 categories (topics).
The dataset is licensed under CC BY-ND 2.1.
MewsC-16-ja
MewsC-16-ja is the Japanese split of MewsC-16 dataset, which consists of topic sentences from Wikinews. It has 12 types of topics.
Classification
Classification aims to predict the correct category of the text only with its dense representation. Typically, the process is conducted with supervised learning that employs statistical models like linear regression and k-NN.
AmazonCounterfactualClassification
We use the Japanese split of Amazon Multiligual Counterfactual Dataset in MTEB, which contains sentences from Amazon customer review texts. It is a binary classification of the text is/isn't a statement that describes an event that did not or cannot take place. For more details, refer to https://huggingface.co/datasets/mteb/amazon_counterfactual.
This dataset is made available under the Creative Commons Attribution-ShareAlike 4.0 International License. Refer to following page for the license information of this dataset: https://github.com/amazon-science/amazon-multilingual-counterfactual-dataset?tab=License-1-ov-file.
AmazonReviewClassification
We use the Japanese split of the Multiligual Amazon Review Corpus in MTEB. The dataset is a 5-classification of customer rating on a product, according with a review paragraph. For more details, refer to https://huggingface.co/datasets/amazon_reviews_multi.
Refer to following page for the license information of this dataset: https://docs.opendata.aws/amazon-reviews-ml/readme.html.
MassiveIntentClassification
We use the Japanese split of MASSIVE dataset. This dataset is built with Alexa user utterance and the corresponding intent. It is a 60-classification. For more detail as well as the license information, refer to https://github.com/alexa/massive.
MassiveScenarioClassification
We use the Japanese split of MASSIVE dataset. This dataset is built with Alexa user utterance and the corresponding scenario. It is an 18-classification. The texts are the same as MassiveIntentClassification. For more detail as well as the license information, refer to https://github.com/alexa/massive.
STS
STS (Semantic Textual Similarity) unsupervisedly predicts the semantic similarity between two sentences, and correlations are computed between the prediction and the annotated similarity.
JSTS
JSTS, a part of JGLUE, is a Japanese version of STS dataset. The sentences are extracted from the Japanese version of the MS COCO Caption Dataset, the YJ Captions Dataset (Miyazaki and Shimizu, 2016). Refer to https://github.com/yahoojapan/JGLUE/blob/main/README.md#jsts for more details.
This dataset is licensed under Creative Commons Attribution Share Alike 4.0 International.
JSICK
JSICK is the Japanese NLI and STS dataset by manually translating the English dataset SICK (Marelli et al., 2014) into Japanese. We use merely the STS part.
This work is licensed under a Creative Commons Attribution 4.0 International License.
PairClassification
PairClassification is a task to predict a label (typically binary) that indicates whether two sentences constitute a parapharse pair, utilizing the best binary threshold accuracy or F1.
PAWS-X-ja
PAWS-X-ja is the Japanese split of PAWS-X, which is a multiligual paraphrase identification dataset.
Regarding the license, the dataset may be freely used for any purpose, although acknowledgement of Google LLC ("Google") as the data source would be appreciated.
Retrieval
The retrieval task aims to find the most relevant document with the query from the corpus, through the computing of embedding similarities.
JAQKET
JAQKET (AIO Ver. 1.0) dataset has a quiz set and a corpus that consists of Wikipedia passages, each is a description is an entity (the title of the Wikipedia page). A quiz question is answered by looking for the most relevant Wikipedia passage with the quiz question text. For more details, refer to https://www.nlp.ecei.tohoku.ac.jp/projects/jaqket/.
The copyright for the quiz questions in the train subset belongs to the abc/EQIDEN Committee and redistributed from Tohoku University for non-commercial research purposes. This validation/test subset is licensed under CC BY-SA 4.0 DEED.
Mr.TyDi-ja
Mr.TyDi-ja is the Japanese split of Mr.TyDi, a multilingual benchmark dataset built on TyDi. The goal is to find the relevant documents with the query text. For more details, refer to https://huggingface.co/datasets/castorini/mr-tydi.
This dataset is licensed under Apache-2.0.
NLP Journal title-abs
NLP Journal title-intro
NLP Journal abs-intro
NLP Journal abs-article
These datasets are created with the Japanese NLP Journal LaTeX Corpus. We shuffled the titles, abstracts and introductions of the academic papers, and the goal is to find the corresponding abstract with the given title / introduction with the given title / introduction / full article with the given abstract, through the similarities computed with text embeddings.
These datasets are licensed under CC-BY-4.0, according to the Manuscript Guide to Journal Publication.
JaGovFaqs-22k
JaGovFaqs-22k is a dataset consisting of FAQs manully extracted from the website of Japanese bureaus. We shuffled the queries (questions) and corpus (answers), and the goal is to match the answer with the question.
This dataset is licensed under CC-BY-4.0.
JaCWIR-Retrieval
JaCWIR (Japanese Casual Web IR Dataset) is a dataset consisting of questions and webpage meta description texts collected from Hatena Bookmark. Passages that contain various genres are collected with RSS, and corresponding questions are generated with ChatGPT-3.5. JaCWIR-Retrieval reformats JaCWIR data for retrieval task.
Refer to this link for the detail of the license of JaCWIR.
MIRACL-Retrieval
MIRACL 🌍🙌🌏 (Multilingual Information Retrieval Across a Continuum of Languages) is a multilingual retrieval dataset that focuses on search across 18 different languages, which collectively encompass over three billion native speakers around the world. In JMTEB, we use the Japanese split of MIRACL. MIRACL inherits from Mr.TyDi-ja. MIRACL-Retrieval is the reformatted version of MIRACL for retrieval task.
This dataset is licensed under Apache-2.0.
MLDR-Retrieval
MLDR is a Multilingual Long-Document Retrieval dataset built on Wikipeida, Wudao and mC4, covering 13 typologically diverse languages. Specifically, we sample lengthy articles from Wikipedia, Wudao and mC4 datasets and randomly choose paragraphs from them. Then we use GPT-3.5 to generate questions based on these paragraphs. The generated question and the sampled article constitute a new text pair to the dataset. MLDR-Retrieval is the reformatted version of MLDR (Japanese split) for retrieval task.
This dataset is licensed under MIT.
Reranking
The reranking task aims to rerank the retrieved documents through computing embedding similarities.
Esci
Amazon esci is a dataset consisting of retrieval queries and products information on Amazon. For each data, the relevance between query and product is annotated with E(Exact), S(Substitute), C(Complement), and I(Irrelevant). Each relevance label is given a different score, allowing for more detailed scoring. We employed product titles and descriptions as product information and excluded data without descriptions.
This dataset is Apache-2.0.
JQaRA
JQaRA (Japanese Question Answering with Retrieval Augmentation) is a reranking dataset consisting of questions processed from JAQKET and corpus from Japanese Wikipedia. There are 100 passages for each question, where multiple relevant passages in the 100 are relevant with the question.
This dataset is licensed with CC-BY-SA-4.0.
JaCWIR-Reranking
JaCWIR (Japanese Casual Web IR Dataset) is a dataset consisting of questions and webpage meta description texts collected from Hatena Bookmark. Passages that contain various genres are collected with RSS, and corresponding questions are generated with ChatGPT-3.5. JaCWIR-Reranking reformats JaCWIR data for reranking task. 1 out of 100 passages is relevant with the question.
Refer to this link for the detail of the license of JaCWIR.
MIRACL-Reranking
MIRACL 🌍🙌🌏 (Multilingual Information Retrieval Across a Continuum of Languages) is a multilingual retrieval dataset that focuses on search across 18 different languages, which collectively encompass over three billion native speakers around the world. In JMTEB, we use the Japanese split of MIRACL. MIRACL inherits from Mr.TyDi-ja. MIRACL-Reranking is the reformatted version of MIRACL for reranking task. One or multiple passages are relevant with the question.
This dataset is licensed under Apache-2.0.
MLDR-Reranking
MLDR is a Multilingual Long-Document Retrieval dataset built on Wikipeida, Wudao and mC4, covering 13 typologically diverse languages. Specifically, we sample lengthy articles from Wikipedia, Wudao and mC4 datasets and randomly choose paragraphs from them. Then we use GPT-3.5 to generate questions based on these paragraphs. The generated question and the sampled article constitute a new text pair to the dataset. MLDR-Reranking is the reformatted version of MLDR (Japanese split) for reranking task.
This dataset is licensed under MIT.
Reference
@misc{jmteb,
author = {Li, Shengzhe and Ohagi, Masaya and Ri, Ryokan},
title = {{J}{M}{T}{E}{B}: {J}apanese {M}assive {T}ext {E}mbedding {B}enchmark},
howpublished = {\url{https://huggingface.co/datasets/sbintuitions/JMTEB}},
year = {2024},
}
License
Our code is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
Regarding the license information of datasets, please refer to the individual datasets.
