We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1befd93 + 4d55241 commit 072cda0Copy full SHA for 072cda0
famplex/load.py
@@ -51,7 +51,7 @@ def _construct_grounding_map(rows):
51
for row in rows:
52
text = row[0]
53
db_refs = {'TEXT': text}
54
- db_refs.update({ns: id_ for ns, id_ in zip(row[1::2], row[2::2])})
+ db_refs.update({ns: id_ for ns, id_ in zip(row[1::2], row[2::2]) if ns})
55
gmap[text] = db_refs if len(db_refs) > 1 else None
56
return gmap
57
famplex/tests/test_load.py
@@ -0,0 +1,8 @@
1
+from famplex.load import load_grounding_map
2
+
3
4
+def test_load_grounding_map():
5
+ gm = load_grounding_map()
6
+ for text, db_refs in gm.items():
7
+ assert db_refs['TEXT'] == text
8
+ assert '' not in db_refs
0 commit comments