Mingi Shin commited on
Commit
8fa7397
·
unverified ·
0 Parent(s):

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -0
README.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This is the subset of the Reuters-21578 benchmark, contains only the documents with a single category and only the categories that have at least 1 document in both the training and testing sets, following the filtering steps by Debole and Sebastiani, 2005.
2
+
3
+ I used dataset provided with NLTK Python library.
4
+
5
+ There are [R52 datasets after preprocessing](https://ana.cachopo.org/datasets-for-single-label-text-categorization), provided by Ana Cardoso-Cachopo, but I couldn't find the raw R52 dataset without pre-processing.
6
+
7
+ I tried my best to follow the given directions, but **there are inconsistencies with the existing dataset online**. The total number of documents in other pre-processed R52 dataset is 9,100, whereas mine is 9,130. I'm not sure where this inconsistency come from. Maybe NLTK version of Reuters-21578 has some duplicated documents over different categories. (c.f. Debole and Sebastiani mentioned that their dataset consists of 9,052 documents) So, **please use with caution**.
8
+
9
+ There are 52 classes and 9,130 documents.
10
+
11
+ ```
12
+ class train test
13
+ acq 1596 696
14
+ alum 31 19
15
+ bop 22 9
16
+ carcass 6 5
17
+ cocoa 46 15
18
+ coffee 90 22
19
+ copper 31 13
20
+ cotton 15 9
21
+ cpi 54 17
22
+ cpu 3 1
23
+ crude 253 121
24
+ dlr 3 3
25
+ earn 2840 1083
26
+ fuel 4 7
27
+ gas 10 8
28
+ gnp 59 15
29
+ gold 70 20
30
+ grain 41 10
31
+ heat 6 4
32
+ housing 15 2
33
+ income 7 4
34
+ instal-debt 5 1
35
+ interest 191 81
36
+ ipi 34 11
37
+ iron-steel 26 12
38
+ jet 2 1
39
+ jobs 37 12
40
+ lead 4 4
41
+ lei 11 3
42
+ livestock 16 6
43
+ lumber 10 4
44
+ meal-feed 10 1
45
+ money-fx 222 87
46
+ money-supply 123 28
47
+ nat-gas 24 12
48
+ nickel 3 1
49
+ orange 13 9
50
+ pet-chem 13 6
51
+ platinum 1 2
52
+ potato 2 3
53
+ reserves 37 12
54
+ retail 19 1
55
+ rubber 31 9
56
+ ship 108 36
57
+ strategic-metal 9 6
58
+ sugar 97 25
59
+ tea 2 3
60
+ tin 17 10
61
+ trade 250 76
62
+ veg-oil 19 11
63
+ wpi 14 9
64
+ zinc 8 5
65
+ TOTAL 6560 2570
66
+ ```
67
+
68
+ I do not have any copyright of this dataset.
69
+
70
+ If you're using Pandas, you can load the file by
71
+
72
+ ```
73
+ pandas.read_csv('r52-raw.txt', header=None, sep='\t')
74
+ ```