system HF staff commited on
Commit
a5bd49c
1 Parent(s): a7f79c1

Update files from the datasets library (from 1.6.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.6.0

Files changed (2) hide show
  1. README.md +20 -1
  2. silicone.py +7 -9
README.md CHANGED
@@ -10,7 +10,26 @@ licenses:
10
  multilinguality:
11
  - monolingual
12
  size_categories:
13
- - 10K<n<100K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  source_datasets:
15
  - original
16
  task_categories:
 
10
  multilinguality:
11
  - monolingual
12
  size_categories:
13
+ dyda_da:
14
+ - 100K<n<1M
15
+ dyda_e:
16
+ - 100K<n<1M
17
+ iemocap:
18
+ - 10K<n<100K
19
+ maptask:
20
+ - 10K<n<100K
21
+ meld_e:
22
+ - 10K<n<100K
23
+ meld_s:
24
+ - 10K<n<100K
25
+ mrda:
26
+ - 100K<n<1M
27
+ oasis:
28
+ - 10K<n<100K
29
+ sem:
30
+ - 1K<n<10K
31
+ swda:
32
+ - 100K<n<1M
33
  source_datasets:
34
  - original
35
  task_categories:
silicone.py CHANGED
@@ -16,12 +16,10 @@
16
  # Lint as: python3
17
  """The Sequence labellIng evaLuatIon benChmark fOr spoken laNguagE (SILICONE) benchmark."""
18
 
19
- from __future__ import absolute_import, division, print_function
20
 
21
  import textwrap
22
 
23
  import pandas as pd
24
- import six
25
 
26
  import datasets
27
 
@@ -256,7 +254,7 @@ class Silicone(datasets.GeneratorBasedBuilder):
256
  "Utterance": "Utterance",
257
  "Emotion": "Emotion",
258
  },
259
- label_classes=list(six.iterkeys(IEMOCAP_E_DESCRIPTION)),
260
  label_column="Emotion",
261
  data_url={
262
  "train": _URL + "/iemocap/train.csv",
@@ -403,7 +401,7 @@ class Silicone(datasets.GeneratorBasedBuilder):
403
  "Dialogue_ID": "Dialogue_ID",
404
  "Utterance": "Utterance",
405
  },
406
- label_classes=list(six.iterkeys(MRDA_DA_DESCRIPTION)),
407
  label_column="Dialogue_Act",
408
  data_url={
409
  "train": _URL + "/mrda/train.csv",
@@ -556,7 +554,7 @@ class Silicone(datasets.GeneratorBasedBuilder):
556
  "Dialogue_ID": "Dialogue_ID",
557
  "Conv_ID": "Conv_ID",
558
  },
559
- label_classes=list(six.iterkeys(SWDA_DA_DESCRIPTION)),
560
  label_column="Dialogue_Act",
561
  data_url={
562
  "train": _URL + "/swda/train.csv",
@@ -583,7 +581,7 @@ class Silicone(datasets.GeneratorBasedBuilder):
583
  ]
584
 
585
  def _info(self):
586
- features = {text_feature: datasets.Value("string") for text_feature in six.iterkeys(self.config.text_features)}
587
  if self.config.label_classes:
588
  features["Label"] = datasets.features.ClassLabel(names=self.config.label_classes)
589
  features["Idx"] = datasets.Value("int32")
@@ -629,7 +627,7 @@ class Silicone(datasets.GeneratorBasedBuilder):
629
  def _generate_examples(self, data_file, split):
630
  if self.config.name not in ("maptask", "iemocap", "oasis"):
631
  df = pd.read_csv(data_file, delimiter=",", header=0, quotechar='"', dtype=str)[
632
- six.iterkeys(self.config.text_features)
633
  ]
634
 
635
  if self.config.name == "iemocap":
@@ -640,11 +638,11 @@ class Silicone(datasets.GeneratorBasedBuilder):
640
  quotechar='"',
641
  names=["Dialogue_ID", "Utterance_ID", "Utterance", "Emotion", "Valence", "Activation", "Dominance"],
642
  dtype=str,
643
- )[six.iterkeys(self.config.text_features)]
644
 
645
  if self.config.name in ("maptask", "oasis"):
646
  df = pd.read_csv(data_file, delimiter="|", names=["Speaker", "Utterance", "Dialogue_Act"], dtype=str)[
647
- six.iterkeys(self.config.text_features)
648
  ]
649
 
650
  rows = df.to_dict(orient="records")
 
16
  # Lint as: python3
17
  """The Sequence labellIng evaLuatIon benChmark fOr spoken laNguagE (SILICONE) benchmark."""
18
 
 
19
 
20
  import textwrap
21
 
22
  import pandas as pd
 
23
 
24
  import datasets
25
 
 
254
  "Utterance": "Utterance",
255
  "Emotion": "Emotion",
256
  },
257
+ label_classes=list(IEMOCAP_E_DESCRIPTION.keys()),
258
  label_column="Emotion",
259
  data_url={
260
  "train": _URL + "/iemocap/train.csv",
 
401
  "Dialogue_ID": "Dialogue_ID",
402
  "Utterance": "Utterance",
403
  },
404
+ label_classes=list(MRDA_DA_DESCRIPTION.keys()),
405
  label_column="Dialogue_Act",
406
  data_url={
407
  "train": _URL + "/mrda/train.csv",
 
554
  "Dialogue_ID": "Dialogue_ID",
555
  "Conv_ID": "Conv_ID",
556
  },
557
+ label_classes=list(SWDA_DA_DESCRIPTION.keys()),
558
  label_column="Dialogue_Act",
559
  data_url={
560
  "train": _URL + "/swda/train.csv",
 
581
  ]
582
 
583
  def _info(self):
584
+ features = {text_feature: datasets.Value("string") for text_feature in self.config.text_features.keys()}
585
  if self.config.label_classes:
586
  features["Label"] = datasets.features.ClassLabel(names=self.config.label_classes)
587
  features["Idx"] = datasets.Value("int32")
 
627
  def _generate_examples(self, data_file, split):
628
  if self.config.name not in ("maptask", "iemocap", "oasis"):
629
  df = pd.read_csv(data_file, delimiter=",", header=0, quotechar='"', dtype=str)[
630
+ self.config.text_features.keys()
631
  ]
632
 
633
  if self.config.name == "iemocap":
 
638
  quotechar='"',
639
  names=["Dialogue_ID", "Utterance_ID", "Utterance", "Emotion", "Valence", "Activation", "Dominance"],
640
  dtype=str,
641
+ )[self.config.text_features.keys()]
642
 
643
  if self.config.name in ("maptask", "oasis"):
644
  df = pd.read_csv(data_file, delimiter="|", names=["Speaker", "Utterance", "Dialogue_Act"], dtype=str)[
645
+ self.config.text_features.keys()
646
  ]
647
 
648
  rows = df.to_dict(orient="records")