nthngdy commited on
Commit
75f1e02
1 Parent(s): e236fee

Update ccnews_split.py

Browse files
Files changed (1) hide show
  1. ccnews_split.py +9 -1
ccnews_split.py CHANGED
@@ -154,6 +154,14 @@ class CCNews(datasets.GeneratorBasedBuilder):
154
  yield id_, doc_dict
155
  id_ += 1
156
  else:
157
- yield id_,
 
 
 
 
 
 
 
 
158
  id_ += 1
159
 
 
154
  yield id_, doc_dict
155
  id_ += 1
156
  else:
157
+ yield id_, {
158
+ "title": article["title"].strip() if article["title"] is not None else "",
159
+ "text": article["maintext"].strip() if article["maintext"] is not None else "",
160
+ "domain": article["source_domain"].strip() if article["source_domain"] is not None else "",
161
+ "date": article["date_publish"].strip() if article["date_publish"] is not None else "",
162
+ "description": article["description"].strip() if article["description"] is not None else "",
163
+ "url": article["url"].strip() if article["url"] is not None else "",
164
+ "image_url": article["image_url"].strip() if article["image_url"] is not None else "",
165
+ }
166
  id_ += 1
167