Literumilo - A spell checker and morphological analyzer for Esperanto.
Literumilo checks the spelling of Esperanto words, and divides them into morphemes. For example, 'miskomprenita' is divided as 'mis.kompren.it.a'.
Literumilo can analyze individual Esperanto words, or an entire file of Esperanto text.
Requirements
Literumilo was developed and tested on Python 3.7 .
Links
Github: https://github.com/Indrikoterio/literumilo-python
PyPi: https://pypi.org/project/literumilo/1.0.8/
Installation
This works for me:
$ python3 -m pip install literumilo
Usage
Importing
In your Python program, you can import the module simply as shown here:
import literumilo
Using the above method, literumilo's functions must be prefixed with the package name, as below:
result = literumilo.check_word("ĉirkaŭiris")
Alternatively, you can import the function names directly:
from literumilo import x_to_accent
from literumilo import check_word
from literumilo import analyze_string
from literumilo import analyze_file
The code samples below assume that the second method has been used:
x_to_accent
This function converts from the 'x method' to Unicode accented letters. For example, the following line:
print(x_to_accent("cxirkaux"))
prints out ĉirkaŭ.
check_word
The function check_word checks the spelling of an Esperanto word, and divides it into morphemes, if it is valid. It returns a class, AnalysisResult, with two attributes, 'word' and 'valid' (valid is boolean). For example:
result = check_word("ĉirkaŭiris")
if result.valid:
print("OK> {}".format(result.word))
else:
print("Bad> {}".format(result.word))
The above code will print out OK> ĉirkaŭ.ir.is.
analyze_string
This function has two modes, morpheme mode and spell checker mode. The first parameter is the string to analyze. The second is the mode. When the mode is True, analyze_string will divide every Esperanto word in the string into morphemes, and return the new string. For example:
TEXT = "Birdoj (Aves) estas klaso de vertebruloj kun ĉirkaŭ 9 ĝis 10 mil vivantaj specioj."
result = analyze_string(TEXT, True)
print(result)
The above will print out
Bird.oj (Aves) est.as klas.o de vertebr.ul.oj kun ĉirkaŭ 9 ĝis 10 mil viv.ant.aj speci.oj
When the morpheme mode is False, analyze_string outputs a list of unknown words. This code,
TEXT = "Birdoj (Aves) estas klaso de vertebruloj kun ĉirkaŭ 9 ĝis 10 mil vivantaj specioj."
result = analyze_string(TEXT, False)
print(result)
will print out:
Aves
analyze_file
The function analyze_file simply reads a file into a string, and calls analyze_string. For example:
result = analyze_file(file_path, True)
print(result)
The second parameter is the mode - the same as analyze_string's mode parameter.
Developer
Literumilo was developed by Cleve (Klivo) Lendon.
Contact
To contact the developer, send email to indriko@yahoo.com . Preferred languages are English and Esperanto. Comments, suggestions and criticism are welcomed.
History
First release, May 2020.
License
Literumilo is free software. It is distributed free of charge, without conditions, and without guarantees. You may use, modify and distribute it as you wish. There is no need to ask for permission. If you use Literumilo's code in your own project, and publish it, I request only that you acknowledge the source.
Metadata
Release files for literumilo 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| literumilo-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for literumilo-1.0.8-py3-none-any.whl |
Release files / literumilo-1.0.8-py3-none-any.whl
| Download URL | literumilo-1.0.8-py3-none-any.whl |
|---|---|
| Size | 88.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0db14362c8a89aaeedbc7dbb8f6d96dedcc927991192cde51728e537a1e4e78
|
|
BLAKE2b-256 checksum How to use checksums |
eb97f7aa252728b0890580e7dfa9d506d28ed17e9f428aea179aa9e4a4041ce1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
|
Security for literumilo 1.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.