demo / 003Trie type-ahead
Autocomplete type-ahead implemented as a trie tree over 10,000 common English words. Candidates are ranked by word frequency and how often they follow the previous word. Frequency is counted with a bigram table.
Reduced motion is on: running with its motion off.- Notes
- It types a sentence by itself, taking each word as soon as it's suggested; tap the sentence to take over. The gray letters finish the word you're on: Tab or the green button accepts them, and PageUp/PageDown or a tap on another word picks a different match.
- Credits
- Part of a front-end data-structures collection; the trie is @tristimb/data-structures. Next-word counts from Tatoeba (CC BY 2.0 FR).