Parser for Oxford Learners Dictionary.
It parses http://www.oxfordlearnersdictionaries.com/ and return the definition(s) of the word you're looking up.
Classification (verb, noun, adverb, etc) with its definition(s) and word of the day.
Definitions including example(s) and Recent Popular searches.
Including picture and pronunciation (American(NAmE) and British(BrE)).
Usage, e.g. when looking for 'car', it'll also provide information about 'having a car', 'driving a car', etc.
Please let me know :)
Add this line to your application's Gemfile:
# Add to your Gemfile
gem 'oxford_learners_dictionaries'
# or install manually
gem install oxford_learners_dictionaries
And then execute:
$ bundle
# Creates object
word = OxfordLearnersDictionaries::English.new("car")
# Goes to the dictionary and parse its data
word.look_up
word.definition
=> {
:definition_0 => "a road vehicle with an engine and four wheels that can carry a small number of passengers",
:definition_1 => "a separate section of a train",
:definition_2 => "a coach/car on a train of a particular type"
}
# Gets word of the day and short definition
word_of_the_day = OxfordLearnersDictionaries::WordOfTheDay.new
=> "pragmatic"
=> "solving problems in a practical…"
# Get the full definition
word_of_the_day.look_up
=> {:definition_0=>"solving problems in a practical and sensible way rather than by having fixed ideas or theories"}
- Fork it ( https://github.com/fpgentil/oxford_learners_dictionaries/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request