All Projects → javierhonduco → nebrija

javierhonduco / nebrija

Licence: other
A simple Ruby wrapper for the official Spanish dictionary (RAE)

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to nebrija

syng
A free, open source, cross-platform, Chinese-To-English dictionary for desktops.
Stars: ✭ 108 (+500%)
Mutual labels:  dictionary
webempresa
Repositorio de la Web Empresarial del curso Django (revisado en la versión 4.0.2 con Python 3.10.2)
Stars: ✭ 17 (-5.56%)
Mutual labels:  spanish
Narthex
Modular personalized dictionary generator.
Stars: ✭ 156 (+766.67%)
Mutual labels:  dictionary
technical-glossary
📝 A collaborative technical glossary for key words and terms to help anyone learn and understand concepts and prepare for a career as a creative technologist! 😕 > 🤔 > 💡 > 😊 🎉 🚀
Stars: ✭ 18 (+0%)
Mutual labels:  dictionary
ka GE.spell
ქართული ორთოგრაფიული ლექსიკონი - Georgian Spell Checking Dictionary
Stars: ✭ 24 (+33.33%)
Mutual labels:  dictionary
Splain
small parser to create more interesting language/sentences
Stars: ✭ 15 (-16.67%)
Mutual labels:  dictionary
jorkens
epub reader based on epub.js for foreign language learners
Stars: ✭ 35 (+94.44%)
Mutual labels:  dictionary
tudien
Từ điển tiếng Việt dành cho Kindle
Stars: ✭ 38 (+111.11%)
Mutual labels:  dictionary
alfred-duden
Search the duden.de German dictionary from Alfred. With auto-suggest.
Stars: ✭ 32 (+77.78%)
Mutual labels:  dictionary
prodict
Prodict, what Python dict meant to be.
Stars: ✭ 102 (+466.67%)
Mutual labels:  dictionary
alfred-powerthesaurus
Search Powerthesaurus synonyms and antonyms from Alfred
Stars: ✭ 81 (+350%)
Mutual labels:  dictionary
elasticsearch-croatian
Elasticsearch compatible Hunspell dictionary for Croatian.
Stars: ✭ 16 (-11.11%)
Mutual labels:  dictionary
mdict
node.js mdict (*.mdx, *.mdd) file reader
Stars: ✭ 39 (+116.67%)
Mutual labels:  dictionary
nzsl-online
New Zealand Sign Language Dictionary
Stars: ✭ 30 (+66.67%)
Mutual labels:  dictionary
Maat
Validation and transformation library powered by deductive ascending parser. Made to be extended for any kind of project.
Stars: ✭ 27 (+50%)
Mutual labels:  dictionary
cmu-pronouncing-dictionary
The 134,000+ words and their pronunciations in the CMU pronouncing dictionary
Stars: ✭ 46 (+155.56%)
Mutual labels:  dictionary
DictionaryUtils
iOS Dictionary Utilities for Swift - allowing you to pull properties from a dictionary using a string eg. data.readString("field[0].name")
Stars: ✭ 13 (-27.78%)
Mutual labels:  dictionary
the-road-to-learn-react-spanish
The Road to learn React - Spanish Translation
Stars: ✭ 57 (+216.67%)
Mutual labels:  spanish
qstardict
A read-only mirror
Stars: ✭ 55 (+205.56%)
Mutual labels:  dictionary
medict
medict a cross platform dictionary application,support mdict (*.mdx/*.mdd) dictionary format
Stars: ✭ 154 (+755.56%)
Mutual labels:  dictionary

Nebrija: A rae parser

Build Status Gem Version Code Climate

Installing

$ gem install nebrija

Usage

require 'nebrija'
res = Rae.search('word/id') # e.g. Rae.search('amigo')

puts res # prints the results

Rae#search returns a hash where the key status can be [error|success].

If the request is successful, the key type indicates whether the result type is a single word or multiple with [single|multiple].

The response data can be found in the response key which holds a hash with all the information.

An example on how to iterate over the info can be seen in the CLI code file:

Typeahead queries supported too! Rae#typeahed(word) returns an array of the suggestions.

CLI

$ nebrija <word>

If you feel it is too cumbersome to type, you can add an alias :)

Projects using this gem

Contributing

Feel free to submit any issue or PR 😃.

In order to test your changes:

# you can run the tests
$ bundle exec rake [test]
# run the CLI
$ bundle exec nebrija word-to-be-searched
# run the "debug" CLI, which pretty prints the resulting hash
$ bundle exec bin/debug word-to-be-searched

Additionally, you can get some debug traces in stderr via the NEBRIJA_DEBUG environment variable.

When set, it will output the requested word, the generated URL, and the HTTP status code that it got from the server. If you wish to see the returned body's output as well, you can set it to 2.

The tests are mocked so we run our tests using some already downloaded answers from rae.es. However, in some cases, one would like to bypass the mocks and use the real webpages instead. You can achieve that by setting the NO_MOCK env var when running your tests.

It was added as part as the continuous integrations testing with Travis. They introduced an amazing feature, 💛💚💙💖scheduled builds. Given that rae.es changes the way its auth method works from time to time, the tests without being mocked are run in a daily basis so we know if something is broken.

TODO

  • Make the parser more readable.
  • Improve the API.
  • Think on multiple responses and how to address them.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].