OxfordLearnersDictionaries Parser
Parser for Oxford Learners Dictionary.
It parses http://www.oxfordlearnersdictionaries.com/ and return the definition(s) of the word you're looking up.
Features
v0.1
Classification (verb, noun, adverb, etc) with its definition(s) and word of the day.
v0.2
Definitions including example(s) and Recent Popular searches.
v0.3
Including picture and pronunciation (American(NAmE) and British(BrE)).
v0.4
Usage, e.g. when looking for 'car', it'll also provide information about 'having a car', 'driving a car', etc.
Further versions
Please let me know :)
Installation
Add this line to your application's Gemfile:
gem 'oxford_learners_dictionaries'
gem install oxford_learners_dictionaries
And then execute:
$ bundle
Usage
Example 1
# 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"
}
Example 2
# 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"}
Contributing
- Fork it ( https://github.com/[my-github-username]/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