stats
Browse files- dataset_stats.py +2 -7
- stats.csv +7 -7
dataset_stats.py
CHANGED
|
@@ -1,9 +1,4 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import json
|
| 3 |
-
from os.path import join as pj
|
| 4 |
-
from glob import glob
|
| 5 |
from statistics import mean
|
| 6 |
-
|
| 7 |
import pandas as pd
|
| 8 |
from datasets import load_dataset
|
| 9 |
|
|
@@ -13,10 +8,10 @@ def count_word(text):
|
|
| 13 |
|
| 14 |
|
| 15 |
if __name__ == '__main__':
|
| 16 |
-
data = ["chemprot", "citation_intent", "hyperpartisan_news", "rct-sample", "sciie"]
|
| 17 |
stats = {}
|
| 18 |
for d in data:
|
| 19 |
-
_data = load_dataset('', d)
|
| 20 |
stats[d] = {
|
| 21 |
'word/validation': mean([count_word(k['text']) for k in _data['validation']]),
|
| 22 |
'word/test': mean([count_word(k['text']) for k in _data['test']]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from statistics import mean
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
from datasets import load_dataset
|
| 4 |
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
if __name__ == '__main__':
|
| 11 |
+
data = ["chemprot", "citation_intent", "hyperpartisan_news", "rct-sample", "sciie", "amcd"]
|
| 12 |
stats = {}
|
| 13 |
for d in data:
|
| 14 |
+
_data = load_dataset('asahi417/multi_domain_document_classification', d)
|
| 15 |
stats[d] = {
|
| 16 |
'word/validation': mean([count_word(k['text']) for k in _data['validation']]),
|
| 17 |
'word/test': mean([count_word(k['text']) for k in _data['test']]),
|
stats.csv
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
,chemprot,citation_intent,hyperpartisan_news,rct-sample,sciie
|
| 2 |
-
word/validation,32,40,502,26,32
|
| 3 |
-
word/test,32,42,612,26,32
|
| 4 |
-
word/train,31,42,536,26,32
|
| 5 |
-
instance/dev,2427,114,64,30212,455
|
| 6 |
-
instance/test,3469,139,65,30135,974
|
| 7 |
-
instance/train,4169,1688,516,500,3219
|
|
|
|
| 1 |
+
,chemprot,citation_intent,hyperpartisan_news,rct-sample,sciie,amcd
|
| 2 |
+
word/validation,32,40,502,26,32,20
|
| 3 |
+
word/test,32,42,612,26,32,19
|
| 4 |
+
word/train,31,42,536,26,32,19
|
| 5 |
+
instance/dev,2427,114,64,30212,455,666
|
| 6 |
+
instance/test,3469,139,65,30135,974,1334
|
| 7 |
+
instance/train,4169,1688,516,500,3219,8000
|