-
Notifications
You must be signed in to change notification settings - Fork 0
UI component
Werkov edited this page Mar 13, 2012
·
2 revisions
- only plain text editing
- multi-line mode (single line mode if necessary)
- show debug/test information
- (conditional) probabilities of suggestions
- partial/complete suggestion
- minimize number of keystrokes
- "accept" keys:
<space>,<tab>,<enter>, sentence delimiters- sentence delimiters must not be parts of "normal" words
- beware of hyphen -- others determine by user testing/statistics
- basic set:
[,\.:;"'\?!]
- allow suggestion of partial tokens
- e.g. merging multiple suggestions with same prefix into one
- idea: accept keys dependent on context (left right quotes, parentheses etc.)
- "accept" keys:
- must handle block text operations (clipboard), text navigation (editing not at the end) and deletion
- inherits behavior of standard text editing component (on desktop environments)
- accepting suggestions
- suggestion accepted by basic set are appended with the acceptance char + space
- suggestion accepted by
<space>are appended with a space - suggestion accepted by
<tab>,<enter>are appended with a space (separate point as I hesitate with this behavior) - partial suggestions accepted by arbitrary key are filled just as are w/out any appendix
- merging/grouping suggestions
- group suggestions with lowest probabilities into groups with the same prefix and create partial suggestion from this prefix
- TODO analysis whether grouping is favorable and criteria for grouping instead of separation
- component requires tokenizer
- output: context (list of tokens) + prefix (partial token), whole text (string)
- input: list of suggestions from model (token + (conditional) probability)
- events:
- keyPressed -- to update list
- blockInserted/blockDeleted -- to re-tokenize whole text and get new context of current position
- cursorMoved -- to update context