Skip to content

Commit

Permalink
Update recognizer_registry.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rgupta2508 authored Feb 5, 2025
1 parent a06ebb3 commit 0b59b40
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ def get_recognizers(
elif type(rec.supported_entities) == str:
self.add_recognizer_map(all_entity_recognizers, supported_entity, rec)
for entity in entities:
if entity in all_entity_recognizers:
to_return.update(all_entity_recognizers[entity])
else:
if entity not in all_entity_recognizers:
logger.warning(
"Entity %s doesn't have the corresponding"
" recognizer in language : %s",
entity,
language,
)
else:
to_return.update(all_entity_recognizers[entity])
logger.debug(
"Returning a total of %s recognizers",
str(len(to_return)),
Expand Down

0 comments on commit 0b59b40

Please sign in to comment.