Fix English word list retrieval in qmk generate-autocorrect-data (#20915)
This commit is contained in:
parent
9dec31d056
commit
7b31c18d46
1 changed files with 6 additions and 0 deletions
|
@ -63,7 +63,13 @@ def parse_file(file_name: str) -> List[Tuple[str, str]]:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import english_words
|
||||||
|
correct_words = english_words.get_english_words_set(['web2'], lower=True, alpha=True)
|
||||||
|
except AttributeError:
|
||||||
from english_words import english_words_lower_alpha_set as correct_words
|
from english_words import english_words_lower_alpha_set as correct_words
|
||||||
|
if not cli.args.quiet:
|
||||||
|
cli.echo('The english_words package is outdated, update by running:')
|
||||||
|
cli.echo(' {fg_cyan}python3 -m pip install english_words --upgrade')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
if not cli.args.quiet:
|
if not cli.args.quiet:
|
||||||
cli.echo('Autocorrection will falsely trigger when a typo is a substring of a correctly spelled word.')
|
cli.echo('Autocorrection will falsely trigger when a typo is a substring of a correctly spelled word.')
|
||||||
|
|
Loading…
Reference in a new issue