Semantic Icons

Writing

How to find an icon without knowing its name

3 min read searchretrievalicons

How do you find an icon when you do not know what it is called?

Search the way you would say it. A prose search engine reduces your sentence to word stems, scores every icon on its phrase, keywords and category, and ranks the best match first. You never need the file name. A good set carries about fifteen keywords per icon so ordinary words reach it.

You need an icon for a form that failed to send. You open the icon library, and it asks you for a name. So you guess. You try error, then warning, then alert, then exclamation. One of them works. Three of them waste a minute each.

This is the ordinary way to use an icon set, and it is backwards. You know what you mean. The library makes you guess how somebody else filed it.

Nearly every icon library indexes on one string: the file name. A few add a short list of aliases. So bell might also answer to notification, but not to let me know when it is done.

That fails in three ordinary cases.

  • You know the concept, not the word. You want the thing that means this took too long. Is it clock, hourglass, timer, or stopwatch?
  • Your word is not their word. You say bin. They filed it as trash. You say torch. They filed it as flashlight.
  • You are describing a situation, not an object. The baby needs a nappy change is not a noun. No file name matches it.

What prose search does instead

A prose search engine treats your sentence as a query, not as a key. The steps are ordinary information retrieval, applied to a small set.

  1. Reduce the words. Drop the stopwords. Fold each remaining word to its stem, so leaves and leaf meet, and running and run meet.
  2. Score every mark. Each icon carries a phrase, a category and a list of keywords. A hit on the phrase is worth more than a hit on a keyword, which is worth more than a hit on the category.
  3. Weight by rarity. A term that only two icons hold tells you far more than a term that four hundred icons hold. Multiply each hit by the rarity of the term.
  4. Reward coverage. An icon that answers four of your five words beats one that answers one word very strongly.

The result is a rank, not a lookup. There is always a best answer, and there is a score you can threshold on.

Keywords are the part that decides it

The scoring is the easy half. We measured this directly on our own set. A grid search over every scoring weight moved the result from 50 correct answers to 51, out of 64 test phrases. Adding keywords moved it from 50 to 63.

The lesson is blunt. Retrieval quality lives in the tags, not in the formula. An icon with four keywords cannot be found by a sentence, however clever the ranker. An icon with fifteen keywords can.

Keywords per iconWhat a reader can ask
1 to 3The file name, and near misses
4 to 8Common synonyms
12 to 20Situations, verbs, and plain sentences

Our set averages about 17 keywords per icon across 3000 icons.

What to check before you adopt a set

Try these four searches in any library you are considering. None of them names an object.

  • the meeting is about to start
  • put the kettle on
  • somebody is at the door
  • this took too long

If the library returns nothing useful, its index is a file name list. That is fine, as long as you know it, and as long as you are willing to keep guessing.

Questions people ask

Does prose search need a model?

No. The search in this page is a lexical ranker. It runs in the browser over a static index, with no request and no key. A model helps for meaning that words miss, but it is a second layer, not the first.

Fuzzy search fixes spelling. It matches notifcation to notification. It does not match let me know to bell. The two solve different problems, and a good set wants both.

How many keywords should an icon carry?

Aim for at least twelve, and expect fifteen to twenty. Write the situations a reader would describe, not more synonyms for the object. Two words for the object and thirteen for its uses beats fifteen synonyms.

Can I search offline?

Yes, if the index ships with the package. A 3000 icon index with full keywords is a few hundred kilobytes compressed, which is small enough to hold in a page or in a CLI.

Search 3000 icons with a sentence

Ask for an icon the way you would say it.

Try the search