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

automated translation from coding to english #12

Merged
merged 2 commits into from
Dec 28, 2023

Conversation

MariaGorodetski
Copy link
Contributor

Automatically transforms decoded questionnaire answers
from code to english

Copy link
Contributor

@alondmnt alondmnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only got the gist of it (which makes sense), just one comment for your consideration.

@@ -64,6 +66,7 @@ class PhenoLoader:
valid_stage (bool): Whether to ensure that all research stages in the data are valid.
flexible_field_search (bool): Whether to allow regex field search.
errors (str): Whether to raise an error or issue a warning if missing data is encountered.
auto_translate (bool): Whether to automatically translate the data from coding to english.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider the following alternative:
instead of the word "translation", and a boolean value,
use something like preferred_language="coding" (or a better similar name of your choice) that accepts ["hebrew", "english", "coding"].
this can be readily extended to other languages if needed.
also, perhaps in the config we can set the default value for preferred_language (like other PhenoLoader args). maybe some customers will prefer an english default, and others a coding default.

but maybe you considered this and had a good reason to go for a boolean translation approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Contributor

@alondmnt alondmnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

@MariaGorodetski MariaGorodetski merged commit df18f14 into dev_v12 Dec 28, 2023
@MariaGorodetski MariaGorodetski deleted the answers_auto_translation branch December 28, 2023 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants