2022-10-22 04:58:10 +03:00
|
|
|
import requests as r
|
|
|
|
|
|
|
|
|
|
|
|
def spell_check(word: str) -> str:
|
2022-10-22 10:55:10 +03:00
|
|
|
res = r.get(
|
|
|
|
f"https://speller.yandex.net/services/spellservice.json/checkText?text={word}"
|
|
|
|
)
|
|
|
|
if not res.json():
|
|
|
|
return word
|
|
|
|
return res.json()[0]["s"][0]
|