cryptexcode commited on
Commit
350e002
·
1 Parent(s): 504bf9b

Update multiconer_v2.py

Browse files
Files changed (1) hide show
  1. multiconer_v2.py +1 -55
multiconer_v2.py CHANGED
@@ -46,63 +46,8 @@ For more details see https://multiconer.github.io/
46
  * Shervin Malmasi, Anjie Fang, Besnik Fetahu, Sudipta Kar, Oleg Rokhlenko. 2022. SemEval-2022 Task 11: Multilingual Complex Named Entity Recognition (MultiCoNER).
47
 
48
  """
49
-
50
  _URL = "https://huggingface.co/datasets/MultiCoNER/multiconer_v2/raw/main"
51
 
52
- _BN_TRAINING_FILE = "BN-Bangla/bn_train.conll"
53
- _BN_DEV_FILE = "BN-Bangla/bn_dev.conll"
54
- _BN_TEST_FILE = "BN-Bangla/bn_test.conll"
55
-
56
- _DE_TRAINING_FILE = "DE-German/de_train.conll"
57
- _DE_DEV_FILE = "DE-German/de_dev.conll"
58
- _DE_TEST_FILE = "DE-German/de_test.conll"
59
-
60
- _EN_TRAINING_FILE = "EN-English/en_train.conll"
61
- _EN_DEV_FILE = "EN-English/en_dev.conll"
62
- _EN_TEST_FILE = "EN-English/en_test.conll"
63
-
64
- _ES_TRAINING_FILE = "ES-Spanish/es_train.conll"
65
- _ES_DEV_FILE = "ES-Spanish/es_dev.conll"
66
- _ES_TEST_FILE = "ES-Spanish/es_test.conll"
67
-
68
- _FA_TRAINING_FILE = "FA-Farsi/fa_train.conll"
69
- _FA_DEV_FILE = "FA-Farsi/fa_dev.conll"
70
- _FA_TEST_FILE = "FA-Farsi/fa_test.conll"
71
-
72
- _FR_TRAINING_FILE = "FR-French/fr_train.conll"
73
- _FR_DEV_FILE = "FR-French/fr_dev.conll"
74
- _FR_TEST_FILE = "FR-French/fr_test.conll"
75
-
76
- _HI_TRAINING_FILE = "HI-Hindi/hi_train.conll"
77
- _HI_DEV_FILE = "HI-Hindi/hi_dev.conll"
78
- _HI_TEST_FILE = "HI-Hindi/hi_test.conll"
79
-
80
- _IT_TRAINING_FILE = "IT-Italian/it_train.conll"
81
- _IT_DEV_FILE = "IT-Italian/it_dev.conll"
82
- _IT_TEST_FILE = "IT-Italian/it_test.conll"
83
-
84
- _MULTI_TRAINING_FILE = "MULTI-Multilingual/multi_train.conll"
85
- _MULTI_DEV_FILE = "MULTI-Multilingual/multi_dev.conll"
86
- _MULTI_TEST_FILE = "MULTI-Multilingual/multi_test.conll"
87
-
88
- _PT_TRAINING_FILE = "PT-Portuguese/pt_train.conll"
89
- _PT_DEV_FILE = "PT-Portuguese/pt_dev.conll"
90
- _PT_TEST_FILE = "PT-Portuguese/pt_test.conll"
91
-
92
- _SV_TRAINING_FILE = "SV-Swedish/sv_train.conll"
93
- _SV_DEV_FILE = "SV-Swedish/sv_dev.conll"
94
- _SV_TEST_FILE = "SV-Swedish/sv_test.conll"
95
-
96
- _UK_TRAINING_FILE = "UK-Ukrainian/uk_train.conll"
97
- _UK_DEV_FILE = "UK-Ukrainian/uk_dev.conll"
98
- _UK_TEST_FILE = "UK-Ukrainian/uk_test.conll"
99
-
100
- _ZH_TRAINING_FILE = "ZH-Chinese/zh_train.conll"
101
- _ZH_DEV_FILE = "ZH-Chinese/zh_dev.conll"
102
- _ZH_TEST_FILE = "ZH-Chinese/zh_test.conll"
103
-
104
- # label_vs_code_map[self.config.name].upper()-{code_vs_lang_map[label_vs_code_map[self.config.name]]}/{code_vs_lang_map[label_vs_code_map[self.config.name]]}_train.conll
105
-
106
  code_vs_lang_map = {"en": "English",
107
  "es": "Spanish",
108
  "pt": "Portuguese",
@@ -183,6 +128,7 @@ class MultiCoNER2(datasets.GeneratorBasedBuilder):
183
  "id": datasets.Value("string"),
184
  "sample_id": datasets.Value("string"),
185
  "tokens": datasets.Sequence(datasets.Value("string")),
 
186
  "ner_tags": datasets.Sequence(
187
  datasets.features.ClassLabel(
188
  names=[
 
46
  * Shervin Malmasi, Anjie Fang, Besnik Fetahu, Sudipta Kar, Oleg Rokhlenko. 2022. SemEval-2022 Task 11: Multilingual Complex Named Entity Recognition (MultiCoNER).
47
 
48
  """
 
49
  _URL = "https://huggingface.co/datasets/MultiCoNER/multiconer_v2/raw/main"
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  code_vs_lang_map = {"en": "English",
52
  "es": "Spanish",
53
  "pt": "Portuguese",
 
128
  "id": datasets.Value("string"),
129
  "sample_id": datasets.Value("string"),
130
  "tokens": datasets.Sequence(datasets.Value("string")),
131
+ "ner_tags_index": datasets.Sequence(datasets.Value("string")),
132
  "ner_tags": datasets.Sequence(
133
  datasets.features.ClassLabel(
134
  names=[