idx (int64) | premise (string) | hypothesis (string) | label (class label) |
---|---|---|---|
0 | "If a hijack was confirmed , procedures called for the hijack coordinator on duty to contact the Pentagon 's National Military Command Center ( NMCC ) and to ask for a military escort aircraft to follow the flight , report anything unusual , and aid search and rescue in the event of an emergency . " | "Once a hijacking is confirmed the Pentagon 's National Military Command Center ( NMCC ) is supposed to be notified so they can order a military escort aircraft to follow the flight and report on anything suspicious ." | 0
(entailment) |
1 | "Indeed , no clear dividing line exists between prereading and reading . " | "There is no obvious difference between prereading and reading ." | 0
(entailment) |
2 | "The supervisor instructed the controller to follow standard procedures for handling a no radio aircraft . " | "Standard procedures were followed for an aircraft with no radio ." | 0
(entailment) |
3 | "But the highest-level Defense Department officials relied on the NMCC 's air threat conference , in which the FAA did not participate for the first 48 minutes . " | "Defense Department officials relied on the NMCC 's air threat conference which did n't include the FAA intially , so crucial information was left out ." | 1
(neutral) |
4 | "Is there a favorite story or storybook or anything that you had when you were little that somebody read to you ? " | "Were any books read to you in your childhood ?" | 0
(entailment) |
5 | "As we prepare for all the events this fall , we are also looking into the future with the preparations for a new facility for the professional art school , administrative offices , faculty studios , a library and a contemporary gallery . " | "New facilities are too costly at this point , but future planning is important still ." | 1
(neutral) |
6 | "For example , increasing the number of products offered in a category by a factor of four ( say from fifty items to 200 ) without increasing total demand in the category would increase the coefficient of variation for each individual product by a factor of two . " | "An increasing number of products offered in a category will definitely not increase the total demand for the item in the category ." | 1
(neutral) |
7 | "These changes are related to new technology and foreign competition . " | "The aging technology makes it impossible for them to be a contender ." | 1
(neutral) |
8 | "Are you going to buy any gifts for people or make anything ? " | "Have you purchased any presents or make handmade stuff ?" | 0
(entailment) |
9 | "It would be so damn foggy you could not see the yellow line on that divided highway in front of you and we to turn left out onto this highway . " | "The fog did not allow us to turn right ." | 1
(neutral) |
10 | "He worked , he 's a teacher , and at that time he worked as the principal of that school , of that school , because it was a , like a high school , there was , from first ( grade ) to high school . " | "The man is a teacher , but also a principal of a place of a learning ." | 0
(entailment) |
11 | "Nobody who knew him would have expected him to do anything else , whether he had been sent away in disgrace or not'but , as it was thought he had left the country , his return did have a dramatic quality . " | "Nobody he knew expected him to do anything else by he surprised them ." | 0
(entailment) |
12 | "Much that might have been offered with sober good advice here is contaminated by an obsessive concern with the identification of the sex of the perpetrator of past injustices . " | "A perpetrator 's sex should have no bearing on the seriousness of their crime ." | 1
(neutral) |
13 | "\\ How \\ , how come ? " | "I do n't care how you did it , I just want to know why ?" | 1
(neutral) |
14 | "Among infiuential explanations of why preschoolers are so drawn to pretending , Freud 's psychoanalytic theory and Piaget 's cognitive theory held sway for much of the twentieth century . " | "Prior to the twentieth century , there were no explanations for why preschoolers like pretending ." | 1
(neutral) |
15 | "Unless I 'm like , when I go home for like Christmas break , after being there for like two weeks , it was like I 'd never moved out and we get kind of like tense with each other . " | "When I was home for the holidays it felt like I had never left ." | 0
(entailment) |
16 | "No state dollars are available for this project . " | "No state dollars can be given to this project ." | 0
(entailment) |
17 | "OK , I thought so . " | "Yes , there was virtually no doubt in my mind that that was the case ." | 0
(entailment) |
18 | "Perhaps the fascination with man 's past grew out of the obsession with ruins evinced by Romanticism ; certainly , modern archaeology seems to have followed close behind , for the excavation of the supposed site of Troy took place only about 100 years ago . " | "History was not important for most of history , they did n't care what had occurred ." | 1
(neutral) |
19 | "A favorite story about anything ? " | "You may talk about any story that you have liked ." | 0
(entailment) |
20 | "People just do n't have the time or take the time to keep the traditions going they just get too busy or too lazy . " | "People do not maintain traditions because they are lazy ." | 0
(entailment) |
21 | "Um , what kind of things did you remember reading when you started to read ? " | "Do you have any recollection of what sort of stuff were your initial reading materials ?" | 0
(entailment) |
22 | "Yeah , I have a son that uh , likes to relive the tragedy of his split lip . " | "My son is n't really that fond of telling any stories , but he does have this one that he loves to tell to everyone and everything that he can about his split lip ." | 1
(neutral) |
23 | "Prior to 9/11 , it was understood that an order to shoot down a commercial aircraft would have to be issued by the National Command Authority ( a phrase used to describe the president and secretary of defense ) . " | "Aircrafts ca n't be shot down by just anyone ." | 1
(neutral) |
24 | "I mean literally you could just see it hang , it looked like a fire scene on the news it was awful . " | "The scene was like one you would see on the news ." | 0
(entailment) |
25 | "However , what emerged were almost invariably autocratic regimes that were usually unwilling to tolerate any opposition-even in countries , such as Egypt , that had a parliamentary tradition . " | "Te regimes were unwilling to tolerate any opposition even if the country voted on some things ." | 1
(neutral) |
26 | "General Arnold later recalled instructing Marr to go ahead and scramble them , and we 'll get authorities later . " | "General Arnold told Marr to hold off on scrambling them because they were n't authorized to do so ." | 2
(contradiction) |
27 | "Bin Ladin apparently kept his options open , maintaining contacts with Gulbuddin Hekmatyar , who , though an Islamic extremist , was also one of the Taliban 's most militant opponents . " | "Bin Ladin kept his options open by keeping in contact with Gulbuddin Hekmatyar ." | 0
(entailment) |
28 | "As I recall , I 've never asked you for a contribution ... until now . " | "I 've never asked you for a donation , but I will now ." | 0
(entailment) |
29 | "No evidence of firearms or of their identifiable remains was found at the aircraft 's crash site , and the cockpit voice recorder gives no indication of a gun being fired or mentioned at any time . " | "There was no evidence of guns on the plane ." | 0
(entailment) |
30 | "Cleveland even told the Command Center it was prepared to contact a nearby military base to make the request . " | "Cleveland was anxious to proceed without wasting any time ." | 1
(neutral) |
31 | "I read everything I could get my hands on . " | "There was nothing I could n't get my hands on ." | 1
(neutral) |
32 | "Grandpop was a very quiet , somber man he would n't say much but uh , Gra ndmom was a little more boisterous . " | "Grandfather was a silent man and did n't talk much ." | 0
(entailment) |
33 | "We have already described some specific ways that managers can think about integration of new information technologies and manufacturing practices . " | "Managers can think about integration of new technologies in any of the ways we have described ." | 0
(entailment) |
34 | "Lower-level officials improvised-for example , the FAA 's Boston Center bypassed the chain of command and directly contacted NEADS after the first hijacking . " | "When the chain of command was circumvented by the FAA 's Boston Center contacting NEADS directly , no one stood in their way ." | 1
(neutral) |
35 | "Nobody who knew him would have expected him to do anything else , whether he had been sent away in disgrace or not'but , as it was thought he had left the country , his return did have a dramatic quality . " | "Nobody he knew expected him to do anything else ." | 0
(entailment) |
36 | "You do n't know . " | "You do n't know ." | 0
(entailment) |
37 | "Retail buyers of old grappled with this problem as they do today . " | "The buyers then and now both have no answers to the problem ." | 1
(neutral) |
38 | "No evidence of firearms or of their identifiable remains was found at the aircraft 's crash site , and the cockpit voice recorder gives no indication of a gun being fired or mentioned at any time . " | "There was no evidence of guns on the plane , but the hijackers claimed they had them ." | 1
(neutral) |
39 | "Nobody who knew him would have expected him to do anything else , whether he had been sent away in disgrace or not'but , as it was thought he had left the country , his return did have a dramatic quality . " | "Nobody he knew expected him to stop ." | 0
(entailment) |
40 | "Five seconds later , Jarrah asked , Is that it ? " | "Jarrah had to repeat what he said because no one heard ." | 1
(neutral) |
41 | "Once these manufacturing and information practices have been adopted , it should come as no surprise that they affect the performance of business units . " | "If the practices are adopted , it should come as no surprise that they affect the performance of the business units ." | 0
(entailment) |
42 | "Understanding is the key . " | "Understanding is the most important aspect" | 0
(entailment) |
43 | ". . . You got a conflict on that direction ? " | "No one brought up a varying opinion on that direction ." | 1
(neutral) |
44 | "These measures were precautionary steps taken because of the strikes in New York . " | "The strikes in New York caused those precautionary measures to be put in place , even though they served no purpose ." | 1
(neutral) |
45 | "The cockpit voice recorder captured the sounds of the passenger assault muffled by the intervening cockpit door . " | "The cockpit voice recorder had no problems that day ." | 1
(neutral) |
46 | "Coming to Goodwill was the first step toward my becoming totally independent . " | "becoming totally independent is a process that starts with coming to Goodwill ." | 0
(entailment) |
47 | "And it was an important aspect , was there a particular crowd that hung out because of that ? " | "Where there any crowds you avoided ?" | 1
(neutral) |
48 | "For example , in the OLW lexicon , when two people'sometimes but not always a man and a woman'agree that they Lword one another , they often enter into one of the Cwords , which leads perhaps eventually to the M-word , which in turn authorizes them to F-word with the sanction of church and state . " | "Case in point : using the OLW lingo , when a couple ( regardless of the gender makeup thereof ) Lword each other , it can lead them to a Cword , which may lead to the Mword , allowing them to F-word with divine and governmental permission ." | 0
(entailment) |
49 | "This was done because of the organization of work in clothing shops ; the low capital costs and high proportion of labor costs , especially in women 's wear for contract shops ; the intense product competition among manufacturers within and among geographic markets ; and the diversity of products and changing styles . " | "This was done because of how workers in clothing shops were organized ." | 0
(entailment) |
50 | "I 'd be happy to answer any questions you may have about this program -- please call me at 317/274-5625 . " | "I will gladly answer any questions you have concerning the program ." | 0
(entailment) |
51 | "But via a network that allows contractors access , manufacturers ' headquarters can make sure that the information available is the most recent and complete . " | "The data is always changing so giving contractors access to the manufacturer 's network would be beneficial to all ." | 1
(neutral) |
52 | "He became even more concerned as its route changed , moving into another sector 's airspace . " | "The plane never should have gone that way ." | 1
(neutral) |
53 | "Three of the flights had actually taken off within 10 to 15 minutes of their planned departure times . " | "There of the flights had taken off , but the others remained ." | 1
(neutral) |
54 | "she said to them , because of you we 're going to die too , through no fault of our own ! " | "She said because all of you abandoned us , we 're also going to die and we did nothing wrong !" | 1
(neutral) |
55 | "We arrived , at my brother 's , and Cristobal , with the livestock and the rest , still had n't arrived . " | "When we got to my brother 's , there was no sign of Cristobal or the livestock ." | 0
(entailment) |
56 | "Our 90th Birthday celebration began in July and will continue through February . " | "We had no celebration for turning 70 as a company ." | 1
(neutral) |
57 | "And we do n't waste money . " | "We never waste any money ." | 0
(entailment) |
58 | "Both individuals agreed that the teleconference played no role in coordinating a response to the attacks of 9/11 . " | "Neither party claimed that the phone meeting of the prior morning had been responsible for the actions taken in relation to the attacks on 9/11 ." | 0
(entailment) |
59 | "But I 'm never going to take the knives out . " | "It 's of the utmost importance that the knives stay where they are , so I will never take them out ." | 1
(neutral) |
60 | "Believing they had only a minute or two , the Vice President again communicated the authorization to engage or take out the aircraft . " | "The VP thought they only had a minute or two to make the decision , so he told them to shoot any plane down immeditaely ." | 0
(entailment) |
61 | "Chased him all the way up to the upstairs , I do n't think the bird ever even pooped in the house not that we found -- " | "The bird was always calm and very housebroken ." | 1
(neutral) |
62 | "Not really , that 's all . " | "That is really all ." | 0
(entailment) |
63 | "Your contribution -- large or small -- through the Annual Fund will carry us one more step toward realizing the Purdue dream for the 21st century . " | "No matter what the size your contributions are important to us ." | 0
(entailment) |
64 | "And then there was never like any female blood Averetts until like my oldest cousin had kids . " | "There were no female Averetts until my oldest cousin finally had children ." | 0
(entailment) |
65 | "Please send any survival tips for third and fourth year dental students to me , in care of IUSD ! " | "I would appreciate if you would send any survival tips for third or fourth year dental students ." | 0
(entailment) |
66 | "At 8 : 21 , American 11 turned off its transponder , immediately degrading the information available about the aircraft . " | "American 11 turned off its transponder at 8 : 21 AM immediately degrading any available information about the location or wellbeing of the aircraft ." | 0
(entailment) |
67 | "The answer has nothing to do with their cause , however , but with the simple fact that dictionaries are not exercises in bi-unique substitutability ; in other words , if one of the senses of run is `operate ' ( as in She runs an engine factory ) , that does not make it valid to assume that one can substitute operate for run in We run in the marathon every year . Although recognizing this as a shortcoming of dictionaries and assigning it arbitrarily to what , for lack of a better term , we might call the genius of the language , might seem trivial to the casual observer , it is a valid matter for concern in the realm of lexicology . " | "The answer given is irrelevant to their cause ." | 0
(entailment) |
68 | "It is important to note also that this product was not promoted at retail with discounted prices at any time during this period , so the variation is not due to consumers preferring to purchase a product when it was on sale . " | "The product was n't offered on sale at any point during the time in question ." | 0
(entailment) |
69 | "Sometimes I gave up , as when pointing to my temples ( white ) brought shampoo rather than the desired bleach . " | "I had lots of shampoo but no bleach ." | 1
(neutral) |
70 | "I 'm enclosing some information on Children 's Harbor which I hope you 'll find interesting . " | "If you have any more questions , feel free to call me ." | 1
(neutral) |
71 | "It is difficult for the nonspecialist reader ( like me ) to assess the validity of his arguments , which are based on his contention that the language ( and its congeners ) were carried along by the spread of nomad pastoralism . " | "It 's clear to me that his arguments make no sense ." | 1
(neutral) |
72 | "In this competition for legitimacy , secular regimes had no alternative to offer . " | "Secular regimes resorted to chaos , as they had no other choice ." | 1
(neutral) |
73 | "The groundwork for a true global terrorist network was being laid . " | "The terror network was never actually brought to fruition ." | 1
(neutral) |
74 | "At that point in time , the Langley pilots did not know the threat they were facing , did not know where United 93 was located , and did not have shootdown authorization . " | "In that moment the Langley pilots were unaware of the threat , the location of United 93 and had no authorization to engage ." | 0
(entailment) |
75 | "Similarly , feminists discourage titles that identify women 's ( but not men 's ) marital status ( though many users mistakenly assume Ms . a synonym for Miss ) . " | "Feminists know exactly what is right and wrong about titles" | 1
(neutral) |
76 | "noisome Has nothing to do with sound or decibel level , but means simply unpleasant or disgusting . " | "Noisome has nothing to do with sound or decibel level ." | 0
(entailment) |
77 | "That is , this is the last such request that will be penned from the Cavanaugh Hall address . " | "You wo n't be receiving any more requests from the address at Cavanaugh Hall ." | 0
(entailment) |
78 | "But grammar enters the picture here , too , and dictionaries are remiss in syntactic description of how the language works in comparison with what its words mean , how they are spelled and pronounced , and where they came from . " | "Dictionaries are not the best in explaining how language functions in comparison to word meanings , spelling , pronunciation and where it is derived from ." | 0
(entailment) |
79 | "It seems unnecessary to point out that Framework can not have a very sophisticated list of words if it has only 37 , 000 in its memory , but I thought it might be interesting to see what substitutions were evoked by SUGGEST . " | "There was no reason to mention that Framework is not sophisticated since most people know ." | 1
(neutral) |
80 | "Regardless of how customization was done in the past , consumers paid more for the end product . " | "The final product will be more costly for buyers , no matter what method of customization was used ." | 0
(entailment) |
81 | "My friend , a punster , spotted the fact that the plate nicely violated the no offensive plates rule . " | "The no offensive plates rule was violated by the plate noticed by my friend ." | 0
(entailment) |
82 | "Uh , I loved the part where they would , you know , make things out of nothing . " | "I really enjoyed the moment when something was made out of nothing ." | 0
(entailment) |
83 | "Not really , that 's all . " | "We do not have anything else ." | 0
(entailment) |
84 | "The FAA manager of the teleconference also remembered that the military participated only briefly before the Pentagon was hit . " | "The military 's brief participation before the Pentagon was hit , was remembered by the FAA manager ." | 0
(entailment) |
85 | "Men and women struggling with addictions find healing , forgiveness and the chance to make a new start in life ... families living from paycheck to paycheck find comfort , food and emergency assistance ... and underprivileged children have the opportunity to eat well-balanced meals and participate in special activities . " | "Underprivileged children have opportunities that they have never had before ." | 0
(entailment) |
86 | "I can think of no better time to continue extending grace to others than at Easter . " | "Easter is a wonderful time like no other to continue to extend grace and financial assistance to others ." | 0
(entailment) |
87 | "At that point in time , the Langley pilots did not know the threat they were facing , did not know where United 93 was located , and did not have shootdown authorization . " | "Without proper knowledge of the situation and authorization the Langley pilots really could not do anything to help ." | 1
(neutral) |
88 | "As for me , I do my utmost to avoid language that may offend people , including men . " | "I do my best to never offend men and women alike ." | 0
(entailment) |
89 | "FAA headquarters had by this time established an open line of communication with the Command Center at Herndon and instructed it to poll all its centers about suspect aircraft . " | "The Herndon Command Center was told to ask about suspect aircraft at all centers belonging to it ." | 0
(entailment) |
90 | "When one of these women gave birth to a child without knowing which sailor had fathered it , the paternity was logged as gun , perhaps alluding to the midship gun , which was often located near the makeshift maternity room . " | "The woman gave birth with no known father , so it was recorded as gun ." | 0
(entailment) |
91 | "But you ended up with blood poisoning from all the gasoline . " | "You came in contact with so much gasoline you must have blood poisoning now , it 's absolutely toxic to your body ." | 0
(entailment) |
92 | "There follows a desexing section on maxims ( for He who laughs last laughs best read The last laugh is the best : not only does it not say the same thing but the second is totally lacking in the rhetorical devices packed into the first ) , and a two-page bibliography , reference notes to chapters , and an index . " | "Afterwards one finds a section that attempts to desex aphorisms ( e.g. `` He who laughs last laughs best '' rewritten as `` The last laugh is the best , '' these are different in meaning and the latter has no alliterative repetition of `` laughs '' ) , and a bibliography of two pages , chapter reference notes , and finally an index ." | 0
(entailment) |
93 | "Do you remember any stories about Grandma Mackton , your mom 's a little bit ? " | "Do you remember anything that Grandma Mackton ever told you , any stories or anything that she might have told before she had died ?" | 1
(neutral) |
94 | "I look nobody is standing at the saw . " | "Nobody is standing at the saw ." | 0
(entailment) |
95 | "I have nobody here to guide me . " | "I 've found it refereshing that there 's no one here to offer their guidance , because it 's meant I 've finally had space to find my own way ." | 1
(neutral) |
96 | "I have nothing particularly adverse to say about the book . " | "There is nothing adverse I can say about the book ." | 0
(entailment) |
97 | "Anything you remember ? " | "Do you remember anything from your childhood ?" | 1
(neutral) |
98 | "While the evidence of Iranian involvement is strong , there are also signs that al Qaeda played some role , as yet unknown . " | "The evidence proving Iranian involvement is absolutely trustworthy ." | 1
(neutral) |
99 | "Uh , I loved the part where they would , you know , make things out of nothing . " | "No other part was anywhere near as impressive as the one where things were produced out of nothing ." | 1
(neutral) |
Overview
Original dataset is available in the original Github repo.
This dataset is a collection of NLI benchmarks constructed as described in the paper An Empirical Study on Model-agnostic Debiasing Strategies for Robust Natural Language Inference published at CoNLL 2020.
Dataset curation
No specific curation for this dataset. Label encoding follows exactly what is reported in the paper by the authors. Also, from the paper:
all the following datasets are collected based on the public available resources proposed by their authors, thus the experimental results in this paper are comparable to the numbers reported in the original papers and the other papers that use these datasets
Most of the datasets included follow the custom 3-class NLI convention {"entailment": 0, "neutral": 1, "contradiction": 2}
.
However, the following datasets have a particular label mapping
IS-SD
:{"non-entailment": 0, "entailment": 1}
LI_TS
:{"non-contradiction": 0, "contradiction": 1}
Dataset structure
This benchmark dataset includes 10 adversarial datasets. To provide more insights on how the adversarial datasets attack the models, the authors categorized them according to the bias(es) they test and they renamed them accordingly. More details in section 2 of the paper. A mapping with the original dataset names is provided below
Name | Original Name | Original Paper | Original Curation | |
---|---|---|---|---|
0 | PI-CD | SNLI-Hard | Gururangan et al. (2018) | SNLI test sets instances that cannot be correctly classified by a neural classifier (fastText) trained on only the hypothesis sentences. |
1 | PI-SP | MNLI-Hard | Liu et al. (2020) | MNLI-mismatched dev sets instances that cannot be correctly classified by surface patterns that are highly correlated with the labels. |
2 | IS-SD | HANS | McCoy et al. (2019) | Dataset that tests lexical overlap, subsequence, and constituent heuristics between the hypothesis and premises sentences. |
3 | IS-CS | SoSwap-AddAMod | Nie et al. (2019) | Pairs of sentences whose logical relations cannot be extracted from lexical information alone. Premise are taken from SNLI dev set and modified. The original paper assigns a Lexically Misleading Scores (LMS) to each instance. Here, only the subset with LMS > 0.7 is reported. |
4 | LI-LI | Stress tests (antonym) | Naik et al. (2018) and Glockner et al. (2018) | Merge of the 'antonym' category in Naik et al. (2018) (from MNLI matched and mismatched dev sets) and Glockner et al. (2018) (SNLI training set). |
5 | LI-TS | Created by the authors | Created by the authors | Swap the two sentences in the original MultiNLI mismatched dev sets. If the gold label is 'contradiction', the corresponding label in the swapped instance remains unchanged, otherwise it becomes 'non-contradicted'. |
6 | ST-WO | Word overlap | Naik et al. (2018) | 'Word overlap' category in Naik et al. (2018). |
7 | ST-NE | Negation | Naik et al. (2018) | 'Negation' category in Naik et al. (2018). |
8 | ST-LM | Length mismatch | Naik et al. (2018) | 'Length mismatch' category in Naik et al. (2018). |
9 | ST-SE | Spelling errors | Naik et al. (2018) | 'Spelling errors' category in Naik et al. (2018). |
Code to create the dataset
import pandas as pd
from datasets import Dataset, ClassLabel, Value, Features, DatasetDict
Tri_dataset = ["IS_CS", "LI_LI", "PI_CD", "PI_SP", "ST_LM", "ST_NE", "ST_SE", "ST_WO"]
Ent_bin_dataset = ["IS_SD"]
Con_bin_dataset = ["LI_TS"]
# read data
with open("<path to file>/robust_nli.txt", encoding="utf-8", mode="r") as fl:
f = fl.read().strip().split("\n")
f = [eval(i) for i in f]
df = pd.DataFrame.from_dict(f)
# rename to map common names
df = df.rename(columns={"prem": "premise", "hypo": "hypothesis"})
# reorder columns
df = df.loc[:, ["idx", "split", "premise", "hypothesis", "label"]]
# create split-specific features
Tri_features = Features(
{
"idx": Value(dtype="int64"),
"premise": Value(dtype="string"),
"hypothesis": Value(dtype="string"),
"label": ClassLabel(num_classes=3, names=["entailment", "neutral", "contradiction"]),
}
)
Ent_features = Features(
{
"idx": Value(dtype="int64"),
"premise": Value(dtype="string"),
"hypothesis": Value(dtype="string"),
"label": ClassLabel(num_classes=2, names=["non-entailment", "entailment"]),
}
)
Con_features = Features(
{
"idx": Value(dtype="int64"),
"premise": Value(dtype="string"),
"hypothesis": Value(dtype="string"),
"label": ClassLabel(num_classes=2, names=["non-contradiction", "contradiction"]),
}
)
# convert to datasets
dataset_splits = {}
for split in df["split"].unique():
print(split)
df_split = df.loc[df["split"] == split].copy()
if split in Tri_dataset:
df_split["label"] = df_split["label"].map({"entailment": 0, "neutral": 1, "contradiction": 2})
ds = Dataset.from_pandas(df_split, features=Tri_features)
elif split in Ent_bin_dataset:
df_split["label"] = df_split["label"].map({"non-entailment": 0, "entailment": 1})
ds = Dataset.from_pandas(df_split, features=Ent_features)
elif split in Con_bin_dataset:
df_split["label"] = df_split["label"].map({"non-contradiction": 0, "contradiction": 1})
ds = Dataset.from_pandas(df_split, features=Con_features)
else:
print("ERROR:", split)
dataset_splits[split] = ds
datasets = DatasetDict(dataset_splits)
datasets.push_to_hub("pietrolesci/robust_nli", token="<your token>")
# check overlap between splits
from itertools import combinations
for i, j in combinations(datasets.keys(), 2):
print(
f"{i} - {j}: ",
pd.merge(
datasets[i].to_pandas(),
datasets[j].to_pandas(),
on=["premise", "hypothesis", "label"],
how="inner",
).shape[0],
)
#> PI_SP - ST_LM: 0
#> PI_SP - ST_NE: 0
#> PI_SP - IS_CS: 0
#> PI_SP - LI_TS: 1
#> PI_SP - LI_LI: 0
#> PI_SP - ST_SE: 0
#> PI_SP - PI_CD: 0
#> PI_SP - IS_SD: 0
#> PI_SP - ST_WO: 0
#> ST_LM - ST_NE: 0
#> ST_LM - IS_CS: 0
#> ST_LM - LI_TS: 0
#> ST_LM - LI_LI: 0
#> ST_LM - ST_SE: 0
#> ST_LM - PI_CD: 0
#> ST_LM - IS_SD: 0
#> ST_LM - ST_WO: 0
#> ST_NE - IS_CS: 0
#> ST_NE - LI_TS: 0
#> ST_NE - LI_LI: 0
#> ST_NE - ST_SE: 0
#> ST_NE - PI_CD: 0
#> ST_NE - IS_SD: 0
#> ST_NE - ST_WO: 0
#> IS_CS - LI_TS: 0
#> IS_CS - LI_LI: 0
#> IS_CS - ST_SE: 0
#> IS_CS - PI_CD: 0
#> IS_CS - IS_SD: 0
#> IS_CS - ST_WO: 0
#> LI_TS - LI_LI: 0
#> LI_TS - ST_SE: 0
#> LI_TS - PI_CD: 0
#> LI_TS - IS_SD: 0
#> LI_TS - ST_WO: 0
#> LI_LI - ST_SE: 0
#> LI_LI - PI_CD: 0
#> LI_LI - IS_SD: 0
#> LI_LI - ST_WO: 0
#> ST_SE - PI_CD: 0
#> ST_SE - IS_SD: 0
#> ST_SE - ST_WO: 0
#> PI_CD - IS_SD: 0
#> PI_CD - ST_WO: 0
#> IS_SD - ST_WO: 0
- Downloads last month
- 336