You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the code interpreter to check Esperanto spelling like this:
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:
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)
The text was updated successfully, but these errors were encountered:
For example https://pypi.org/project/literumilo/ could be run inside the chat to double check things.
Test1:
Prompt:
The text was updated successfully, but these errors were encountered: