Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Languages:
Portuguese
Size:
1K - 10K
License:
fix-sourcea-generator
Browse files- aes_enem_dataset.py +2 -2
aes_enem_dataset.py
CHANGED
|
@@ -184,7 +184,7 @@ class AesEnemDataset(datasets.GeneratorBasedBuilder):
|
|
| 184 |
|
| 185 |
# We will remove the rows that match the criteria below
|
| 186 |
if any(
|
| 187 |
-
single_grade in grades
|
| 188 |
for single_grade in ["50", "100", "150", "0.5", "1.0", "1.5"]
|
| 189 |
):
|
| 190 |
return None
|
|
@@ -257,6 +257,7 @@ class AesEnemDataset(datasets.GeneratorBasedBuilder):
|
|
| 257 |
len(set(val_df["id_prompt"]).intersection(set(test_df["id_prompt"]))) == 0
|
| 258 |
), "Overlap between val and test id_prompt"
|
| 259 |
dirname = os.path.dirname(filepath)
|
|
|
|
| 260 |
train_df.to_csv(f"{dirname}/train.csv", index=False)
|
| 261 |
val_df.to_csv(f"{dirname}/validation.csv", index=False)
|
| 262 |
test_df.to_csv(f"{dirname}/test.csv", index=False)
|
|
@@ -481,7 +482,6 @@ class HTMLParser:
|
|
| 481 |
continue
|
| 482 |
prompt = os.path.join(full_path, prompt_folder)
|
| 483 |
prompt_essays = [name for name in os.listdir(prompt)]
|
| 484 |
-
prompt_essays = prompt_essays[:-1]
|
| 485 |
essay_year = HTMLParser._get_essay_year(
|
| 486 |
self.apply_soup(prompt, "Prompt.html")
|
| 487 |
)
|
|
|
|
| 184 |
|
| 185 |
# We will remove the rows that match the criteria below
|
| 186 |
if any(
|
| 187 |
+
single_grade in grades[:-1] #we ignore the sum, and only check the concetps
|
| 188 |
for single_grade in ["50", "100", "150", "0.5", "1.0", "1.5"]
|
| 189 |
):
|
| 190 |
return None
|
|
|
|
| 257 |
len(set(val_df["id_prompt"]).intersection(set(test_df["id_prompt"]))) == 0
|
| 258 |
), "Overlap between val and test id_prompt"
|
| 259 |
dirname = os.path.dirname(filepath)
|
| 260 |
+
import ipdb; ipdb.set_trace()
|
| 261 |
train_df.to_csv(f"{dirname}/train.csv", index=False)
|
| 262 |
val_df.to_csv(f"{dirname}/validation.csv", index=False)
|
| 263 |
test_df.to_csv(f"{dirname}/test.csv", index=False)
|
|
|
|
| 482 |
continue
|
| 483 |
prompt = os.path.join(full_path, prompt_folder)
|
| 484 |
prompt_essays = [name for name in os.listdir(prompt)]
|
|
|
|
| 485 |
essay_year = HTMLParser._get_essay_year(
|
| 486 |
self.apply_soup(prompt, "Prompt.html")
|
| 487 |
)
|