Module Outline

Use the following resources and work with your mentor to master the objectives for this module. Practice by completing the Mini-Project, Project, and Challenges.

Stretch Problem

    Challenge: Fuzzy Search

    Build a Fuzzy Search against the Webster's Dictionary. Fuzzy Search allows you to search for terms with similar characters, not necessarily in the same order. A fuzzy matching program can compensate for common input input typing errors. As an example, press Command + Shift + O in an Xcode project and start typing. Notice how the results are not necessary exactly what you've typed into the search box. This is an example of Fuzzy Search.

    Steps: 1. Create a new single view application 2. Add the Word List JSON dictionary found on Github to the project (https://github.com/adambom/dictionary/blob/master/dictionary.json) 3. List all words in the table view 4. Use a Search Controller to allow searching the words 5. When filtering your results for the search term, write an algorithm that will enable fuzzy search results.

    When you are finished, compare your fuzzy search algorithm with 2 other students in class. Discuss the pros and cons of each approach. Identify at least 3 areas to improve your algorithm.

    Hints: * Timeline as Search Controller example * Swift String .characters property

    ♦ Black Diamond

    • Sort your search results by best match in your algorithm
    • Add a detail view controller that displays the definition of the word
    • Use Table View sections to separate words beginning with each letter of the alphabet
    • Add an Index List on the right hand side (similar to the alphabetical control in Contacts) for quick navigation
  • Hint

Project

Mastery Review

Module 44 - Capstone Project Supplementary Activities
  • Expand all
  • Collapse all
  • Challenge: Fuzzy Search stretch problem