Skip to content

Conversation

@Robert-Roth
Copy link
Owner

@Robert-Roth Robert-Roth commented Aug 21, 2025

Description

This PR bumps the version to 2.0.0 to reflect significant and non-backward-compatible changes. The primary goals of this update are to simplify the library's architecture, remove external dependencies for better license compliance, and improve the accuracy of the readability metrics.

Changes

  • Architecture change — class to functions:
    The library has been refactored from a class-based (readability()) to a direct function-based API. Users can now import and call functions like flesch_kincaid_grade(text) directly, making the library more straightforward and Pythonic to use. This breaking change is the main driver for the v2.0.0 major version bump.

  • Removed cmudict dependency for MIT license compliance:
    The external cmudict package has been removed as a dependency to ensure the project can be maintained under the MIT license. The CMU Pronouncing Dictionary is now bundled directly with the package. A local copy of the cmudict.dict file is now included in the package resources. A new internal function, _load_cmu_dict, has been implemented to parse this file, making the library self-contained. The CMUdict license has been added to LICENSE to give proper attribution.

  • Corrected readability calculations:
    Several readability formulas have been reviewed and corrected to fix errors and align more closely with their standard definitions.

  • Code and comment cleanup:
    The codebase has been cleaned up with updated comments, improved function signatures, and better type hinting.

  • Removed verbose mode:
    Verbose mode wasn't very useful. Removed it for ease of future development and ease of use.

@Robert-Roth Robert-Roth merged commit e6068b7 into main Aug 21, 2025
1 check passed
@Robert-Roth Robert-Roth deleted the update-cmudict branch August 21, 2025 18:49
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.

1 participant