yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Search the Mac Dictionary by Definition


2m read
·Nov 3, 2024

Hey guys, this is Mac. Heads on with a video on a little app we made.

Now basically, what this app does is it lets you search the dictionary on your Mac for a definition instead of for a term. Because, if you hadn't already noticed, if you open up the dictionary app, which just comes with your Mac, and you type a word, for instance, let's say "look up," it says the definition is a stupid person.

I can look up the word "idiot," and it says the definition is also a stupid person. But if I look up "a stupid person," no results come up. Basically, it doesn't let you search by definition; it always lets you search by word. This is kind of frustrating, especially if you want to see all the words with the same definition.

For instance, let's say I wanted to find all the words that have a "stupid person" somewhere in their definition. I can't do that using the dictionary app, and that's where our app "Definition Search" comes in.

So all you got to do is open up Definition Search and type a phrase, for instance, "a stupid person," and it'll tell you all the words that contain this somewhere in the definition. So, for instance, if I go back into the dictionary app and let's say I search something in this list like "blockhead," indeed the definition is a stupid person. You know, you can see all these.

This is a really neat and easy way to find all the words with the definition. Now I'm just going to talk a little bit about how this actually works, how this app works, for all the programmers who are interested.

So basically, all this program does is it creates its own index of all the stuff in the Mac dictionary and then it searches that. Unfortunately, Apple has an API for looking up words in the dictionary by word, but just like their dictionary app, they actually have no API for looking up all the words with something in the definition.

So the app instead goes through and creates a database by, you know, brute forcing through the entire Mac dictionary. It creates a database with all the definitions and all the words. You can actually see this if you go up into the preferences of the app.

It'll talk about indexes and when the last index was made. Obviously, I ship an index with the app so you don't have to make one, but you can actually go ahead and start indexing, and it'll start regenerating a database. You can obviously cancel that or pause it or whatever.

So basically, this app just uses one of Apple's silly APIs and improves upon it to add functionality. I hope this was interesting to some of you, but anyway, thanks for watching, subscribe, and goodbye.

More Articles

View All
Khan Academy Ed Talk with Bob Hughes - Tuesday, March 23
Hi everyone, Sal Khan here from Khan Academy. Welcome to our Ed Talks live stream, which you could view as a flavor of our Homeroom live stream. Uh, and before we jump into a very exciting conversation with Bob Hughes, who’s the Director of K-12 U.S. Educ…
Make Chris Brown CRY! (Interactive)
[Music] Hey, thank you, thank you, thank you, everybody! Oh, thank you! How’s it going, guys? I apologize that the video quality isn’t better. I’m actually broadcasting from Kansas right now, which is where I grew up. I’ve been celebrating the fourth with…
Khan Academy for your youngest learners
Al Khan here from Khan Academy. Now, some of y’all, or hopefully many of y’all, are familiar with Khan Academy. We are a not-for-profit with the mission of providing a free, world-class education for anyone, anywhere. But one area that people are probabl…
How the Trump Election and Social Media Externalized America’s Dormant Hate | Oliver Luckett
If you look at any of the kind of countercultural theorists that came out of the ‘60s at Berkeley, the Neil Postman’s, the Theodore Roszak’s, they kind of fundamentally, even into the talking heads, they kind of fundamentally they meant something to me wh…
Multiplying 3-digit by 2-digit numbers: Error analysis | Grade 5 (TX TEKS) | Khan Academy
So we have a situation here where someone is attempting to multiply 586 * 43, and what we want to do together is figure out if they did this correctly or whether they made a mistake. And if they made a mistake, what step did they make a mistake on? Actual…
Critiquing Startup Mobile Apps with Glide CEO
So after many requests, we are finally going to be doing a mobile app review. We’re going to run through them, we’re going to figure out what feedback we have, what’s working well, and hopefully help you for all the mobile apps that you’re designing out …