Feature/multilingual textstats #43
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements, including enhanced language support for readability and duration prediction, updates to the setup process in the documentation, and refinements to default behavior for reading speed calculations. Below is a breakdown of the most significant changes:
Language Support Enhancements:
welearn_datastack/constants.py: Added reading speeds and Flesch-Kincaid constants for new languages (de,es,jp,pt,ar,it,nl,zh) to improve language-specific readability and duration predictions. [1] [2]welearn_datastack/utils_/text_stat_utils.py: Updated thelangparameter descriptions inpredict_readabilityandpredict_durationfunctions to reflect the newly supported languages. [1] [2]Documentation Updates:
README.md: Updated the setup instructions to use Poetry for dependency management instead of a virtual environment withpip. This simplifies the setup process and aligns with modern Python project practices.Default Behavior Refinements:
welearn_datastack/utils_/text_stat_utils.py: Changed the default reading speed inpredict_durationto the average of all supported reading speeds (184 wpm) instead of defaulting to English. This ensures a more balanced fallback for unsupported languages.