semvec/pypi-packages huggingface dataset:
starter-py 0.0.5
Python3 Starter
License: MIT
Requires Python: >=3.9,<4.0

<img align="right" width="96px" src="./assets/python3_logo.png">

# starter-py

[![Test][test-ci-badge]][test-ci]
[![GitHub release][gh-release-badge]][gh-release]

## Sponsors

<p align="center">
  <a href="https://github.com/sponsors/Dup4">
    <img src='https://cdn.jsdelivr.net/gh/Dup4/static/sponsors-output/sponsors.svg' alt="Logos from Sponsors" />
  </a>
</p>

## License

[MIT](./LICENSE) License © 2023 [Dup4][dup4]

[dup4]: https://github.com/Dup4
[test-ci-badge]: https://github.com/Dup4/starter-py/workflows/Test/badge.svg
[test-ci]: https://github.com/Dup4/starter-py/actions/workflows/test.yml
[gh-release-badge]: https://img.shields.io/github/release/Dup4/starter-py.svg
[gh-release]: https://GitHub.com/Dup4/starter-py/releases/
spellcheckmate 0.1.4
A hopefully cross-platform reimplementation of Peter Norvig's spelling corrector.
License: MIT
Requires Python: >=3.10,<4.0

# spellcheckmate

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Python](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/release)

## description

A hopefully cross-platform reimplementation of [Peter Norvig's spelling corrector](http://norvig.com/spell-correct.html) with minor modifications.
Checking for spelling and/or grammar mistakes by calling the `.check(text)` method of the `SpellCheckMate()` class enables users to interactively correct their mistakes sentence by sentence. Correct a single word by calling `.correct(word)` and get a list of all the alternative corrections by calling `.alternatives(word)` or print them out directly by `.print_alternatives(word)`.

## usage

```py
from spellcheckmate import SpellCheckMate

spell_check = SpellCheckMate()

word = "somthign"
corrected_word = spell_check.correct(word)
""" the words 'somthign' and the correct 'something' are 1 character deletion and 1 transposed character away from each other. """
print(corrected_word) # prints the correct version, 'something'

word = "smthign"
corrected_word = spell_check.correct(word)
"""this is a limitation of the library, since it won't search for words of which Damerau–Levenshtein distance is greater than 2. """
print(corrected_word) # prints '404', since 'smthign' and 'something' are more than 2 edits away from each other.

word = "aie"
word_alternatives = spell_check.alternatives(word)
print(word_alternatives) # prints ['ave', 'amie', 'ate', 'ale', 'die', 'tie', 'ai', 'aye', 'are', ... ]
spell_check.print_alternatives(word)
"""
ave
amie
ate
ale
die
tie
ai
aye
are
...
"""

text = "We lov everithin. Or smthign like that."
""" parses text interactively sentence by sentence and points to mistyped word after which user can select from recommendations
or type correct version if not found in recommendations. """
corrected_text = spell_check.check(text)

"""
we lov everithin
   ^
low
lot
log
love
lo
nov
sov
los
loi
> love
we lov everithin
       ^
everything
> everything
we lov everithin
we love everything 
 or smthign like that
    ^
404
> something
 or smthign like that
or something like that 
"""
```

## installation

```bash
pip install spellcheckmate
```