Skip to content

Commit

Permalink
add missing logic to support multiple languages
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhengwu2021 committed Sep 6, 2024
1 parent e55300a commit e0e0c4f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ def add_recognizer(self, recognizer: EntityRecognizer) -> None:
if not isinstance(recognizer, EntityRecognizer):
raise ValueError("Input is not of type EntityRecognizer")

recognizer_lang = recognizer.get_supported_language()
if recognizer_lang not in self.supported_languages:
self.supported_languages.append(recognizer_lang)
self.recognizers.append(recognizer)

def remove_recognizer(
Expand Down

0 comments on commit e0e0c4f

Please sign in to comment.