backend/app/search/services/spell_check.py
2022-10-22 04:58:10 +03:00

7 lines
187 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}')
return res.json()[0]['s'][0]