mirror of
https://github.com/magnum-opus-tender-hack/backend.git
synced 2024-11-24 10:13:44 +03:00
11 lines
244 B
Python
11 lines
244 B
Python
import requests as r
|
|
|
|
|
|
def spell_check(word: str) -> str:
|
|
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]
|