Vadim Alperovich commited on
Commit
bb2464c
1 Parent(s): 9188868

Update QC.py

Browse files
Files changed (1) hide show
  1. QC.py +47 -39
QC.py CHANGED
@@ -19,48 +19,56 @@ _TRAIN_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/QC/raw/main/
19
  _TEST_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/QC/raw/main/test.csv"
20
 
21
 
22
- CATEGORY_MAPPING = {'LOC_city': 0,
23
- 'HUM_desc': 1,
24
- 'DESC_def': 2,
25
- 'NUM_date': 3,
26
- 'NUM_dist': 4,
27
  'HUM_gr': 5,
28
- 'ENTY_plant': 6,
29
- 'DESC_reason': 7,
30
- 'HUM_ind': 8,
31
- 'NUM_weight': 9,
32
- 'NUM_other': 10,
33
- 'ENTY_substance': 11,
34
- 'LOC_other': 12,
35
- 'NUM_speed': 13,
36
- 'LOC_mount': 14,
37
- 'NUM_temp': 15,
38
- 'NUM_period': 16,
39
- 'NUM_count': 17,
40
- 'ENTY_animal': 18,
41
- 'DESC_desc': 19,
42
- 'ENTY_food': 20,
43
- 'LOC_state': 21,
44
- 'ENTY_termeq': 22,
45
- 'NUM_money': 23,
46
- 'ENTY_currency': 24,
47
- 'LOC_country': 25,
48
- 'ENTY_event': 26,
49
- 'ENTY_other': 27,
50
- 'DESC_manner': 28,
51
- 'ENTY_color': 29,
52
- 'ENTY_product': 30,
53
- 'HUM_title': 31,
54
- 'ENTY_body': 32,
55
- 'ENTY_veh': 33,
56
- 'ENTY_lang': 34,
57
  'ENTY_instru': 35,
58
  'ABBR_abb': 36,
59
- 'ABBR_exp': 37,
60
- 'ENTY_dismed': 38,
61
- 'NUM_perc': 39,
62
- 'ENTY_sport': 40,
63
- 'ENTY_techmeth': 41}
 
 
 
 
 
 
 
 
64
 
65
  class AGNews(datasets.GeneratorBasedBuilder):
66
  """AG News topic classification dataset."""
 
19
  _TEST_DOWNLOAD_URL = "https://huggingface.co/datasets/vmalperovich/QC/raw/main/test.csv"
20
 
21
 
22
+ CATEGORY_MAPPING = {'ENTY_cremat': 0,
23
+ 'DESC_manner': 1,
24
+ 'ENTY_animal': 2,
25
+ 'ABBR_exp': 3,
26
+ 'HUM_ind': 4,
27
  'HUM_gr': 5,
28
+ 'HUM_title': 6,
29
+ 'DESC_def': 7,
30
+ 'NUM_date': 8,
31
+ 'DESC_reason': 9,
32
+ 'ENTY_event': 10,
33
+ 'LOC_state': 11,
34
+ 'DESC_desc': 12,
35
+ 'NUM_count': 13,
36
+ 'ENTY_other': 14,
37
+ 'ENTY_letter': 15,
38
+ 'LOC_other': 16,
39
+ 'ENTY_religion': 17,
40
+ 'ENTY_food': 18,
41
+ 'LOC_country': 19,
42
+ 'ENTY_color': 20,
43
+ 'ENTY_termeq': 21,
44
+ 'LOC_city': 22,
45
+ 'ENTY_body': 23,
46
+ 'ENTY_dismed': 24,
47
+ 'LOC_mount': 25,
48
+ 'NUM_money': 26,
49
+ 'ENTY_product': 27,
50
+ 'NUM_period': 28,
51
+ 'ENTY_substance': 29,
52
+ 'ENTY_sport': 30,
53
+ 'ENTY_plant': 31,
54
+ 'ENTY_techmeth': 32,
55
+ 'NUM_volsize': 33,
56
+ 'HUM_desc': 34,
57
  'ENTY_instru': 35,
58
  'ABBR_abb': 36,
59
+ 'NUM_other': 37,
60
+ 'NUM_speed': 38,
61
+ 'ENTY_word': 39,
62
+ 'ENTY_lang': 40,
63
+ 'NUM_perc': 41,
64
+ 'NUM_code': 42,
65
+ 'NUM_dist': 43,
66
+ 'NUM_temp': 44,
67
+ 'ENTY_symbol': 45,
68
+ 'NUM_ord': 46,
69
+ 'ENTY_veh': 47,
70
+ 'NUM_weight': 48,
71
+ 'ENTY_currency': 49}
72
 
73
  class AGNews(datasets.GeneratorBasedBuilder):
74
  """AG News topic classification dataset."""