kbatsuren / wiktra Goto Github PK
View Code? Open in Web Editor NEWWiktra - Python tool of Wiktionary Transliteration modules for 514 languages and its 102 different scripts (orthographies)
License: GNU General Public License v2.0
Wiktra - Python tool of Wiktionary Transliteration modules for 514 languages and its 102 different scripts (orthographies)
License: GNU General Public License v2.0
Would the authors kindly provide instructions to install wikta on linux distros such as ubuntu etc?
Thanks in Advance.
lupa._lupa.LuaError: [string ""]:1: module 'wikt.mw' not found:
is raised when trying to import translite
Transliteration from Arabic is not working for continuous text. It works for single space-separated characters. The Arabic Wiktionary module is a bit complex, need to investigate and add some special processing.
How feasible would it be to update this to cover all Wiktionary transliterations, and possibly expose additional functionality?
Update to cover all transliteration modules: https://en.wiktionary.org/wiki/Category:Transliteration_modules
Change the API so we can specify the input ISO 639 language code and/or ISO 15924 script code, possibly only the ISO script code without specifying the language.
Change the API so we can optionally specify the output language and/or script code, so we can transliterate to other scripts/languages, not just Latin, using modules like https://en.wiktionary.org/wiki/Module:Newa-Deva-translit
It would be best that language and script lookups would be done using native Lua modules (see dependencies below)
Provide instructions or some script that automatically updates the Lua components from Wiktionary (I don’t know how this is done).
Integrate languages
:
Integrate families
:
Integrate scripts
:
Integrate translit-redirect/data
Dependencies:
A simpler way to solve the missing wikt.mw problem would be to add
import os
os.chdir(os.path.dirname(__file__))
at the beginning of Wiktra.py
If I try to transliterate Georgian text (e.g. wiktrapy -l geo -t მხედრული
), I get the following error (abbreviating somewhat):
File "lupa/_lupa.pyx", line 280, in lupa._lupa.LuaRuntime.execute
File "lupa/_lupa.pyx", line 1297, in lupa._lupa.run_lua
File "lupa/_lupa.pyx", line 1306, in lupa._lupa.call_lua
File "lupa/_lupa.pyx", line 1332, in lupa._lupa.execute_lua_call
File "lupa/_lupa.pyx", line 1268, in lupa._lupa.raise_lua_error
lupa._lupa.LuaError: [string "<python>"]:1: module 'wikt.translit.Geor-translit' not found:
no field package.preload['wikt.translit.Geor-translit']
no file '/var/www/.local/lib/python3.9/site-packages/wiktra/wikt/translit/Geor-translit.lua'
no file '/var/www/.local/lib/python3.9/site-packages/wiktra/wikt/wikt/translit/Geor-translit.lua'
no file '/var/www/.local/lib/python3.9/site-packages/wiktra/wikt/translit/wikt/translit/Geor-translit.lua'
no file '/var/www/.local/lib/python3.9/site-packages/wiktra/wikt/data/wikt/translit/Geor-translit.lua'
no file '/var/www/.local/lib/python3.9/site-packages/wiktra/wikt/data/translit/wikt/translit/Geor-translit.lua'
no file '/usr/local/lib/lua/5.3/wikt/translit/Geor-translit.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './wikt/translit/Geor-translit.so'
no file '/usr/local/lib/lua/5.3/wikt.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './wikt.so'
In line 332 of wikt/translit/ar-translit.lua
, unpack(sub)
should be replaced with table.unpack(sub)
, otherwise Lua throws the error attempt to call a nil value (global 'unpack')
.
This may also be an issue with other transliteration modules, but I have not checked if there are any others that use unpack
.
Hebrew text does not get transliterated, regardless of whether the input is a single letter or a whole word, and regardless of whether vowel marks are used or not. E.g. wiktrapy -l heb -t בְּרֵאשִׁ֖ית
produces בְּרֵאשִׁ֖ית
, and wiktrapy -l heb -t ת
produces ת
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.