Tech Support Websites

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 17 December 2010

Find meanings of a bunch of words at once with Google Spreadsheet

Posted on 07:40 by Unknown
A relative recently asked me if there was a quick way to find the meanings of a list of words all at once. I use & recommend WordWeb to look up difficult words but it takes one word/phrase a time.

I knew about the nifty GoogleLookup function in Google Spreadsheet that fetches "straightforward facts about specific things", but it does not fetch definitions from Google Dictionary as I had imagined. So, I turned to the ImportXML function to scrape the meaning of each word from Google Dictionary.


ImportXML() takes two input parameters URL & query. URL is the URL of the XML or HTML file from which information will be fetched while query represents the XPath query to run on the data given at the URL.


If you were manually looking for the meaning of pipsqueak on Google Dictionary, this is how the URL in your browser address-bar would look when you submit the request -
http://www.google.com/dictionary?q=pipsqueak&hl=en&langpair=en|en&spell=1&oi=spell


You'll notice that the word we submitted goes into a querystring value (q=pipsqueak). To automatically fetch definitions of multiple words at once, I placed the list of words in column A with the first one going into cell A2. In cell B2, I typed this formula -
=ImportXML("http://www.google.com/dictionary?aq=f&langpair=en|en&q="&A2&"&hl=en","//ul[@id='pr-root']")

If you look closely at that formula, you'll see that I inserted the cell number (A2) into the first argument of the function. Now, as we are interested in only the portion of the Google Dictionary page that shows the meaning of the word, we will grab only that content using a XPath query. The definition of the word is rendered in the HTML source code of the Google Dictionary page within an ordered list which has the value 'pr-root' for its ID attribute.
(click on image to enlarge)

After you finish typing the formula, press the Enter key & within a few seconds, the meaning of the word will get populated in the cell B2.

While the focus is on the cell B2, you can copy the formula to the rest of cells for which you want the definitions in column B by dragging at the edge of tiny blue box that appears at the bottom right corner of cell B2. This process will dynamically change the column A cell numbers in the formula & bingo......the meanings of the remaining words in column A will get populated in the column B.

(click on image to enlarge)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Google Docs | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Windows 8 keyboard shortcuts
    Win + X   - context menu to access common features like Control Panel, Task Manager, File Explorer, Programs & Features, Run, Search etc...
  • Dashboard-like info with Browser tabs, Windows 7 Taskbar tabs
    Browser tabs & Windows 7 Taskbar tabs are turning self-aware.  This is how my browser looked the other day: I had the summary of all tha...
  • The State Of HTML5 Video
    Key points from the  The State Of HTML5 Video  report by LongTailVideo (last updated on April 19, 2012): 75% of the desktop & mobile bro...
  • Archive tweets & favorites with Google Reader
    There are numerous ways to archive tweets but rather than use yet another tool, I prefer using Google Reader to preserve the tweets I mark ...
  • TWIL - Week #3
    This Week I Learned: New Azure VM Image Templates include SQL Server, BizTalk Server, and SharePoint Server (2013?) images . This can be han...
  • What is the difference between Browser Mode & Document Mode in IE
    If you're a web developer and your job actively involves building web pages that work the same in all browsers including the last three ...
  • My 30-day personal project - watch 100 hours of Pluralsight videos
    Inspired by Matt Cutts' 30-day challenges , I plan to watch 100 hours of Pluralsight online videos to get up-to-date with current ...
  • Azure in Pictures - overview of Windows Azure Features, Services and Common Uses
    Download the Windows Azure Poster in PDF format (1.1MB)
  • Indian comparison shopping sites
    Did you know, India has 120 million Internet users & the Indian e-commerce market is worth $7 billion ?  Travel accounts for over 80 per...
  • HOW TO dynamically generate a Word document with custom header & footer
    Way back in 2004, a project I was working on required a web page to be exported as a Word document (.DOC). Without relying on any components...

