Reverse autocomplete

Technology

Traditional autocomplete is such a powerful tool that it’s managed to work its way into most desktop and a significant number of web applications. Type a URL into your browser, and the address bar will offer suggestions for all of the URLs in your browsing history that begin with the text that precedes your cursor. Autocomplete works well, but it could be better.

László Kozma brought up a problem that tends to crop up in a number of scenarios: if you move the cursor back to correct or change part of the entry string, traditional autocomplete completely ignores any context to the right of the cursor. In some applications, this means everything to the right of the cursor is ignored and overwritten instead of being part of the search. In Safari, if you type anything between “www.” and “.com”, autocomplete fails entirely, offering no results unless you clear out everything to the right of the cursor.

One solution, which László termed “reverse autocomplete”, is to split the string at the cursor position and attempt to find matches for both anything after the first half and before the second half. Any matches that show up in both sets are the final autocomplete suggestions. The result is that if I type in “www.h|.com” (where my cursor position is represented by the “|” character) the smarter autocomplete might return “www.hackszine.com” as a suggestion but omit from telling me about “www.h-is-aitch.org”.

You can take it one step further and also match against the beginning and ends of the entire string. This solves a really common problem that I run into regularly when searching through a large contact list, say the typical corporate email system. If you don’t know the correct spelling of someone’s name, or if you only can recall initials, you can fill in the parts you know. The system would be smart enough to turn “J|S” into “Jason Striegel” instead of forcing you to page through a huge list of J names.

Reverse autocomplete

3 thoughts on “Reverse autocomplete

  1. andrew.turner.highearthorbit.com says:

    A note to PocketMap users – make sure and add Layers to your Maps to actually create pages in your PocketMap. Otherwise all the pages will be blank!

  2. razor pocket mod says:

    After I initially left a comment I seem to have clicked on the -Notify me when new comments are added- checkbox and from now on each time a comment is added I recieve 4 emails with the exact same comment. Perhaps there is a way you are able to remove me from that service? Kudos!

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK