Disvortilo is a simple tool that breaks Esperanto words into roots and affixes.
Project description
Disvortilo
Disvortilo is a simple tool that breaks Esperanto words into roots and affixes.
Getting Started
You can install Disvortilo from PyPI using pip:
pip install disvortilo
Examples
from disvortilo import Disvortilo
disvortilo = Disvortilo()
print(disvortilo.parse("malliberejo"))
# > [('mal', 'liber', 'ej', 'o')]
# some have more than one possible output
print(disvortilo.parse("esperantistino"))
# > [('esper', 'ant', 'ist', 'in', 'o'), ('esperant', 'ist', 'in', 'o')]
# you can also get the morphemes along the their categories
print(disvortilo.parse_detailed("plibonigojn"))
# > [(('pli', WordPart.FULL_WORD), ('bon', WordPart.ROOT), ('ig', WordPart.SUFFIX), ('ojn', WordPart.POS))]
API Reference
Disvortilo
Parser class for splitting Esperanto words into morphemes.
Disvortilo.parse(word: str) -> list[tuple[str, ...]]
Returns all valid analyses of word.
Each analysis is a tuple of morpheme strings in order.
Example return value:
[('esper', 'ant', 'ist', 'in', 'o'), ('esperant', 'ist', 'in', 'o')]
Disvortilo.parse_detailed(word: str) -> list[tuple[tuple[str, WordPart], ...]]
Like parse, but each morpheme is returned together with its detected category (WordPart).
Each analysis is a tuple of (morpheme, WordPart) pairs.
Example return value:
[(('pli', WordPart.FULL_WORD), ('bon', WordPart.ROOT), ('ig', WordPart.SUFFIX), ('ojn', WordPart.POS))]
WordPart
Enum values used by parse_detailed:
PREFIXROOTSUFFIXFULL_WORDPOSNUMBERNAMECORRELATIVE_STARTCORRELATIVE_END
split_sentence(sentence: str) -> list[str]
Splits a sentence into Esperanto word-like tokens.
Supports Esperanto diacritics, optional trailing apostrophes, and forms like 3 and 3an.
Example:
from disvortilo import split_sentence
split_sentence("Mi vidas 3an domon.")
# > ['Mi', 'vidas', '3an', 'domon']
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
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 disvortilo-0.7.11.tar.gz.
File metadata
- Download URL: disvortilo-0.7.11.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6df7d7bcd3527dca1edaca14c8bbeba0e5728b6caabfe2461841c896889fceed
|
|
| MD5 |
36e68e96ee0f09a34bc86c764d7203e6
|
|
| BLAKE2b-256 |
358a04e1ee17d19a7955afe3a9a035e749ed7a5b4091480136d1c0718ddc3150
|
Provenance
The following attestation bundles were made for disvortilo-0.7.11.tar.gz:
Publisher:
publish.yml on LerniloEO/disvortilo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
disvortilo-0.7.11.tar.gz -
Subject digest:
6df7d7bcd3527dca1edaca14c8bbeba0e5728b6caabfe2461841c896889fceed - Sigstore transparency entry: 1270874203
- Sigstore integration time:
-
Permalink:
LerniloEO/disvortilo@7e35115bd0c4e45a7fe2d15895b0067aa07c8332 -
Branch / Tag:
refs/tags/v0.7.11 - Owner: https://github.com/LerniloEO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7e35115bd0c4e45a7fe2d15895b0067aa07c8332 -
Trigger Event:
push
-
Statement type:
File details
Details for the file disvortilo-0.7.11-py3-none-any.whl.
File metadata
- Download URL: disvortilo-0.7.11-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
095a84540d368cd08bbf1f698a3c6b74f2ad712c79fd6c1c9d39771e8d5290ec
|
|
| MD5 |
72f6761503bd53a085e2873fa8037d6a
|
|
| BLAKE2b-256 |
59bb8226f32adbef5daf22937e29b93d897c50fa4a336454da426eaa2ea299a8
|
Provenance
The following attestation bundles were made for disvortilo-0.7.11-py3-none-any.whl:
Publisher:
publish.yml on LerniloEO/disvortilo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
disvortilo-0.7.11-py3-none-any.whl -
Subject digest:
095a84540d368cd08bbf1f698a3c6b74f2ad712c79fd6c1c9d39771e8d5290ec - Sigstore transparency entry: 1270874209
- Sigstore integration time:
-
Permalink:
LerniloEO/disvortilo@7e35115bd0c4e45a7fe2d15895b0067aa07c8332 -
Branch / Tag:
refs/tags/v0.7.11 - Owner: https://github.com/LerniloEO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7e35115bd0c4e45a7fe2d15895b0067aa07c8332 -
Trigger Event:
push
-
Statement type: