Skip to content

Commit 837d595

Browse files
author
steppi
committed
Fix load_grounding_map (empty keys in db_refs dicts)
1 parent 1befd93 commit 837d595

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

famplex/load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _construct_grounding_map(rows):
5151
for row in rows:
5252
text = row[0]
5353
db_refs = {'TEXT': text}
54-
db_refs.update({ns: id_ for ns, id_ in zip(row[1::2], row[2::2])})
54+
db_refs.update({ns: id_ for ns, id_ in zip(row[1::2], row[2::2]) if ns})
5555
gmap[text] = db_refs if len(db_refs) > 1 else None
5656
return gmap
5757

0 commit comments

Comments
 (0)