fernando-peres
commited on
Commit
·
147918c
1
Parent(s):
31d7ac0
resolving card bugs
Browse files- py_legislation.py +4 -4
py_legislation.py
CHANGED
|
@@ -122,7 +122,7 @@ _metadata = {
|
|
| 122 |
# [>] URLS:
|
| 123 |
|
| 124 |
"urls": {
|
| 125 |
-
"raw_text": "./raw_text/train.parquet"
|
| 126 |
# "unlabeled_sentences": "./unlabeled_sentences/train.parquet",
|
| 127 |
# "labeled_sentences_train": "./labeled_sentences/train.parquet",
|
| 128 |
# "labeled_sentences_test": "./labeled_sentences/test.parquet",
|
|
@@ -345,11 +345,11 @@ class PYLegislation(datasets.GeneratorBasedBuilder):
|
|
| 345 |
Obs: method parameters are unpacked from `gen_kwargs` as given in `_split_generators`.
|
| 346 |
"""
|
| 347 |
# Ensure that the filepath is an absolute local file path
|
| 348 |
-
filepath = os.path.abspath(filepath)
|
| 349 |
|
| 350 |
# Check if the file exists
|
| 351 |
-
if not os.path.exists(filepath):
|
| 352 |
-
|
| 353 |
|
| 354 |
pq_table = pq.read_table(filepath)
|
| 355 |
for i in range(len(pq_table)):
|
|
|
|
| 122 |
# [>] URLS:
|
| 123 |
|
| 124 |
"urls": {
|
| 125 |
+
"raw_text": "./raw_text/train.parquet" # ,
|
| 126 |
# "unlabeled_sentences": "./unlabeled_sentences/train.parquet",
|
| 127 |
# "labeled_sentences_train": "./labeled_sentences/train.parquet",
|
| 128 |
# "labeled_sentences_test": "./labeled_sentences/test.parquet",
|
|
|
|
| 345 |
Obs: method parameters are unpacked from `gen_kwargs` as given in `_split_generators`.
|
| 346 |
"""
|
| 347 |
# Ensure that the filepath is an absolute local file path
|
| 348 |
+
# filepath = os.path.abspath(filepath)
|
| 349 |
|
| 350 |
# Check if the file exists
|
| 351 |
+
# if not os.path.exists(filepath):
|
| 352 |
+
# raise FileNotFoundError(f"File not found: {filepath}")
|
| 353 |
|
| 354 |
pq_table = pq.read_table(filepath)
|
| 355 |
for i in range(len(pq_table)):
|