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 lexeme_type.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")
>>> model.kind == model.interface == "reader"
True
Release files for lexeme-type 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lexeme_type-1.1.0.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lexeme_type-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / lexeme_type-1.1.0.tar.gz
| Download URL | lexeme_type-1.1.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a68f937469f00f0772c2cc17c30b522ae6b0a98c0a85b6ef22cdde80b6171b4
|
|
BLAKE2b-256 checksum How to use checksums |
0ae9ed73d3ef71d29659131c40a0d39f11a679fdc2e052a9452c25d0794ba84d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / lexeme_type-1.1.0-py3-none-any.whl
| Download URL | lexeme_type-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6180105c5d8ef38e3cbeb4fcf15981fbf60cf7bbe17b54133d7390cd05a9638
|
|
BLAKE2b-256 checksum How to use checksums |
8b7c19e4c51c9635514de1b174e55670ca2ff0b29a9eeda78f003b360bf67a00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|