(3) Designing an UI for the interactive query expansion.
Listing 4 puts all of this together to build an interactive query tool that asks the user to input a location name and returns a sortable list of results.