asahi417 commited on
Commit
cbb7290
1 Parent(s): 71ae9c6

Update multinerd.py

Browse files
Files changed (1) hide show
  1. multinerd.py +17 -22
multinerd.py CHANGED
@@ -4,26 +4,23 @@ from itertools import chain
4
  import datasets
5
 
6
  logger = datasets.logging.get_logger(__name__)
7
- _DESCRIPTION = """[wikineural](https://aclanthology.org/2021.findings-emnlp.215/)"""
8
- _NAME = "wikineural"
9
  _VERSION = "1.0.0"
10
  _CITATION = """
11
- @inproceedings{tedeschi-etal-2021-wikineural-combined,
12
- title = "{W}iki{NE}u{R}al: {C}ombined Neural and Knowledge-based Silver Data Creation for Multilingual {NER}",
13
  author = "Tedeschi, Simone and
14
- Maiorca, Valentino and
15
- Campolungo, Niccol{\`o} and
16
- Cecconi, Francesco and
17
  Navigli, Roberto",
18
- booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021",
19
- month = nov,
20
- year = "2021",
21
- address = "Punta Cana, Dominican Republic",
22
  publisher = "Association for Computational Linguistics",
23
- url = "https://aclanthology.org/2021.findings-emnlp.215",
24
- doi = "10.18653/v1/2021.findings-emnlp.215",
25
- pages = "2521--2533",
26
- abstract = "Multilingual Named Entity Recognition (NER) is a key intermediate task which is needed in many areas of NLP. In this paper, we address the well-known issue of data scarcity in NER, especially relevant when moving to a multilingual scenario, and go beyond current approaches to the creation of multilingual silver data for the task. We exploit the texts of Wikipedia and introduce a new methodology based on the effective combination of knowledge-based approaches and neural models, together with a novel domain adaptation technique, to produce high-quality training corpora for NER. We evaluate our datasets extensively on standard benchmarks for NER, yielding substantial improvements up to 6 span-based F1-score points over previous state-of-the-art systems for data creation.",
27
  }
28
  """
29
 
@@ -32,14 +29,12 @@ _URL = f'https://huggingface.co/datasets/tner/{_NAME}/resolve/main/dataset'
32
  _LANGUAGE = ['de', 'en', 'es', 'fr', 'it', 'nl', 'pl', 'pt', 'ru']
33
  _URLS = {
34
  l: {
35
- str(datasets.Split.TEST): [f'{_URL}/{l}/test.jsonl'],
36
- str(datasets.Split.TRAIN): [f'{_URL}/{l}/train.jsonl'],
37
- str(datasets.Split.VALIDATION): [f'{_URL}/{l}/dev.jsonl']
38
  } for l in _LANGUAGE
39
  }
40
 
41
 
42
- class WikiNeuralConfig(datasets.BuilderConfig):
43
  """BuilderConfig"""
44
 
45
  def __init__(self, **kwargs):
@@ -48,14 +43,14 @@ class WikiNeuralConfig(datasets.BuilderConfig):
48
  Args:
49
  **kwargs: keyword arguments forwarded to super.
50
  """
51
- super(WikiNeuralConfig, self).__init__(**kwargs)
52
 
53
 
54
- class WikiNeural(datasets.GeneratorBasedBuilder):
55
  """Dataset."""
56
 
57
  BUILDER_CONFIGS = [
58
- WikiNeuralConfig(name=l, version=datasets.Version(_VERSION), description=f"{_DESCRIPTION} (language: {l})") for l in _LANGUAGE
59
  ]
60
 
61
  def _split_generators(self, dl_manager):
 
4
  import datasets
5
 
6
  logger = datasets.logging.get_logger(__name__)
7
+ _DESCRIPTION = """[MultiNERD](https://aclanthology.org/2022.findings-naacl.60/)"""
8
+ _NAME = "multinerd"
9
  _VERSION = "1.0.0"
10
  _CITATION = """
11
+ @inproceedings{tedeschi-navigli-2022-multinerd,
12
+ title = "{M}ulti{NERD}: A Multilingual, Multi-Genre and Fine-Grained Dataset for Named Entity Recognition (and Disambiguation)",
13
  author = "Tedeschi, Simone and
 
 
 
14
  Navigli, Roberto",
15
+ booktitle = "Findings of the Association for Computational Linguistics: NAACL 2022",
16
+ month = jul,
17
+ year = "2022",
18
+ address = "Seattle, United States",
19
  publisher = "Association for Computational Linguistics",
20
+ url = "https://aclanthology.org/2022.findings-naacl.60",
21
+ doi = "10.18653/v1/2022.findings-naacl.60",
22
+ pages = "801--812",
23
+ abstract = "Named Entity Recognition (NER) is the task of identifying named entities in texts and classifying them through specific semantic categories, a process which is crucial for a wide range of NLP applications. Current datasets for NER focus mainly on coarse-grained entity types, tend to consider a single textual genre and to cover a narrow set of languages, thus limiting the general applicability of NER systems.In this work, we design a new methodology for automatically producing NER annotations, and address the aforementioned limitations by introducing a novel dataset that covers 10 languages, 15 NER categories and 2 textual genres.We also introduce a manually-annotated test set, and extensively evaluate the quality of our novel dataset on both this new test set and standard benchmarks for NER.In addition, in our dataset, we include: i) disambiguation information to enable the development of multilingual entity linking systems, and ii) image URLs to encourage the creation of multimodal systems.We release our dataset at https://github.com/Babelscape/multinerd.",
24
  }
25
  """
26
 
 
29
  _LANGUAGE = ['de', 'en', 'es', 'fr', 'it', 'nl', 'pl', 'pt', 'ru']
30
  _URLS = {
31
  l: {
32
+ str(datasets.Split.TEST): [f'{_URL}/{l}.jsonl'],
 
 
33
  } for l in _LANGUAGE
34
  }
35
 
36
 
37
+ class MultiNERDConfig(datasets.BuilderConfig):
38
  """BuilderConfig"""
39
 
40
  def __init__(self, **kwargs):
 
43
  Args:
44
  **kwargs: keyword arguments forwarded to super.
45
  """
46
+ super(MultiNERDConfig, self).__init__(**kwargs)
47
 
48
 
49
+ class MultiNERD(datasets.GeneratorBasedBuilder):
50
  """Dataset."""
51
 
52
  BUILDER_CONFIGS = [
53
+ MultiNERDConfig(name=l, version=datasets.Version(_VERSION), description=f"{_DESCRIPTION} (language: {l})") for l in _LANGUAGE
54
  ]
55
 
56
  def _split_generators(self, dl_manager):