def double_typos(self):
"""letter combinations two typos away from word"""
return chain.from_iterable(
Word(e1, only_replacements=self.only_replacements).typos()
for e1 in self.typos()
)
when fixing the second typo, a Word object is created, but without specifying a language. thus, the second typo correction always uses the english alphabet. so, double_typoing a word like здрйхствуйте returns corrections like здраmствуйте instead of здравствуйте, replacing one of the letters properly, and another with an english letter.
when fixing the second typo, a Word object is created, but without specifying a language. thus, the second typo correction always uses the english alphabet. so, double_typoing a word like
здрйхствуйте
returns corrections likeздраmствуйте
instead ofздравствуйте
, replacing one of the letters properly, and another with an english letter.