Added JSONL open check

isaac
Pavan Mandava 5 years ago
parent 7d52d0629b
commit 3916df452f

@ -75,8 +75,9 @@ class DataReaderJsonLines:
This method opens the file, reads every line and returns a collection of lines This method opens the file, reads every line and returns a collection of lines
:return: collection of Citation Objects, with the required data :return: collection of Citation Objects, with the required data
""" """
for line in jsonlines.open(self.file_path): with jsonlines.open(self.file_path) as jl_reader:
yield read_json_line(line) for line in jl_reader:
yield read_json_line(line)
def read_json_line(line): def read_json_line(line):

Loading…
Cancel
Save