Skip to main content

асинхронный спеллер с использованием API Yandex Speller

Project description

pip install prlps_speller

асинхронный спеллер с использованием API Yandex Speller.

ограничения для одного IP-адреса:

  • на количество обращений к API - 10 000 обращений в сутки;
  • на объем проверяемого текста - 10 000 000 символов в сутки.

параметры при создании экземпляра класса YandexSpeller:

  • format_text: формат текста ('auto', 'html', 'text')
  • lang: языки проверки ('en', 'ru', 'uk')
  • check_yo: учитывать букву ё
  • ignore_urls: игнорировать ссылки
  • ignore_tags: игнорировать HTML-теги
  • ignore_capitalization: игнорировать регистр
  • ignore_digits: игнорировать цифры
  • find_repeat_words: искать повторяющиеся слова
from asyncio import run as async_run
from prlps_speller import YandexSpeller

async def test():
    speller = YandexSpeller(
        format_text='html',
        lang=['ru', 'en'],
        check_yo=True,
        ignore_urls=True,
        ignore_tags=True,
        ignore_capitalization=True,
        ignore_digits=True,
    )
    text = 'елка била бальшая и високоя, мольчешечки радывались и плисали вакруг, напивая песинькю "Jinkl Belz".'
    # получить готовый исправленный текст:
    fixed = await speller.spelled(text)
    print(fixed)  # елка была большая и высокая, мальчишечки радовались и плясали вокруг, напевая песенку "Jingle Bells".

    # вывод позиций ошибок и вариантов исправлений:
    changes = await speller.spell_text(text)
    print(changes)


# запуск теста:
async_run(test())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prlps_speller-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prlps_speller-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file prlps_speller-0.0.1.tar.gz.

File metadata

  • Download URL: prlps_speller-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for prlps_speller-0.0.1.tar.gz
Algorithm Hash digest
SHA256 481f6744e85b01fa4d64877eef623eee6644383fbb4fa5966dbc809176442fa8
MD5 2bd10d8d3cc451ceef36bb3694b01926
BLAKE2b-256 e0e124d9bb5c67de536577a367312512950d829391ca03d73f8d16584b5e681a

See more details on using hashes here.

File details

Details for the file prlps_speller-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: prlps_speller-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for prlps_speller-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22ebe1c823a697417ac632b6c3609a5ec9cefc3fb85ce902e514a618a4a8a751
MD5 d945eeab8ec489f0d1aa537b339ddfd0
BLAKE2b-256 d08468d6d676d24bad5e5ce22ce8fe57f85bcad2454faa513c19d5d61176e2af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page