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

Optimize English g2p function for improved speed and efficiency #124

Merged
merged 2 commits into from
May 14, 2024

Commits on May 9, 2024

  1. Optimize g2p function for improved speed and efficiency

    - Moved global variables (ARPA, _g2p, eng_dict, tokenizer) to top-level scope to avoid redundant initialization.
    - Simplified conditions for words with apostrophes.
    - Streamlined __post_replace_ph function by removing redundant checks.
    - Optimized __refine_syllables function with direct iteration.
    - Avoided re-initialization of tokenizer in __text_to_words by moving it to global scope.
    - Added performance test in __main__ to validate improvements.
    - Resolves issue litagin02#104.
    gordon0414 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    3018309 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Configuration menu
    Copy the full SHA
    7de367b View commit details
    Browse the repository at this point in the history