Datasets:

Languages:
Japanese
License:
Kosuke-Yamada commited on
Commit
590153c
·
1 Parent(s): 65eb960

go back to the start

Browse files
Files changed (1) hide show
  1. llm-jp-eval.py +22 -22
llm-jp-eval.py CHANGED
@@ -41,6 +41,7 @@ class LlmJpEvalConfig(datasets.BuilderConfig):
41
  data_dir: str | None = None,
42
  data_files: datasets.data_files.DataFilesDict | None = None,
43
  description: str | None = _DESCRIPTION,
 
44
  ) -> None:
45
  super().__init__(
46
  name=name,
@@ -49,31 +50,30 @@ class LlmJpEvalConfig(datasets.BuilderConfig):
49
  data_files=data_files,
50
  description=description,
51
  )
 
52
 
53
 
54
  class LlmJpEval(datasets.GeneratorBasedBuilder):
55
 
56
- BUILDER_CONFIG = LlmJpEvalConfig(name="jamp")
57
-
58
- # BUILDER_CONFIGS = [
59
- # LlmJpEvalConfig(name="jamp"),
60
- # LlmJpEvalConfig(name="janli"),
61
- # LlmJpEvalConfig(name="jnli"),
62
- # LlmJpEvalConfig(name="jsem"),
63
- # LlmJpEvalConfig(name="jsick"),
64
- # LlmJpEvalConfig(name="jemhopqa"),
65
- # LlmJpEvalConfig(name="niilc"),
66
- # LlmJpEvalConfig(name="jsquad"),
67
- # LlmJpEvalConfig(name="jcommonsenseqa"),
68
- # LlmJpEvalConfig(name="chabsa"),
69
- # LlmJpEvalConfig(name="wiki_reading"),
70
- # LlmJpEvalConfig(name="wiki_ner"),
71
- # LlmJpEvalConfig(name="wiki_dependency"),
72
- # LlmJpEvalConfig(name="wiki_pas"),
73
- # LlmJpEvalConfig(name="wiki_coreference"),
74
- # LlmJpEvalConfig(name="mawps"),
75
- # LlmJpEvalConfig(name="jsts"),
76
- # ]
77
 
78
  def _info(self) -> datasets.DatasetInfo:
79
  return datasets.DatasetInfo(
@@ -92,6 +92,7 @@ class LlmJpEval(datasets.GeneratorBasedBuilder):
92
  def _split_generators(
93
  self, dl_manager: datasets.DownloadManager
94
  ) -> list[datasets.SplitGenerator]:
 
95
  version_name = self.config.version.version_str
96
  dataset_name = self.config.name
97
 
@@ -130,7 +131,6 @@ class LlmJpEval(datasets.GeneratorBasedBuilder):
130
  elif dataset_name == "jsts":
131
  processor = JSTSDatasetProcessor
132
 
133
- output_dir = Path("./data_llm-jp-eval")
134
  processor(output_dir, version_name).pipeline()
135
 
136
  eval_dir = output_dir / version_name / "evaluation"
 
41
  data_dir: str | None = None,
42
  data_files: datasets.data_files.DataFilesDict | None = None,
43
  description: str | None = _DESCRIPTION,
44
+ output_dir: str = "./data_llm-jp-eval",
45
  ) -> None:
46
  super().__init__(
47
  name=name,
 
50
  data_files=data_files,
51
  description=description,
52
  )
53
+ self.output_dir = output_dir
54
 
55
 
56
  class LlmJpEval(datasets.GeneratorBasedBuilder):
57
 
58
+ BUILDER_CONFIGS = [
59
+ LlmJpEvalConfig(name="jamp"),
60
+ LlmJpEvalConfig(name="janli"),
61
+ LlmJpEvalConfig(name="jnli"),
62
+ LlmJpEvalConfig(name="jsem"),
63
+ LlmJpEvalConfig(name="jsick"),
64
+ LlmJpEvalConfig(name="jemhopqa"),
65
+ LlmJpEvalConfig(name="niilc"),
66
+ LlmJpEvalConfig(name="jsquad"),
67
+ LlmJpEvalConfig(name="jcommonsenseqa"),
68
+ LlmJpEvalConfig(name="chabsa"),
69
+ LlmJpEvalConfig(name="wiki_reading"),
70
+ LlmJpEvalConfig(name="wiki_ner"),
71
+ LlmJpEvalConfig(name="wiki_dependency"),
72
+ LlmJpEvalConfig(name="wiki_pas"),
73
+ LlmJpEvalConfig(name="wiki_coreference"),
74
+ LlmJpEvalConfig(name="mawps"),
75
+ LlmJpEvalConfig(name="jsts"),
76
+ ]
 
 
77
 
78
  def _info(self) -> datasets.DatasetInfo:
79
  return datasets.DatasetInfo(
 
92
  def _split_generators(
93
  self, dl_manager: datasets.DownloadManager
94
  ) -> list[datasets.SplitGenerator]:
95
+ output_dir = Path(self.config.output_dir)
96
  version_name = self.config.version.version_str
97
  dataset_name = self.config.name
98
 
 
131
  elif dataset_name == "jsts":
132
  processor = JSTSDatasetProcessor
133
 
 
134
  processor(output_dir, version_name).pipeline()
135
 
136
  eval_dir = output_dir / version_name / "evaluation"