Skip to content

Commit

Permalink
fix(linker): allow topics map to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Jan 28, 2024
1 parent dd32508 commit f1676ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sefaria/model/linker/named_entity_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self, lang: str, named_entity_types_to_topics: Dict[str, Dict[str,
named_entity_type: self.__generate_topic_list_from_spec(topic_spec)
for named_entity_type, topic_spec in named_entity_types_to_topics.items()
}
all_topics = reduce(lambda a, b: a + b, topics_by_type.values())
all_topics = reduce(lambda a, b: a + b, topics_by_type.values(), [])
self._slug_topic_map = {t.slug: t for t in all_topics}
self._title_slug_map_by_type = {
named_entity_type: self.__get_title_map_for_topics(topics_by_type[named_entity_type])
Expand Down

0 comments on commit f1676ab

Please sign in to comment.