Datasets:
Update emotion_chinese_english.py
Browse files
emotion_chinese_english.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
-
# Version
|
16 |
"""emotion_chinese_english dataset: A multilingual emotion dataset of wilde's children's literature"""
|
17 |
|
18 |
|
@@ -33,7 +33,7 @@ _URLS = {
|
|
33 |
"test": f"https://raw.githubusercontent.com/nana-lyj/emotion_chinese_english/main/data/test.tsv",
|
34 |
}
|
35 |
|
36 |
-
_LABEL_MAPPING = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4
|
37 |
|
38 |
|
39 |
class emotionchineseenglish(datasets.GeneratorBasedBuilder):
|
@@ -48,7 +48,7 @@ class emotionchineseenglish(datasets.GeneratorBasedBuilder):
|
|
48 |
{
|
49 |
"id": datasets.Value("int32"),
|
50 |
"sentence": datasets.Value("string"),
|
51 |
-
"label": datasets.ClassLabel(names=["joy", "sadness", "anger", "fear", "
|
52 |
}
|
53 |
),
|
54 |
supervised_keys=None,
|
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
+
# Version 10-0.
|
16 |
"""emotion_chinese_english dataset: A multilingual emotion dataset of wilde's children's literature"""
|
17 |
|
18 |
|
|
|
33 |
"test": f"https://raw.githubusercontent.com/nana-lyj/emotion_chinese_english/main/data/test.tsv",
|
34 |
}
|
35 |
|
36 |
+
_LABEL_MAPPING = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4}
|
37 |
|
38 |
|
39 |
class emotionchineseenglish(datasets.GeneratorBasedBuilder):
|
|
|
48 |
{
|
49 |
"id": datasets.Value("int32"),
|
50 |
"sentence": datasets.Value("string"),
|
51 |
+
"label": datasets.ClassLabel(names=["joy", "sadness", "anger", "fear", "love",]),
|
52 |
}
|
53 |
),
|
54 |
supervised_keys=None,
|