Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Show matching words in Dictionary with a wildcard Apps
I was looking for some help playing the game WordBreaker on my iPhone and discovered that OS X's Dictionary program can help you find matching words given a set of letters. For example, enter ?oat, and Dictionary will give you a series of words like boat, coat, and goat. Very handy for crosswords, too.

[robg adds: In testing this, it seems you can use only one wildcard per word. Also, I was able to get slightly different results using different non-alpha characters. Using bea?, Dictionary returned eight matches, but bea! only returned seven. You can also use the wildcard within a word; b?ar shows both bear and boar. Based on how this works, I'm not sure if it's a bug or a feature -- Dictionary's Help says nothing about it at all.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[9,889 views]  

Show matching words in Dictionary with a wildcard | 11 comments | Create New Account
Click here to return to the 'Show matching words in Dictionary with a wildcard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Show matching words in Dictionary with a wildcard
Authored by: marioestrada on Jul 11, '07 08:23:33AM

Didn't work for me :( ...

---
mario



[ Reply to This | # ]
Me either
Authored by: googoo on Jul 11, '07 08:48:37AM

This does not work for me either! If I use a question mark, it only suggests the word made with the question mark omitted. For example, entering ?oat causes the dictionary to suggest oat but nothing else. I tried other possible wildcard characters (*, !, .), but nothing worked.

-Mark



[ Reply to This | # ]
Don't think those are treated as wildcards
Authored by: jecwobble on Jul 11, '07 08:50:27AM
I don't think "?" or "!" are being treated as wildcards.First off, I replaced those two characters with various other specials characters (#$%^&*-_) including the parenthesis, and got the same results. Second, notice what Dictionary says when you do this: "No entries found. Did you mean?" That tells me it's looking at these entries as misspelled words and using some algorithm to find near matches while disregarding the unusual characters.

For instance, "b?ar" and "b ar" returned the same results: bar; bear; boar. However "?oat" and " oat" returned different results; the latter returning more results and only words beginning "oat".

[ Reply to This | # ]

Don't think those are treated as wildcards
Authored by: jecwobble on Jul 11, '07 08:52:21AM

Also, compare the results of "?oat" with "qoat"...



[ Reply to This | # ]
Show matching words in Dictionary with a wildcard
Authored by: LightYear on Jul 11, '07 09:06:56AM

Yep, it just using its standard spelling suggestion algorithm. The question mark does not help.

Warning: Plugging my own (free) software here...

If however, you are after a word suggestions based on supplied letters and unknown letters, check out the Dashboard Widget XwordLookup.

---
* Nothing is foolproof to a sufficiently talented fool *



[ Reply to This | # ]
Show matching words in Dictionary with a wildcard
Authored by: Nem on Jul 11, '07 10:32:00AM

Of course, for the command line junkies, there's a more more powerful and flexible way to do this:

egrep "^.oat$" /usr/share/dict/words

Leave the carat (beginning of line) and dollar sign (end of line) and replace the chars inbetween. For crossword puzzles, just replace a missing letter with a period (as many as you like).

By using a question mark, you can even find words that may or may not have a characters (like an 's' in 'hints' - 'hints' won't appear, but 'hint' will):

egrep "^hint.?$" /usr/share/dict/words

I'm sure somebody could whip up a quick Applescript for this.

---
Nem W. Schlecht
http://geekmuse.net/



[ Reply to This | # ]
make this command easier to use with an alias
Authored by: hayne on Jul 11, '07 08:44:03PM
I use the following Bash alias (set up via my ~/.profile):


findword () { /usr/bin/grep ^"$@"$ /usr/share/dict/words ; }

Sample usage:


% findword '.oat'
boat
coat
doat
goat
moat
toat

% findword 'oat...'
oatbin
oatear
oathay
oathed


[ Reply to This | # ]
Show matching words in Dictionary with a wildcard
Authored by: jksellors on Jul 11, '07 10:34:33PM
Here is a short Applescript:
set theWords to text returned of (display dialog "Please enter grep request." default answer "^.oat$" with icon 1)
display dialog (do shell script "egrep " & theWords & " /usr/share/dict/words")


[ Reply to This | # ]
Show matching words in Dictionary with a wildcard
Authored by: bkemper on Jul 12, '07 08:58:45PM

Pretty good tip. It seems to require single quotes instead of double though. Like this:

egrep '^.oat$' /usr/share/dict/words

or for all words ending in "oat" (including the word "oat"):

egrep '^.*oat$' /usr/share/dict/words



[ Reply to This | # ]
Show matching words in Dictionary with a wildcard
Authored by: sjmills on Jul 11, '07 07:21:03PM

If it were an actual feature, I would expect it to treat ? as a single character wildcard and * as 0 or more characters wildcard, a la regex.



[ Reply to This | # ]
Show matching words in Dictionary with a wildcard
Authored by: primitivehuman on Jul 15, '07 02:30:11PM
I found a useful application by Sheehan Olver called Crypt 550. It supports many different ways to find a dictionary match. You can use numbers like this "1001" to return :

anna
boob
deed...

You can use expressions like this "*ism" to return:

deism
prism
autism...

It uses the hyphen as a substitute for the question mark.

His open source program is available at the University of Minnesota's website here: http://www.tc.umn.edu/~olve0003/crypt550.html

[ Reply to This | # ]