vietnamese-t9-ime
An old-fashioned keypad based input method (T9) for Vietnamese, support accents
The T9 input method
(From Wikipedia )
T9's objective is to make it easier to type text messages. It allows words
to be entered by a single keypress for each letter, as opposed to the
multi-tap approach used in conventional mobile phone text entry, in which
several letters are associated with each key, and selecting one letter often
requires multiple keypresses.
Specifications (Stories):
Definitions:
- Program states: These are the program states:
- Inputting
- Confirmed
- Candidates: ...
- numSeq(keySeq): number sequence: the sequence of input keys' digit/char(?). (What should we call the
Star/Sharp key?)
- combination character:
Specs:
- [ ] User should interact mainly with the keypad (other means of interacting is optionally
supported).
(Keypad-centric accessibility: make use all the key on the keypad, prevent actions outside
of the keypad (dialpad)).
- [ ] Uppercase should only occur at first letter of words.
- [ ] User should be able to select from a set of displayed candidates.
- [x] When inputting, the possible candidates should be displayed.
- [ ] When confirm button is pressed, the selected candidate should be outputted.
- [ ] If no candidate is being selected then the first candidate will be used.
- [ ] If no candidates found, return the entered numSeq.
- [ ] The numSeq should be one of the candidates.
- [ ] If dawg has been built, use that dawg to minimize app start time.
- For Vietnamese:
- [ ] The output should NOT contain combining character, it should contains only rigid unicode
character.
Basic Design:
The UI will follow the MVP design pattern:
- Make the Activity implement the View interface
- Presenter: Receive UI event,
wiring action with the UI(View)
- Model? - Everything else?
Design philosophy:
This project honor 7 virtues of good object by yegor256.
Things to consider
- [x] Which standard to decompose vietnamese (syllable=ascii+accents)
- [x] Follows the English T9 convention of key assignment
Why I chose dawg for implementation of trie?
Because it's the only implementation that support persisting (serializing), and fast!
TODO
- [x]
Decompose accented character.
- [x] Implement number-to-word based on wordlist (saved in database).
- [ ] Implement select candidate key.
- [ ] Support suggestion
- [ ] Flexibility via settings (accents right after character/accent at end of word)
- [ ] Support add new word to dictionary
- [ ] Flick input mode (for registering new word)
- [ ] Frecency algorithm?
References-Acknowledgement