Skip to content

pedro757/rae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAE spanish dictionary

A scrapping implementation of selenium for the spanish official dictionary

Getting Started

Installation

pip install rae_dle

Basic Usage

from rae_dle import Definitions

rae = Definitions()

word = rae.get_definition('hastiar')

print(word)

It will print out something like this:

[{
  'etimologia': 'Del lat. fastidiāre.',
  'acepciones': [
    '1. tr. Causar hastío. U. t. c. prnl.'
  ]
}]

Documentation

The Definition class contains the following methods:

get_definition(word: str) -> list[origins]:

Get the definition of the word provided from the official spanish dictionary, like RAE, this method will output the results in a list of origins for the word provided.

Look at this word for example. For the spanish word placar there are three origins based on the ethymology, one from latin and the other two from french

[
  {
    'etimologia': 'Del lat. placāre.',
    'acepciones': [
      '1. tr. desus. Aplacar, calmar, apaciguar.'
    ]
  }, {
    'etimologia': 'Del fr. plaquer.',
    'acepciones': [
      '1. tr. Dep. En rugby, detener un ataque, sujetando con las manos al
        contrario y forzándolo a abandonar el balón.'
    ]
  }, {
    'etimologia': 'Del fr. placard.',
    'acepciones': [
      '1. m. Arg. y Ur. armario empotrado.'
    ]
  }
]

TODO:

  • Support for verbs conjugation
  • Support specific tense conjugation e.g. participio
  • Support "adjetivos", "adverbios", and "locuciones verbales, adverbiales y adjetivas"

Contribuiting

Bug reports, feature suggestions and especially code contributions are welcome. You open a GitHub issue or pull request. Please read this document before opening an issue.

About

Scraping library for RAE dictionary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages