hieunguyen1053
commited on
Commit
•
b7ce4cd
1
Parent(s):
f632b52
Update README.md
Browse files
README.md
CHANGED
@@ -68,7 +68,7 @@ def preprocess(sample):
|
|
68 |
- Format for Rationale task
|
69 |
|
70 |
```python
|
71 |
-
def
|
72 |
premise = sample['premise']
|
73 |
hypothesis = sample['hypothesis']
|
74 |
rationale = sample['reason']
|
@@ -78,4 +78,30 @@ def preprocess(sample):
|
|
78 |
"""
|
79 |
<|startoftext|><|premise|> TOKYO, Dec 18 (Reuters) - Japan’s Shionogi & Co said on Tuesday that it has applied to health regulators in the United States, Canada and Europe for approval of its HIV drug Dolutegravir. Shionogi developed Dolutegravir with a Viiv Healthcare, an AIDS drug joint venture between GlaxoSmithKline and Pfizer, in exchange for its rights to the drug. <|hypothesis|> The article was written on December 18th. <|rationale|> TOKYO, Dec 18 (Reuters) is when the article was written as it states in the first words of the sentence <|endoftext|>
|
80 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
```
|
|
|
68 |
- Format for Rationale task
|
69 |
|
70 |
```python
|
71 |
+
def preprocess_rationale(sample):
|
72 |
premise = sample['premise']
|
73 |
hypothesis = sample['hypothesis']
|
74 |
rationale = sample['reason']
|
|
|
78 |
"""
|
79 |
<|startoftext|><|premise|> TOKYO, Dec 18 (Reuters) - Japan’s Shionogi & Co said on Tuesday that it has applied to health regulators in the United States, Canada and Europe for approval of its HIV drug Dolutegravir. Shionogi developed Dolutegravir with a Viiv Healthcare, an AIDS drug joint venture between GlaxoSmithKline and Pfizer, in exchange for its rights to the drug. <|hypothesis|> The article was written on December 18th. <|rationale|> TOKYO, Dec 18 (Reuters) is when the article was written as it states in the first words of the sentence <|endoftext|>
|
80 |
"""
|
81 |
+
```
|
82 |
+
|
83 |
+
- Format for GPT-3
|
84 |
+
|
85 |
+
```python
|
86 |
+
def preprocess_gpt3(sample):
|
87 |
+
premise = sample['premise']
|
88 |
+
hypothesis = sample['hypothesis']
|
89 |
+
label = sample['label']
|
90 |
+
|
91 |
+
if label == 0:
|
92 |
+
output = f'\n<|correct|> True\n<|incorrect|> False\n<|incorrect|> Neither'
|
93 |
+
elif label == 1:
|
94 |
+
output = f'\n<|correct|> Neither\n<|incorrect|> True\n<|incorrect|> False'
|
95 |
+
else:
|
96 |
+
output = f'\n<|correct|> False\n<|incorrect|> True\n<|incorrect|> Neither'
|
97 |
+
|
98 |
+
return {'text': f'<|startoftext|> anli 2: {premise} <|question|> {hypothesis}\nTrue, False, or Neither? <|answer|> {output} <|endoftext|>'}
|
99 |
+
|
100 |
+
"""
|
101 |
+
<|startoftext|> anli 2: TOKYO, Dec 18 (Reuters) - Japan’s Shionogi & Co said on Tuesday that it has applied to health regulators in the United States, Canada and Europe for approval of its HIV drug Dolutegravir. Shionogi developed Dolutegravir with a Viiv Healthcare, an AIDS drug joint venture between GlaxoSmithKline and Pfizer, in exchange for its rights to the drug. <|question|> The article was written on December 18th.
|
102 |
+
True, False, or Neither? <|answer|>
|
103 |
+
<|correct|> True
|
104 |
+
<|incorrect|> False
|
105 |
+
<|incorrect|> Neither <|endoftext|>
|
106 |
+
"""
|
107 |
```
|