timdream / jszhuyin

JS 注音:JavaScript 自動選字注音輸入法;"Smart" Chinese Zhuyin Input Method in JavaScript.
https://jszhuyin.timdream.org/
MIT License
224 stars 18 forks source link

Use addresses to locate phrases to suggest #21

Closed timdream closed 9 years ago

timdream commented 9 years ago

We are keeping encoded sounds with each of the candidates and try to find the suggestion candidates by using these encoded sounds. We could in fact instead keep the found addresses to save some loops on searches.

This is hard because we need the 1st entry of the candidates to be structure-clone-able. The 32bit addresses can be saved into JavaScript string, but it might bitrot during transmission within the outside world.

Note that it should still contain the info of # of encoded sounds we should remove when the user selects the candidate.