Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Tests run in Docker because enchant requires native system libraries. Lint runs

Pure Python library for multi-language spell-checking backed by `pyenchant`.

**Public API** (`spellchecker/__init__.py` — 5 exports):
**Public API** (`spellchecks/__init__.py` — 5 exports):
- `SpellChecker` — frozen dataclass (kw_only, slots); `SpellChecker(language=..., exclusion_words=(), exclude_urls=True, cache_size=10000, max_suggestions=0).check(text) -> list[OneCorrection]`
- `OneCorrection` — frozen dataclass: `first_position`, `last_position`, `word`, `suggestions: tuple[str, ...]`
- `FileProvider` — sync file-backed user word list; `__init__(base_path)`, `get_words/add_word/remove_word(user_name, ...)`
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Python library for spell-checking text in multiple languages, backed by [pyencha
## Installation

```bash
pip install spellchecker-lib
pip install spellchecks
# or
uv add spellchecker-lib
uv add spellchecks
```

### System dependencies
Expand Down Expand Up @@ -37,7 +37,7 @@ apt-get install libenchant-2-dev aspell aspell-en aspell-ru aspell-es aspell-fr
## Usage

```python
from spellchecker import SpellChecker
from spellchecks import SpellChecker

checker = SpellChecker(language="ru_RU")
corrections = checker.check("Превед медвет")
Expand All @@ -48,7 +48,7 @@ corrections = checker.check("Превед медвет")
### With per-user word exceptions

```python
from spellchecker import SpellChecker, FileProvider
from spellchecks import SpellChecker, FileProvider

provider = FileProvider("/data/dicts")
provider.add_word("alice", "Превед") # add to alice's personal dictionary
Expand Down Expand Up @@ -78,7 +78,7 @@ corrections = checker.check("Привет Превед")
Implement `UserDictProtocol` for custom storage backends:

```python
from spellchecker import UserDictProtocol
from spellchecks import UserDictProtocol


class RedisProvider:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "spellchecker"
name = "spellchecks"
version = "0"
description = "Python library for spell-checking text in multiple languages"
authors = [
Expand Down Expand Up @@ -46,7 +46,7 @@ requires = ["uv_build"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-name = "spellchecker"
module-name = "spellchecks"
module-root = ""

[tool.ruff]
Expand Down Expand Up @@ -74,7 +74,7 @@ ignore = [

[tool.ruff.lint.isort]
no-lines-before = ["standard-library", "local-folder"]
known-local-folder = ["spellchecker"]
known-local-folder = ["spellchecks"]
lines-after-imports = 2

[tool.ruff.lint.extend-per-file-ignores]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from spellchecker import DummyProvider, FileProvider
from spellchecks import DummyProvider, FileProvider


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/test_spell.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from spellchecker import SpellChecker
from spellchecks import SpellChecker


RU_LANG: typing.Final = "ru_RU"
Expand Down
Loading