File size: 3,072 Bytes
7c52232
91b60f1
 
7c52232
 
 
 
 
 
 
 
e4dadd0
8cbd3c9
7c52232
e4dadd0
7c52232
 
e4dadd0
7c52232
e4dadd0
 
7c52232
 
 
 
 
 
 
 
 
 
4da9ea3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
907065a
 
 
 
4da9ea3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
05c5be1
 
 
 
 
4da9ea3
 
 
 
f0ee98f
 
 
 
4da9ea3
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
language:
- en
dataset_info:
  features:
  - name: sentence
    dtype: string
  - name: unfairness_level
    dtype: string
  splits:
  - name: train
    num_bytes: 1221140
    num_examples: 7945
  - name: validation
    num_bytes: 151516
    num_examples: 1050
  - name: test
    num_bytes: 155836
    num_examples: 1045
  download_size: 708831
  dataset_size: 1528492
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
---
# TOS_DatasetV3

## Dataset Description

TOS_DatasetV3 is a dataset designed for analyzing the unfairness of terms of service (ToS) clauses. It includes sentences from various terms of service agreements categorized into three unfairness levels: **clearly_fair**, **potentially_unfair**, and **clearly_unfair**. This dataset aims to aid in the development of models that can assess the fairness of legal documents.

## Dataset Structure

The dataset consists of the following columns:

- `sentence`: A string representing a sentence from a terms of service document.
- `unfairness_level`: A string indicating the unfairness classification of the sentence. The possible values are:
  - `clearly_fair`
  - `potentially_unfair`
  - `clearly_unfair`

### Features

- **Features:**
  - name: sentence
    dtype: string
  - name: unfairness_level
    dtype: string

## Splits

The dataset is divided into three splits:

- **Train**: Used for training models (7946 examples).
- **Validation**: Used for validating model performance during training (1050 examples).
- **Test**: Used for testing model performance after training (1045 examples).

## Class Split

![image/png](https://cdn-uploads.huggingface.co/production/uploads/64bfef626ac2c20929de87f4/9BOBt1xz70ZHI1nQ1BANl.png)

### Example

Here's a sample from the dataset:

| sentence                          | unfairness_level   |
|-----------------------------------|---------------------|
| "You agree to the terms."        | clearly_fair        |
| "We reserve the right to change." | potentially_unfair   |
| "No refunds will be issued."     | clearly_unfair      |

## Usage

This dataset can be used for various natural language processing tasks, particularly in the context of legal text analysis, fairness assessment, and model training for detecting unfair terms in contracts.

## How to Load the Dataset

You can load the dataset using the `datasets` library from Hugging Face:

```python
from datasets import load_dataset

dataset = load_dataset("TOS_DatasetV3")
```

## Dataset Generation

![image/png](https://cdn-uploads.huggingface.co/production/uploads/64bfef626ac2c20929de87f4/kgzdQQagwjouhCZk5ehXs.png)

## License
This dataset is licensed under the MIT License. Please see the LICENSE file for more details.

## Citation

If you use this dataset in your research, please cite it as follows:

```
@dataset{TOS_DatasetV3,
  author = {Himanshu Mohanty},
  title = {TOS_DatasetV3},
  year = {2024},
  url = {https://huggingface.co/datasets/TOS_DatasetV3}
}