Commit dae050b4 authored by ingyuseong's avatar ingyuseong
Browse files

Modify the name of label 1

parent c07ebd4d
...@@ -20,7 +20,7 @@ _CITATION = """ ...@@ -20,7 +20,7 @@ _CITATION = """
def multilable_to_multiclass(label: list): def multilable_to_multiclass(label: list):
""" """
0 = 혐오 0 = 혐오
1 = 욕설 1 = 악플
2 = 양호 2 = 양호
""" """
assert type(label[0]) == int assert type(label[0]) == int
...@@ -59,7 +59,7 @@ class KorUnSmile(MultipleChoiceTask): ...@@ -59,7 +59,7 @@ class KorUnSmile(MultipleChoiceTask):
def _process_doc(self, doc): def _process_doc(self, doc):
out_doc = { out_doc = {
"title": doc["문장"], "title": doc["문장"],
"choices": ["혐오", "욕설", "양호"], "choices": ["혐오", "악플", "양호"],
"gold": multilable_to_multiclass(doc["labels"]) "gold": multilable_to_multiclass(doc["labels"])
} }
return out_doc return out_doc
...@@ -68,7 +68,7 @@ class KorUnSmile(MultipleChoiceTask): ...@@ -68,7 +68,7 @@ class KorUnSmile(MultipleChoiceTask):
return "{}".format(doc["title"]) return "{}".format(doc["title"])
def doc_to_target(self, doc): def doc_to_target(self, doc):
return " {}".format({0: "혐오", 1: "욕설", 2: "양호"}[doc["gold"]]) return " {}".format({0: "혐오", 1: "악플", 2: "양호"}[doc["gold"]])
def process_results(self, doc, results): def process_results(self, doc, results):
pred = np.argmax(results) pred = np.argmax(results)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment