File size: 2,637 Bytes
ffa97d9
c730175
 
 
 
 
 
 
 
 
 
5250336
 
a0b5fa6
5250336
 
a0b5fa6
c730175
 
5250336
 
bb99db7
5250336
 
bb99db7
c730175
 
5250336
 
a0b5fa6
5250336
 
a0b5fa6
ffa97d9
 
 
 
 
 
 
 
 
 
 
4ef17fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ffa97d9
 
 
4ef17fa
 
9c65795
ffa97d9
 
 
 
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
---
language:
  - "en"
tags:
  - text-classification
  - sentiment-analysis
task_categories:
  - text-classification
configs:
  - config_name: quality
    data_files:
      - split: train
        path:
          - quality/train.csv.gz
      - split: test
        path:
          - quality/test.csv.gz
  - config_name: readability
    data_files:
      - split: train
        path:
          - readability/train.csv.gz
      - split: test
        path:
          - readability/test.csv.gz
  - config_name: sentiment
    data_files:
      - split: train
        path:
          - sentiment/train.csv.gz
      - split: test
        path:
          - sentiment/test.csv.gz
---

# Text statistics

This dataset is a combination of the following datasets:
- [agentlans/text-quality-v2](https://huggingface.co/datasets/agentlans/text-quality-v2)
- [agentlans/readability](https://huggingface.co/datasets/agentlans/readability)
- [agentlans/twitter-sentiment-meta-analysis](https://huggingface.co/datasets/agentlans/twitter-sentiment-meta-analysis)

The main purpose is to collect the large data into one place for easy training and evaluation.

## Data Preparation and Transformation

### Quality Score Normalization

The dataset was enhanced with additional columns, and quality scores (n = 909 533) were normalized using Ordered Quantile normalization through the `bestNormalize` package in R. This transformation mapped original values to a standardized normal distribution, resulting in a new variable, `transformed_quality`, included in both training and test datasets to enhance statistical modeling capabilities.

### Readability Score Calculation

U.S. reading grade levels were transformed using the Box-Cox method (`bestNormalize` package) with λ = 0.8766912. A custom function standardized the results and inverted the scale to generate 'readability' scores, where higher values indicate easier readability.

The standardized Box-Cox transformation was applied to 919 663 non-missing observations, yielding the following statistics:

- λ (lambda) = 0.8766912
- Mean (before standardization) = 7.908629
- Standard deviation (before standardization) = 3.339119

These transformations improved the dataset's suitability for subsequent statistical analyses.

## Dataset size

The full datasets were shuffled and randomly split into `train` and `test` splits.

| Dataset | Train split | Test split |
|---------|-------------|------------|
| quality       | 809 533     | 100 000    |
| readability       | 869 663     | 50 000     |
| sentiment       | 128 690     | 10 000     |