Categories

  • AJAX
  • Android
  • APIs
  • App
  • ASP
  • ASP.NET
  • ASP.NET-MVC
  • Azure
  • Azure SQL Database
  • AzureInPictures
  • Bing
  • Book Review
  • Bookmarklet
  • Browsers
  • C#
  • chart
  • Chrome
  • Cloud
  • CSS
  • CSS3
  • DidYouKnow
  • E-Commerce
  • Excel
  • FB
  • Fiddler
  • Firefox
  • Gadgets
  • GeoLocation
  • GMail
  • Google
  • Google Docs
  • Google Reader
  • Health
  • Hotmail
  • HOWTO
  • HTML
  • HTML/CSS
  • HTML5
  • Humor
  • Hyderabad
  • IE
  • IIS
  • India
  • Internet
  • IT
  • Javascript
  • jQuery
  • JSON
  • JSONP
  • Laptop
  • Learning Resources
  • Lists
  • Map
  • Metrics
  • Microsoft
  • miscellaneous
  • Mobile
  • NAPA
  • Office365
  • Opera
  • PDF
  • Performance
  • Personal
  • PHP
  • PM
  • PowerShell
  • Privacy
  • Programming
  • Rant
  • Safari
  • Science
  • Search Engines
  • SearchEngines
  • Security
  • SEO
  • Sharepoint
  • SharePoint2013
  • Silverlight
  • Software Engineering
  • Solutions
  • SQL Azure
  • SQL Server
  • TFS
  • Tip
  • Tips
  • Tools
  • Tools/Utilities
  • Trivia
  • TWIL
  • Twitter
  • UX
  • VM
  • VS.NET
  • VS2010
  • VS2012
  • WCF
  • WebApps
  • Websites
  • WF
  • Windows Phone
  • Windows7
  • Windows8
  • Word
  • WP7
  • WPF

Blog Archive

  • ►  2013 (112)
    • ►  October (16)
    • ►  September (14)
    • ►  August (8)
    • ►  July (8)
    • ►  June (13)
    • ►  May (12)
    • ►  April (12)
    • ►  March (8)
    • ►  February (15)
    • ►  January (6)
  • ►  2012 (127)
    • ►  December (11)
    • ►  November (14)
    • ►  October (13)
    • ►  September (14)
    • ►  August (16)
    • ►  July (16)
    • ►  June (6)
    • ►  May (5)
    • ►  April (11)
    • ►  March (12)
    • ►  February (7)
    • ►  January (2)
  • ►  2011 (98)
    • ►  December (5)
    • ►  November (2)
    • ►  October (5)
    • ►  September (7)
    • ►  August (7)
    • ►  July (15)
    • ►  June (10)
    • ►  May (7)
    • ►  April (8)
    • ►  March (10)
    • ►  February (11)
    • ►  January (11)
  • ▼  2010 (163)
    • ▼  December (14)
      • Book Review: Al Jaffee's Mad Life: A Biography
      • HOW TO sarcastically tell someone to google for th...
      • How Tynt Insight works
      • HOW TO make Gmail Labels act like Hotmail Folders
      • Hotmail tip - Move, Delete, Find emails originatin...
      • Free eBook: The Insider's Guide to Mobile
      • Track the most visited websites worldwide & by cou...
      • Find meanings of a bunch of words at once with Goo...
      • HOW TO find readability level of search results & ...
      • Manipulate PDF files for free with PDFRider
      • HOW TO use IIS 7.5 on Windows XP, Vista with Visua...
      • Do you live on the web?
      • Google Custom Search can let your prioritize results
      • The Stack Exchange network of Q&A sites is growing
    • ►  November (19)
    • ►  October (19)
    • ►  September (15)
    • ►  August (18)
    • ►  July (17)
    • ►  June (20)
    • ►  May (17)
    • ►  April (19)
    • ►  March (5)
Powered by Blogger.

About Me

Unknown
View my complete profile