Update graphbase.py
This commit is contained in:
parent
04b5cac089
commit
3b65dee0e8
@ -172,7 +172,8 @@ class GraphDatabase:
|
|||||||
def read_triples(file_path):
|
def read_triples(file_path):
|
||||||
with open(file_path, 'r', encoding='utf-8') as file:
|
with open(file_path, 'r', encoding='utf-8') as file:
|
||||||
for line in file:
|
for line in file:
|
||||||
yield json.loads(line.strip())
|
if line.strip():
|
||||||
|
yield json.loads(line.strip())
|
||||||
|
|
||||||
triples = list(read_triples(file_path))
|
triples = list(read_triples(file_path))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user