Open Philippe-Collignon opened 5 years ago
Hi Philippe,
The optimizer uses ASCII, not Unicode, which means it doesn't support those French characters.
There's a trick you might be able to use to get around this. You can replace all the Unicode characters in your data set with ASCII characters as long as they aren't already getting used. For example, replace é with 1, ç with 2, etc. Then when the optimizer generates a keyboard layout, where the layout contains a 1, you know that really means é. I hope that works for your purposes.
Cheers, Michael
Hi Michael,
Thanks for the trick ... I also thought about it but as my corpus was also containing the numbers and think to use the optimizer more deeply with numbers also I did not do it.
But it is a good trick for a first board. I'll published the result and the french char files based on the corpus used by bépo team (the alternative french keyboard layout project)
Unfortunately I could not get it working . .. with a layout K_NO there is not enough keys so I had to remove some letters (w,..) I get an interesting result but incomplete
ê P O B Y X V L M Q A I E U é D S R T N : Z K è W G C J F H
à p o b y x v l m q a i e u , d s r t n ; z k . ç g c j f h
and with K_STANDARD (which by the way is not working if I set it in values.c as said in the readme, but with setksize standard it works) numbers are mixed with the real numbers. So I replaced with special characters and got this ... better than Bépo layout yet but I'll keep optimizing for an english-french-programmer layout. Thanks
K ! @ ç $ % ^ & * ( ) ~ |
P O B Y G D L " Q J Z + A I E U ê M S R T N X _ ? à < : V C H F W
k 1 2 3 4 5 6 7 8 9 0 ` \ . p o b y g d l ' q j z = a i e u é m s r t n x
I've forked with a workaround for french accents. https://github.com/phcollignon/Typing
@phcollignon interesting work. If this modification doesn't work to your satisfaction and your up to the task of making this Unicode compatible, I'd be most interested in your output. I use Typing to work with decomposed UTF-8 characters. there are also several analysis tools in the BEBE keyboard layout community which is french focused. Another tool you might look at is http://509.ch/opt.7z // https://509.ch/opt.htm which has/had the ability to add up to three states (something like default, shift, and alt). But I have found Typing to be a really nice tool and chose it as the bases of my testing for use in African languages (the issues of states and unicode combining diacritics aside)
Thanks for the links, I did not know about that german project. I have no plan to update the code to Unicode for now. The workaround gives an acceptable result. It's just that the paranthesis, brackets and curly braces are not taken into account because they are used as unicode letters mapping. One problem not yet solved is the dead keys ^
and ¨
.
Funny enough, one of the best result so far for 50% french/english is the ".YOU" layout .. ;-))
Hands: 51% 48%
Fingers: 9.0% 9.0% 19% 15% 0.00% 0.00% 17% 11% 11% 9.0%
^ @ * / & % # $ ? + < Z ~
: Y O U ç X L P C B V K \
A I E N ' M R T S D F
| ! = à ` J H W G Q
ê 1 2 3 4 5 6 7 8 9 0 z ù
. y o u - x l p c b v k >
a i e n , m r t s d f
; " è é _ j h w g q
Fitness: 1255024607
Distance: 971772980
Finger work: 1315297
Inward rolls: 7.64%
Outward rolls: 1.94%
Same hand: 32.87%
Same finger: 1.86%
Row change: 13.87%
Home jump: 0.82%
Ring jump: 0.61%
To center: 1.38%
To outside: 0.69%
I added a french corpus parser (in go) to build the frequency files from text content. With :
Hi, I try to optimize french Azerty keyboard with the optimizer.
I defined a new DEFAULT_KEYBOARD_FRENCH with some french characters in it like "éçàù .." I created new data (allChars.txt and allDigraphs.txt for french containing also those chararacters)
But if I run the optimizer, I have unknown characters in the result map (instead of the french characters) ? Could you tell if the optimizer supports foreign language chars ?
Thanks,