ridicurious.com
Powershell

PowerShell : Get Synonyms using Online Thesaurus

Internet is very Powerful ! Lots of online API’s, Tools and Programs are available that will make your life easy. Today in this post I’ll discuss with you how to get Synonyms of a word using an Online Thesaurus API and Powershell.

What is a Synonym ?
A Synonym is a word or phrase that means exactly or nearly the same as another word or phrase in the same language

What is Thesaurus ?
A book that lists words in groups of Synonyms and related concepts.

HOW IT WORKS : 

  1. A word is passed in a HTTP request as a URL to an online Thesarus API in order  to receive an XML based response. (Using Invoke-WebRequest cmdlet)
  2. Do some Data mining from the XML reponse
  3. Plus, some magic 😉  ( Go to my Script to see the magic )
  4. You get Synonyms of the word which was queried, like in the below screenshot.

syn

GET THE SCRIPT : Click here to go to my GitHub gist to get the code.

HOW TO USE IT : 

Feed the Script the word(s) you want to query and the script will return you the Synonyms of those words

You can Also Filter the Synonyms using the Part of Speech

Or, you can Check Available Part of Speech’s  in the Thesaurus.

And in case you feed in a word that is not available in Thesaurus you will get a 404 Not Found Error like in the below screenshot.

Hope you guys find this post useful, Stay tuned for more fun !

Thank you for Stopping by 🙂

Related posts

Powershell Module for Microsoft Cognitive Services

Prateek Singh
8 years ago

PowerShell : Get Disk Utilization of DPM 2010 Server

Prateek Singh
9 years ago

Book Update: PowerShell Guide to Python is 90% Complete

Prateek Singh
5 years ago
Exit mobile version