TODO
Project description
lexeme-type
Lexeme type
Lightweight no-dependency helper for treating singular and plural spellings as equivalent.
A drop‑in str subclass that normalizes English nouns so that their singular and plural forms compare as equal, hash to the same key, and work inside Pydantic v2 models. Ignores capitalization.
Examples
>>> from partial_lexeme.lexeme import Lexeme
>>> Lexeme("reader") == "readers" == Lexeme("readers")
True
>>> {Lexeme("analyses"): 1} == {"analysis": 1}
True
>>> from pydantic import BaseModel
>>> class _Plugin(BaseModel):
>>> kind: Lexeme
>>> interface: Lexeme
>>> model = _Plugin(kind="reader", interface="readers")
>>> assert model.kind == model.interface == "reader"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lexeme_type-1.0.0.tar.gz
(6.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lexeme_type-1.0.0.tar.gz.
File metadata
- Download URL: lexeme_type-1.0.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
056867c0512ad5f7dcf9de353bd5af0bf7addd401e915b0f5425c70b43da027e
|
|
| MD5 |
e1c14551476c657f0c1e33d860dfe4fa
|
|
| BLAKE2b-256 |
c29849a6be81c3973051cd2783d6ed4ad74e64516cba1ebfd5518b0022f861db
|
File details
Details for the file lexeme_type-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lexeme_type-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dea9a53cf570a5b3a000242f4e03abefcf3219986cab1c8e5d2fabc00f9f6c1
|
|
| MD5 |
5008e5d9d4be82f48d626b1430fb2c3c
|
|
| BLAKE2b-256 |
ba6b64d56b55b0f29bff78d76ae826bdef984aad0a9a773fc407ddcd199f7f45
|