Coder Social home page Coder Social logo

promyloph / lulua Goto Github PK

View Code? Open in Web Editor NEW
7.0 6.0 3.0 639 KB

لُؤْلُؤَة هي لوحة مفاتيح

Home Page: https://6xq.net/لؤلؤة/

License: MIT License

Python 78.44% Shell 3.99% CSS 2.94% Batchfile 0.06% HTML 14.56%
keyboard-layout simulated-annealing layout-optimization windows linux pypy3 arabic

lulua's Introduction

لؤلؤة

image

Ergonomic Arabic Keyboard layout. See website for details.

Creating layouts

Although optimized for the Arabic language it should be possible to create layouts for other (non-RTL) languages as well. Here’s how to proceed: First, create a data file my-layout.yaml that contains all key to character mappings the new layout should have. Look at lulua/data/layouts for examples. Then create statistics for your corpus. For plain-text files use:

cat corpus.txt \
    | lulua-write my-layout.yaml file text \
    | lulua-analyze combine \
    > stats.pickle

Now you can optimize your layout using:

lulua-optimize -n 30000 --triad-limit=30000 -r -l my-layout.yaml \
    < stats.pickle \
    > evolved.yaml

To get a pretty picture (SVG) of your layout render it:

lulua-render -l evolved.yaml svg evolved.svg

It is highly recommended to use PyPy 3 instead of CPython and a powerful machine with lots of RAM (at least 16 GB).

Building documentation

This essentially means building the website and reproducing my results. You’ll need to obtain the corpora from me, which are not public due to copyright issues. Also the following software is required:

  • Python/PyPy 3
  • Ninja (for the build process)
  • GNU autotools and a host C compiler (for 3rdparty/osmctools)
  • GNU bash and zip (for makezip.sh)
  • librsvg (rsvg-convert is used to create PDF’s from SVG images)
  • MinGW (to compile the Windows keyboard driver)

Then simply run

./gen.sh > build.ninja && ninja

to run the analysis and create pretty pictures as well as statistics in _build/report.

Acknowledgements

This software is using an extended version of carpalx by Martin Krzywinski for optimizing layouts.

lulua's People

Contributors

promyloph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lulua's Issues

Windows physical key layout

Windows seems to think lulua uses a different physical key layout:
screenshot-lulua

Arabic (102) displays correctly, so there must be an undocumented(?) switch somewhere:
screenshot-ara

Scientific evaluation

After all what we and the algorithms think could be a good layout may be total nonsense in people’s daily life.

Ideally we’d want to have a number of people learning the new layout while monitoring their progress in terms of hard numbers (typing speed, accuracy, …) and soft indicators (ease of use, comfort, …). A good setup would also include a control group learning the “standard” layout with the same typing tutor under the same conditions. Evaluating the impact of the compose-based Alef-Hamza approach would be very important, since people will feel weird about it at first.

The main challenge here is finding enough participants willing to screw up their typing habits for us (by learning a new layout) without providing any kind incentive. (There is no budget to pay them.)

Explain design decisions

  • Why compose-based?
    • pro: consider hamza optional diacritic, backed by Buckwalter https://doi.org/10.1007/978-1-4020-6046-5_3 (section 3.3)
    • con: could reduce weight of plain alif → more even distribution
    • con: more keys pressed, more combinations
  • Why no العامية/dialect?
    • Lack of corpora, but we could scrape social media in the future
  • Why European keyboard, not ANSI?
    • Arabic Mac keyboard is uses 102 button layout
    • Better support for 3rd layer (right shift key)
    • But both variants exist for traditional Arabic layout

Cross-compile Windows driver

Figure out a way to cross-compile the Windows driver, so we don’t need a Windows VM and the build flow can be fully automated.

40% keyboard

Have you tried implementing this layout on 40% keyboard? I find this project to be quiet interesting

Platform support

  • Windows
  • Android
  • macOS: keylayout files have no support for custom modifier keys. State machine is only useful for deadkeys.
  • iOS: Someone with access to Apple’s developer program needs to look into that.

Might be possible to use

Documentation

Document how to use this software, how to create new layouts, that Martin Krzywinski’ carpalx is used.

ASMO 663

Get access to the original standard and verify the layout is correct. I’ve seen different layouts in different publications.

This seems to be a photocopy of the layout, which matches our current layout:

Lulua hamza in klavaro

i genuinely love this layout and consider to use it for daily use. hence, i try to learn touch typing with it in past month.
then i've encounter problem with أ إ ىٔ ىٕ all the ٔ and ٕ addition doesn't showing in the klavaro practice programs.
furthermore i try online typing lesson such monkeytype.com or tybaa.com but the problem keep occurring. every hurf with ٔ addition keep identified as wrong words,
is there any solution for this?

Diversify corpus data sources

Right now the corpora used are heavily leaning towards MSA (i.e. the news) without diacritics. It would be nice to include literary and scientific Arabic, as well as kid’s books (which usually contain diacritics).

Website colorscheme

Figure out a good, readable colorscheme for the website and layout SVG’s.

Words typed in Lulua are not identical to words typed in other default layouts

Making a new keyboard layout is such an ambitious goal, but it's not easy especially for an Arabic Layout. And I respect that!

The hamza mechanic is quite unique and I like it. Though, it may cause issues for the uniformity of the word.
For example, the word "أحمد" (Lulua) is not identical to "أحمد".
There is a difference in the Unicode encoding which may cause huge problems in search, registration forms, etc...

image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.