yes-man-today commited on
Commit
bf92d2d
1 Parent(s): 95610fd

giving default values

Browse files
Files changed (1) hide show
  1. regulatory_comments.py +16 -15
regulatory_comments.py CHANGED
@@ -90,21 +90,22 @@ class RegComments(datasets.GeneratorBasedBuilder):
90
  docket_id = docket["id"]
91
  docket_title = docket["title"]
92
  docket_context = docket["context"]
93
- #docket_purpose = docket["purpose"]
94
- docket_keywords = docket["keywords"]
95
- comments = []
96
- for comment in docket["comments"]:
97
- comment_data = {
98
- "text": comment["text"],
99
- "comment_id": comment["comment_id"],
100
- "comment_url": comment["comment_url"],
101
- "comment_date": comment["comment_date"],
102
- "comment_title": comment["comment_title"],
103
- "commenter_fname": comment["commenter_fname"],
104
- "commenter_lname": comment["commenter_lname"],
105
- "comment_length": comment["comment_length"]
106
- }
107
- comments.append(comment_data)
 
108
 
109
  yield key, {
110
  "id": docket_id,
 
90
  docket_id = docket["id"]
91
  docket_title = docket["title"]
92
  docket_context = docket["context"]
93
+ print("did access")
94
+ docket_purpose = docket.get("purpose", "unspecified")
95
+ docket_keywords = docket.get("keywords", [])
96
+ comments = docket["comments"]
97
+ # for comment in docket["comments"]:
98
+ # comment_data = {
99
+ # "text": comment["text"],
100
+ # "comment_id": comment["comment_id"],
101
+ # "comment_url": comment["comment_url"],
102
+ # "comment_date": comment["comment_date"],
103
+ # "comment_title": comment["comment_title"],
104
+ # "commenter_fname": comment["commenter_fname"],
105
+ # "commenter_lname": comment["commenter_lname"],
106
+ # "comment_length": comment["comment_length"]
107
+ # }
108
+ # comments.append(comment_data)
109
 
110
  yield key, {
111
  "id": docket_id,