Why I built a dictionary app

even with more than +300 apps available at AppStore?
By Zeh Fernandes · 5 min read

This story begins the same way as with every other app: with a problem. I was reading Dune, and my goal was to finish before the movie release. I'm not a native English speaker, and most of my english vocabulary is related to work and social life. So I was having a hard time understanding all the poetry the book manages to deliver. So it came to my mind using one of the gorgeous technologies humans have produced: the dictionary.

Since I'm a son of the Information Age, I went to AppleStore looking for what has been made of Samuel Johnson's legacyNot really the inventor of the dictionary but the well famous for combine alphabetic and topic order. However, I couldn't believe that none of the available options satisfied what I expected from a dictionary app.

I promise I didn't have my expectations too high, I only had a few core principles:

  • Offline support We live in the era of distraction. If you need to keep your phone around to search for words, maintaining an internet connection is an invitation to switching to WhatsApp after each paragraph.

  • Fast You already feel bad about leaving the book or article you're reading, so the search should feel like its instantaneous, with no perceived loading time. The utopia is to have an interaction that happens at the speed of thought.

  • Store knowledge Each word you search is an opportunity to increase your vocabulary, but if you don't write the word or can't consult the history, this opportunity is being thrown away.

  • Noise Free It's incredible how many distractions this kind of app usually has: extra clicks, unnecessary features, rectangular ads, and too many typography styles.

  • No Lock-in This principle comes from the local-first software movement: users taking back data ownership so they can export and manipulate what they have created.

  • Good dataset Talking with some linguistics friends, not every dictionary is a good dictionary. They have their own editorial purposes and different goals. Modern dictionaries tend to be more functional, less specific, and squeeze the word to get few meaningsThe New Oxford, for the word “fustian,” gives “pompous or pretentious speech or writing.”

    Webster’s definition: “An inflated style of writing; a kind of writing in which high-sounding words are used, above the dignity of the thoughts or subject; bombast.”

    https://jsomers.net/blog/dictionary
    . Others have a more poetic and playful language, suitable for writers and native speakers.

——

With this in mind, I sat down in front of my desk and started to create a schema of what could be this perfect dictionary app.

Mission accepted:

After having this glimpse of the future, I couldn't stop myself from wishing for this app, a poison that every creator has already sipped from. So I started my mission and discovered that the problem was trickier than I thought... but we will get there.

The data

I started searching for reliable data for the dictionary; Turns out it's not as simple as it appears. Most free dictionaries I tested define hello as "see Halloo" (oh no!). After reading some articles, I landed on the freeDictionary API that uses the Wiktionary as a source.

Because I needed the data offline, it wasn't ready to plug into my react-native app, but it was a start. So I created a script to download the definitions of the most 300.000 common words in English and insert them into an SQLite database. To avoid being blocked by so many requests, I kept my computer awake for 30 hours straight to download all the definitions. See the script doing all the hard work:

Test the speed

Now I had the db.sql with the English words and definitions.

I was worried about the speed of react-native querying a 21MB SQLite database. It turns out I shouldn't be worried — the big advantage of following a local-first approach is relying on the device's speed. My first demo and happy moment in the journey. A simple input text searching words.

Cursor navigation

Now the next challenge and, personally, the most exciting part of the UI: using the cursor to navigate between words. This allows you to have real-time results when you write a word or when you are navigating back and forthUsing a text input allow you to hold and move the cursor with the keyboard in the note you have already populated.

with some magical ifs, but it worked :)

Polish and layout

Time to craft and polish the app's look and feel. Nothing particularly special, only sit and working on the details:

  • Choose a typography that it's suitable for reading and writing;
  • Pick a color scheme for light and dark mode.
  • Create the setting and the list page.
  • Make sure to calculate the height of the keyboard and keep both areas (input and result) always visible.

Back to the dataset

Things are going pretty well. But when I started looking for multiple languages support, besides English, Wiktionary didn't work anymore. For the other languages, the dataset is incomplete.

As I started looking at alternatives, I realized that the main challenge of having a good dictionary app isn’t tech or design; it is the license models of the companies that maintain and sell dictionaries. All pricing and licensing models I found so far are API based; they charge per call and forbid you to cache the result. When there's the option to license an offline dataset, the prices skyrocket. For example, Oxford only allows offline datasets in the enterprise model with a cost minimum of £3000.

Creating and maintaining a dictionary is a lot of work and should be well recognized. Webster took years and a lot of loans to get his version published Image of a RhinocerosNoah Webster took 26 years to complete his version of english dictionary . I acknowledge and understand why such great work has to be charged. What I question here are models that are against good UX practices (like no caching), considering how essential a dictionary data is for human learning and AI models. Shouldn't quality datasets be available for free and for fast access? Supported by ONG or non-profitable models?

Version 1.0

Even though I still don't have the dataset license model 100% figured out, I'm making the home-cooked app that I dreamed of available for general use. It is also open-source so all contributions are welcome.

A personal software to keep the words you read in a book, see on a trip, learn in a class, or hear in the street. Instant knowledge, always with you since it syncs with iCloud and Google Drive (good pitch han?).

More to come

As with every product, after some beta users feedback (i.e. my girlfriend) and my own use, I already have a bunch of ideas on how to make it even more special.

Flashcards
It would be nice to have an in-app flashcard mode to help you review and memorize the words you took note of, without the need to export to practice.

Expandable system
The framework of splitting the screen between the note and the word definition is powerful. Google maps does this very well when you are searching for places. So why not to expand the possibilities and allow you to navigate between different results for that word? For example: Translations, user definitions, contextual uses.



——

Thank you for bearing with me on this journey and through this text. If you liked it and want to support the app, go to Github and become a sponsor. I appreciate it, and it keeps me moving forward onto upgrading and making it even better.



Download now and start collecting words

Download at Google PlayDownload at App StoreGet the source code