The project is in a healthy, maintained state
TheFreeDictionary is a gem that fetches information about words from https://www.thefreedictionary.com/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

TheFreeDictionary

Build Status

TheFreeDictionary is a versatile Ruby library that fetches information about words from various languages. It retrieves the pronunciation link (audio) and the transcription for a given word from The Free Dictionary website.

Features

  • Fetches audio pronunciation links
  • Retrieves phonetic transcription of words
  • Supports multiple languages including English, French, German, Italian, Russian, Spanish, and Chinese

Installation

Add this line to your application's Gemfile:

gem 'the-free-dictionary'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install the-free-dictionary

Usage

Here's a quick example to get you started:

require 'the_free_dictionary'

dictionary = TheFreeDictionary::English.new
result = dictionary.find('glossary') 
# {
#  :sound => "https://img2.tfd.com/pron/mp3/en/US/st/stdyd3sjsssydsstykgk.mp3",
#  :transcription => "ˈɡlɒsərɪ"
# }

Supported Languages

TheFreeDictionary provides classes for different languages:

  • TheFreeDictionary::English
  • TheFreeDictionary::Spanish
  • TheFreeDictionary::French
  • TheFreeDictionary::German
  • TheFreeDictionary::Italian
  • TheFreeDictionary::Russian
  • TheFreeDictionary::Chinese

Each class has a find method that takes a word as an argument and returns a hash with :sound and :transcription.