Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug with language supporting detection function of component #6802

Closed
howl-anderson opened this issue Sep 27, 2020 · 3 comments · Fixed by #6803
Closed

A bug with language supporting detection function of component #6802

howl-anderson opened this issue Sep 27, 2020 · 3 comments · Fixed by #6803
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@howl-anderson
Copy link
Contributor

Rasa version: 2.0.0rc1

Issue:

If a new component has such language supporting settings:

supported_language_list = ["en", "xx"]
not_supported_language_list = None  # which is the default value

it will not work correctly since the can_handle_language function not implemented incorrectly:

        language_list = cls.supported_language_list or []
        not_supported_language_list = cls.not_supported_language_list or []

        return language in language_list or language not in not_supported_language_list

since not_supported_language_list will be [] in our example, so language not in not_supported_language_list will always be true no matter what's the value of language. Finally when cls.not_supported_language_list is None then all language will be supported which is not we wanted.

I will submit a PR to fix it.

@howl-anderson howl-anderson added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Sep 27, 2020
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @erohmensing will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@erohmensing
Copy link
Contributor

Thanks for the initiative toward fixing this!

@howl-anderson
Copy link
Contributor Author

Since #6803 already merged, it fixed the issue, so I will close it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants