0.0
No commit activity in last 3 years
No release in over 3 years
Oxford Advanced Learner's Dictionary Parser
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Oald Parser¶ ↑

Description¶ ↑

OALD Parser (Oxford Advanced Learner’s Dictionary Parser) is a simple gem providing access to one of the best online dictionaries for people studing English.

Installation¶ ↑

gem install oald_parser

Usage¶ ↑

To hide the complexity of parsing and searching words I provide a simple facade:

facade = OaldParser::Facade.create_configured_instance

It can be used this way:

text = facade.describe(word: 'dog') OR
text = facade.describe(str: 'a dog [CN]')

The ‘describe’ method returns plain text describing a word or a string.

Customizing¶ ↑

You can customize the behaviour of the facade by providing your own implemenation of one of the objects the facadeuses.

def self.create_configured_instance
  downloader = PageDownloader.new(URL)
  parser = PageParser.new
  formatter = Formatter.new
  extractor = WordExtractor.new
  Facade.new(downloader, parser, formatter, extractor)
end

Please, take a look at a spec file for more details.