Datasets:
fixed label
Browse files- earnings_call.py +4 -3
earnings_call.py
CHANGED
|
@@ -65,6 +65,7 @@ class EarningsCallDataset(datasets.GeneratorBasedBuilder):
|
|
| 65 |
DEFAULT_CONFIG_NAME = "transcript-sentiment"
|
| 66 |
|
| 67 |
def _info(self):
|
|
|
|
| 68 |
if self.config.name == "transcripts":
|
| 69 |
features = datasets.Features(
|
| 70 |
{
|
|
@@ -90,14 +91,13 @@ class EarningsCallDataset(datasets.GeneratorBasedBuilder):
|
|
| 90 |
features = datasets.Features(
|
| 91 |
{
|
| 92 |
"text": datasets.Value("string"),
|
| 93 |
-
"label": datasets.
|
| 94 |
-
names=["negative", "positive"]
|
| 95 |
-
),
|
| 96 |
"company": datasets.Value("string"),
|
| 97 |
"date": datasets.Value("date64"),
|
| 98 |
"para_no": datasets.Value("int32"),
|
| 99 |
}
|
| 100 |
)
|
|
|
|
| 101 |
else:
|
| 102 |
raise ValueError(f"Unknown config name: {self.config.name}")
|
| 103 |
|
|
@@ -107,6 +107,7 @@ class EarningsCallDataset(datasets.GeneratorBasedBuilder):
|
|
| 107 |
homepage=_HOMEPAGE,
|
| 108 |
license=_LICENSE,
|
| 109 |
features=features,
|
|
|
|
| 110 |
)
|
| 111 |
|
| 112 |
def _split_generators(self, dl_manager):
|
|
|
|
| 65 |
DEFAULT_CONFIG_NAME = "transcript-sentiment"
|
| 66 |
|
| 67 |
def _info(self):
|
| 68 |
+
supervised_keys = None
|
| 69 |
if self.config.name == "transcripts":
|
| 70 |
features = datasets.Features(
|
| 71 |
{
|
|
|
|
| 91 |
features = datasets.Features(
|
| 92 |
{
|
| 93 |
"text": datasets.Value("string"),
|
| 94 |
+
"label": datasets.Value("string"),
|
|
|
|
|
|
|
| 95 |
"company": datasets.Value("string"),
|
| 96 |
"date": datasets.Value("date64"),
|
| 97 |
"para_no": datasets.Value("int32"),
|
| 98 |
}
|
| 99 |
)
|
| 100 |
+
supervised_keys = ("text", "label")
|
| 101 |
else:
|
| 102 |
raise ValueError(f"Unknown config name: {self.config.name}")
|
| 103 |
|
|
|
|
| 107 |
homepage=_HOMEPAGE,
|
| 108 |
license=_LICENSE,
|
| 109 |
features=features,
|
| 110 |
+
supervised_keys=supervised_keys,
|
| 111 |
)
|
| 112 |
|
| 113 |
def _split_generators(self, dl_manager):
|