Currently, the word selection algorithm in toipe only supports English ASCII characters. Any other characters (including ASCII special characters will be ignored).
This is not good because the world doesn't only write in English :). Especially for a typing test app which can be used to measure and improve speeds in other languages too.
Once this is implemented, it would also be good to have built-in word lists for more languages (maybe even auto-detect the user's locale and change word list based on it?)
What and why?
Currently, the word selection algorithm in toipe only supports English ASCII characters. Any other characters (including ASCII special characters will be ignored).
This is not good because the world doesn't only write in English :). Especially for a typing test app which can be used to measure and improve speeds in other languages too.
Once this is implemented, it would also be good to have built-in word lists for more languages (maybe even auto-detect the user's locale and change word list based on it?)
How?
The changes need to be done in RawWordSelector (source code).
b'a'
,b'z'
, etc.) to compare and store characters. This needs to be changed to use thechar
type.is_ascii_alphabetic
here - https://github.com/Samyak2/toipe/blob/cfba93778029fc078204f52fb9f2149b4831a678/src/textgen.rs#L247This may require some more changes that I'm not yet aware of.
Please drop a comment if you find any inconsistencies or problems with this idea :)