Datasets:

Modalities:
Text
Formats:
parquet
Languages:
Catalan
DOI:
Libraries:
Datasets
pandas
License:
mmarimon commited on
Commit
20f137a
·
1 Parent(s): be56dea

Update caBreu.py

Browse files
Files changed (1) hide show
  1. caBreu.py +2 -2
caBreu.py CHANGED
@@ -100,8 +100,8 @@ class caBreu(datasets.GeneratorBasedBuilder):
100
  """This function returns the examples in the raw (text) form."""
101
  logger.info("generating examples from = %s", filepath)
102
  with open(filepath) as f:
103
- for id_, row in enumerate(f):
104
- article = json.loads(row)
105
  id_ = article['id']
106
  title = article['title']
107
  subtitle = article['subtitle']
 
100
  """This function returns the examples in the raw (text) form."""
101
  logger.info("generating examples from = %s", filepath)
102
  with open(filepath) as f:
103
+ data = json.load(f)
104
+ for article in data:
105
  id_ = article['id']
106
  title = article['title']
107
  subtitle = article['subtitle']