Chinese Typewriter

  • defaultuser0
    19th November Member 0 Permalink

    I made a typewriter for Simplified Chinese! ID:3306077


    Usage: For each character you want to write, type the pinyin in.
    Then, click the checkmark button to show the top 8 candidates.
    You can also press the X button to clear the current pinyin. 
    There is also a backspace and enter key, as well as punctuation keys.
     
    If you can't type a character you want, then you have to draw it yourself, sorry :(
     
    Source code (FILT): https://gist.github.com/uint128-t/085b05adb7ce6838d759ff8b9ed07744
    Font: Noto Sans Simplified Chinese https://fonts.google.com/noto/specimen/Noto+Sans+SC
    Database: Jun Da Character frequency list of Modern Chinese https://lingua.mtsu.edu/chinese-computing/statistics/
     
    Typing Examples:
    (unicode doesn't work in the forum??)
    ni (1) hao (1)
     
    How it works:
    It converts each pinyin into a 25-bit integer, and uses binary search to find the position of it in the FILT block. Then, it prints the characters out using a simple display.

    TODO: fix it for 6 letter pinyin (there are only two of them)
     
    You can use parts of this in your saves. You're also more than welcome to adapt this for other languages, etc!
    Just please provide attribution! 

    Edited 4 times by defaultuser0, jacob1. Last: 22nd November