#ПроверкаНаОпечатки
Код из видео:
from spellchecker import SpellChecker
spell = SpellChecker(language='ru')
with open('text.txt', 'r', encoding='utf-8') as f:
misspelled = f.read()
misspelled = misspelled.split(' ')
print(misspelled)
misspelled = spell.unknown(misspelled)
print(misspelled)
for word in misspelled:
print(spell.correction(word))
Код из видео:
from spellchecker import SpellChecker
spell = SpellChecker(language='ru')
with open('text.txt', 'r', encoding='utf-8') as f:
misspelled = f.read()
misspelled = misspelled.split(' ')
print(misspelled)
misspelled = spell.unknown(misspelled)
print(misspelled)
for word in misspelled:
print(spell.correction(word))