Skip to content

Commit d21b120

Browse files
committed
fix: if mappings are empty
1 parent 513970f commit d21b120

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

semantic_iot/RML_preprocess.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ def suggestion_condition_top_matches(self, n: int, mappings: List[tuple]) -> dic
410410
n: number of top matches to consider
411411
mappings: list of tuples (iri, score)
412412
"""
413+
if not mappings:
414+
return {}
413415
# sort the mappings by score
414416
mappings.sort(key=lambda x: x[1], reverse=True)
415417

0 commit comments

Comments
 (0)