Aug. 17, 2010, 11:11 a.m.
posted by neverloop
Get the Facts at Yahoo! Reference
![]()
Yahoo! has collected several reference books into one site for easy research and fact-checking.
The Yahoo! Education site (http://education.yahoo.com) contains information about schools of every level across the United States. You can look up local elementary and high schools, read reviews by parents and students, or find degree programs at universities. As part of the mix, Yahoo! has put together a collection of publicly available reference sources called Yahoo! Research to help students with their own research.
Yahoo! Reference is available directly at http://reference.yahoo.com, or by typing reference! into any Yahoo! search form. At this site, you'll find a collection of reference books, from a dictionary and thesaurus to classics such as Bartlett's Familiar Quotations and The Columbia Encyclopedia. Yahoo! makes these books available online for free, saving you the cost of purchasing each of these books yourself. But be aware that Yahoo! includes advertising on each page. Luckily, the advertising is clearly marked with the word Advertising, so you won't confuse a Shakespeare sonnet with an ad for The Gap.
The Collection
Yahoo! Reference provides a single entry point for a collection of publicly available resources. Here's a look at the reference sources available:
The American Heritage® Dictionary, Fourth Edition
-
The dictionary gives you more than just a definition. It also provides an audio (WAV file) pronunciation guide and a link to a thesaurus entry for the defined word.
The American Heritage® Spanish Dictionary, Second Edition
-
The Spanish dictionary lets you type in either English or Spanish words and returns the appropriate translation. It does not, however, provide an audio pronunciation guide.
Roget's II: The New Thesaurus
-
The thesaurus provides a list of related words. But, since this is a web thesaurus, it also links each related word to that word's own thesaurus entry, letting you drill deeply in the population of related terms.
Columbia Encyclopedia
-
The encyclopedia is based on the single-volume reference book that was once the staple for many students, who used it for quick fact lookups. Although it does not have the depth or breadth of for-fee products such as MSN Encarta, it is a good starting point for research.
Bartlett's Familiar Quotations
-
The quotes are from the 10th edition, published in 1919. It has indexes alphabetized by authors and quotations, and searchable by keyword.
Gray's Anatomy of the Human Body
-
This electronic version is based on the 1918 edition. It provides descriptions of anatomical structures and 1,247 illustrations.
The Oxford Shakespeare
-
This electronic version of the complete works of William Shakespeare is based on the edition published in 1914. A complete text search of the works is available and returns the location of the search text, down to the line number of a specific play, sonnet, or other work.
World Factbook
-
The World Factbook is maintained by the U.S. Government and placed in the public domain. The Factbook provides facts about the countries of the world as well as flag drawings and 267 color maps. The audio pronunciation guide requires the Apple Quicktime plugin.
Conversion Calculator
-
This easy-to-use unit conversion tool lets you quickly convert values for area, length, volume, and mass.
By combining these sources into one site, Yahoo! has made it easy to search all of these sources at once. If you're putting together a paper about the planet Saturn, for instance, you can browse to http://reference.yahoo.com, type Saturn into the search form, choose All Reference from the drop-down menu, and click Search. You'll find a page of search results from these specific sources, as shown in Figure.
Search Results for "Saturn" at Yahoo! Reference
If you're doing academic work, these results can be more manageable than what you get from typing Saturn into the web search form at Yahoo!, and you'll know the information you find is from established reference books that have been used in the classroom for decades.
Programmatic Access
Yahoo! doesn't provide access to these reference books through its web services API, but with some attention to URLs and a look at the HTML, you can screen scrape any information you need from one of these sources. For example, searching the Yahoo! Bartlett's Familiar Quotations returns a list of quotes with the search word or phrase in a bulleted list. And a simple Python script can take advantage of the fixed web presentation style to create a quick list of results.
The code.
This script lets you retrieve a list of encyclopedia entries related to a search word argument passed to the script. The script builds a Yahoo! Research URL with the incoming term, downloads the HTML, separates the contents by HTML tag, and then prints out the results. The results can be collected in a text file to provide you with a number of quotations with a specific word or phrase.
Save the following code to a file called YahooQuotations.py:
#!/usr/bin/python
import sys
import urllib
def processline(quoteline):
tagstart = "<" # start of an HTML tag
tagend = ">" # end of an HTML tag
tagon = STOP
stringcollect = ""
for yahoochar in quoteline:
if (yahoochar == tagstart):
tagon = START
elif (yahoochar == tagend):
tagon = STOP
continue # Do not print the > character itself
if (tagon == STOP): # get everything between HTML tags
stringcollect += yahoochar
return stringcollect.strip( )
myword = str(sys.argv[1]) # word to search for in quotations
quotationurl = "http://education.yahoo.com/search/bfq?p="
searchword = quotationurl + myword
START = 1
STOP = 0
quoteon = STOP
f = urllib.urlopen(searchword)
for line in f.readlines( ):
if (line.find("<li>") > -1): # display quotation search results
quoteon = START
elif (line.find("<'/li>") > -1):
quoteon = STOP
print "==================="
elif (line.find("-end search") > -1): # ignore bullet points after
results
break
if (quoteon == START):
print processline(line) # print quotation without HTML tags
Running the hack.
To run the script, type the following at the command line:
YahooQuotations.py insert keyword
You should see a list of quotes matching the term you used. And by piping the results of the program to a text file, you can build a text file filled with quotes. If you're interested in finding famous historic quotations related to planets, you might run the script like this:
YahooQuotations.py planets > planets_quotes.txt
Figure shows the text file that was built with this command.
A text file filled with quotes from Yahoo! Reference
Even if you're not looking to automatically add quotes to a text file, you might find that the Yahoo! Reference web site will help you get a jumpstart on a school paper, teach you more about the world, or settle a bet between friends.
- Comment