Skip to content

oriontvv/pyaspeller

Repository files navigation

Python text speller

CI Coverage Status Pypi

pyaspeller (Python Yandex Speller) is a cli tool and pure python library for searching typos in texts, files and websites.

Spell checking uses Yandex.Speller API. (restrictions)

Installation

  • Highly recommend to use latest uv
  • uv add pyaspeller (for library mode)

Features

  • Command line tool

You can correct your local files or web pages

$ uvx pyaspeller ./doc
$ uvx pyaspeller https://team-tricky.github.io
$ uvx pyaspeller "в суббботу утромъ"
в субботу утром
  • Library

Use speller for your code

>>> from pyaspeller import YandexSpeller
>>> speller = YandexSpeller()
>>> fixed = speller.spelled('Triky Custle is a great puzzle game.')
>>> fixed
'Tricky Castle is a great puzzle game.'

You can use class Word for single word queries:

>>> from pyaspeller import Word
>>> check = Word('tesst')
>>> check.correct
False
>>> check.variants
[u'test']
>>> check.spellsafe
u'test'

Also, there are available rust and javascript versions of this speller.

About

Python text speller

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 8