xnli
Stay organized with collections
Save and categorize content based on your preferences.
XNLI is a subset of a few thousand examples from MNLI which has been translated
into a 14 different languages (some low-ish resource). As with MNLI, the goal is
to predict textual entailment (does sentence A imply/contradict/neither sentence
B) and is a classification task (given two sentences, predict one of three
labels).
Split |
Examples |
'test' |
5,010 |
'validation' |
2,490 |
FeaturesDict({
'hypothesis': TranslationVariableLanguages({
'language': Text(shape=(), dtype=string),
'translation': Text(shape=(), dtype=string),
}),
'label': ClassLabel(shape=(), dtype=int64, num_classes=3),
'premise': Translation({
'ar': Text(shape=(), dtype=string),
'bg': Text(shape=(), dtype=string),
'de': Text(shape=(), dtype=string),
'el': Text(shape=(), dtype=string),
'en': Text(shape=(), dtype=string),
'es': Text(shape=(), dtype=string),
'fr': Text(shape=(), dtype=string),
'hi': Text(shape=(), dtype=string),
'ru': Text(shape=(), dtype=string),
'sw': Text(shape=(), dtype=string),
'th': Text(shape=(), dtype=string),
'tr': Text(shape=(), dtype=string),
'ur': Text(shape=(), dtype=string),
'vi': Text(shape=(), dtype=string),
'zh': Text(shape=(), dtype=string),
}),
})
Feature |
Class |
Shape |
Dtype |
Description |
|
FeaturesDict |
|
|
|
hypothesis |
TranslationVariableLanguages |
|
|
|
hypothesis/language |
Text |
|
string |
|
hypothesis/translation |
Text |
|
string |
|
label |
ClassLabel |
|
int64 |
|
premise |
Translation |
|
|
|
premise/ar |
Text |
|
string |
|
premise/bg |
Text |
|
string |
|
premise/de |
Text |
|
string |
|
premise/el |
Text |
|
string |
|
premise/en |
Text |
|
string |
|
premise/es |
Text |
|
string |
|
premise/fr |
Text |
|
string |
|
premise/hi |
Text |
|
string |
|
premise/ru |
Text |
|
string |
|
premise/sw |
Text |
|
string |
|
premise/th |
Text |
|
string |
|
premise/tr |
Text |
|
string |
|
premise/ur |
Text |
|
string |
|
premise/vi |
Text |
|
string |
|
premise/zh |
Text |
|
string |
|
@InProceedings{conneau2018xnli,
author = "Conneau, Alexis
and Rinott, Ruty
and Lample, Guillaume
and Williams, Adina
and Bowman, Samuel R.
and Schwenk, Holger
and Stoyanov, Veselin",
title = "XNLI: Evaluating Cross-lingual Sentence Representations",
booktitle = "Proceedings of the 2018 Conference on Empirical Methods
in Natural Language Processing",
year = "2018",
publisher = "Association for Computational Linguistics",
location = "Brussels, Belgium",
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-12-06 UTC.
[null,null,["Last updated 2022-12-06 UTC."],[],[],null,["# xnli\n\n\u003cbr /\u003e\n\n- **Description**:\n\nXNLI is a subset of a few thousand examples from MNLI which has been translated\ninto a 14 different languages (some low-ish resource). As with MNLI, the goal is\nto predict textual entailment (does sentence A imply/contradict/neither sentence\nB) and is a classification task (given two sentences, predict one of three\nlabels).\n\n- **Additional Documentation** :\n [Explore on Papers With Code\n north_east](https://paperswithcode.com/dataset/xnli)\n\n- **Homepage** :\n \u003chttps://www.nyu.edu/projects/bowman/xnli/\u003e\n\n- **Source code** :\n [`tfds.text.Xnli`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/text/xnli.py)\n\n- **Versions**:\n\n - **`1.1.0`** (default): No release notes.\n- **Download size** : `17.04 MiB`\n\n- **Dataset size** : `29.62 MiB`\n\n- **Auto-cached**\n ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):\n Yes\n\n- **Splits**:\n\n| Split | Examples |\n|----------------|----------|\n| `'test'` | 5,010 |\n| `'validation'` | 2,490 |\n\n- **Feature structure**:\n\n FeaturesDict({\n 'hypothesis': TranslationVariableLanguages({\n 'language': Text(shape=(), dtype=string),\n 'translation': Text(shape=(), dtype=string),\n }),\n 'label': ClassLabel(shape=(), dtype=int64, num_classes=3),\n 'premise': Translation({\n 'ar': Text(shape=(), dtype=string),\n 'bg': Text(shape=(), dtype=string),\n 'de': Text(shape=(), dtype=string),\n 'el': Text(shape=(), dtype=string),\n 'en': Text(shape=(), dtype=string),\n 'es': Text(shape=(), dtype=string),\n 'fr': Text(shape=(), dtype=string),\n 'hi': Text(shape=(), dtype=string),\n 'ru': Text(shape=(), dtype=string),\n 'sw': Text(shape=(), dtype=string),\n 'th': Text(shape=(), dtype=string),\n 'tr': Text(shape=(), dtype=string),\n 'ur': Text(shape=(), dtype=string),\n 'vi': Text(shape=(), dtype=string),\n 'zh': Text(shape=(), dtype=string),\n }),\n })\n\n- **Feature documentation**:\n\n| Feature | Class | Shape | Dtype | Description |\n|------------------------|------------------------------|-------|--------|-------------|\n| | FeaturesDict | | | |\n| hypothesis | TranslationVariableLanguages | | | |\n| hypothesis/language | Text | | string | |\n| hypothesis/translation | Text | | string | |\n| label | ClassLabel | | int64 | |\n| premise | Translation | | | |\n| premise/ar | Text | | string | |\n| premise/bg | Text | | string | |\n| premise/de | Text | | string | |\n| premise/el | Text | | string | |\n| premise/en | Text | | string | |\n| premise/es | Text | | string | |\n| premise/fr | Text | | string | |\n| premise/hi | Text | | string | |\n| premise/ru | Text | | string | |\n| premise/sw | Text | | string | |\n| premise/th | Text | | string | |\n| premise/tr | Text | | string | |\n| premise/ur | Text | | string | |\n| premise/vi | Text | | string | |\n| premise/zh | Text | | string | |\n\n- **Supervised keys** (See\n [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):\n `None`\n\n- **Figure**\n ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):\n Not supported.\n\n- **Examples**\n ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):\n\nDisplay examples... \n\n- **Citation**:\n\n @InProceedings{conneau2018xnli,\n author = \"Conneau, Alexis\n and Rinott, Ruty\n and Lample, Guillaume\n and Williams, Adina\n and Bowman, Samuel R.\n and Schwenk, Holger\n and Stoyanov, Veselin\",\n title = \"XNLI: Evaluating Cross-lingual Sentence Representations\",\n booktitle = \"Proceedings of the 2018 Conference on Empirical Methods\n in Natural Language Processing\",\n year = \"2018\",\n publisher = \"Association for Computational Linguistics\",\n location = \"Brussels, Belgium\",\n }"]]