Thread:Talk:Universal Language Selector/m x n language names/reply (6)

Thanks NeilK for the comments :) I initially though about doing it in Trie. Trie will be more effective if we have lot of common string prefix patterns. but in our case the strings are from multiple scripts, with practically no common prefixes. An easy way of creating buckets for strings from multiple scripts is using unicode code points.

And for typo-correction - it get triggered only when there is no result from normal prefix match. ie, It happens when there is nothing to autocomplete.