Tuesday, January 8, 2008

Full-Word Wildcards

from “Google Hacks” By Paul Bausch, Tara Calishain, Rael Dornfest_2006

Some search engines support a technique called stemming, in which you add a wildcard characterusually * (asterisk) but sometimes ? (question mark)to part of your query, requesting the search engine to return variants of that query using the wildcard as a placeholder for the rest of the word. For example, moon* would find moons, moonlight, moonshot, etc.

Google doesn't support explicit stemming. It didn't used to support stemming at all, but now it implicitly stems for you. So, canine dietary will yield results for dog diet, diets, and other variations on the theme.

Google does offer a full-word wildcard. While a wildcard can't stand in for part of a word, you can insert a wildcard (Google's wildcard character is *) into a phrase, and the wildcard will act as a substitute for one full word. Searching for tHRee * mice, therefore, finds three blind mice, three blue mice, three green mice, etc.

What good is the full-word wildcard? It's certainly not as useful as stemming, but then again, it's not as confusing to the beginner. * is a stand-in for one word; ** signifies two words, and so on. The full-word wildcard comes in handy in the following situations:

1. Checking the frequency of certain phrases and derivatives of phrases, such as: intitle:"methinks the * doth protest too much" and intitle: "the * of Seville"

2. Filling in the blanks on a fitful memory. Perhaps you remember only a short string of song lyrics; search using only what you remember rather than randomly reconstructed full lines.

3. Let's take as an example the disco anthem "Good Times" by Chic. Consider the following line: "You silly fool, you can't change your fate."

4. Perhaps you've heard that lyric, but you can't remember if the word "fool" is correct or if it's something else. If you're wrong (if the correct line is, for example, "You silly child, you can't change your fate"), your search will find no results and you'll come away with the sad conclusion that no one on the Internet has bothered to post lyrics to Chic songs.

5. The solution is to run the query with a wildcard in place of the unknown word, like so:

6. "You silly *, you can't change your fate"

7. You can use this technique for quotes, song lyrics, poetry, and more. You should be mindful, however, to include enough of the quote to find unique results. Searching for "you * fool" will glean far too many irrelevant hits.
blog comments powered by Disqus