Open clvLabs opened 5 years ago
It goes even further...
$ docker run squat/drae define mono
[{"word":"mono","etymology":"De mona1, y este quizá acort. de maimona, f. de maimón1 'mico'.","definitions":[{"category":"adjetivo coloquial","definition":"Dicho de una persona De aspecto agradable ...
$ docker run squat/drae define monete
[{"word":"monete","etymology":"De mona1, y este quizá acort. de maimona, f. de maimón1 'mico'.","definitions":[{"category":"adjetivo coloquial","definition":"Dicho de una persona De aspecto agradable ...
@clvLabs so sorry I missed this notification from last year 😱! What would you like to see as the handling for this case? Should draw warn that the spelling has been corrected? Thank you for filing this issue :))
Ah, or simply replace the "word" field with the corrected one returned by RAE :+1:
When searching for words with accent marks, there's an odd behaviour:
ficción
), everything works as expectedficcion
) the accent mark has been omitted and the search engine manages to find it anyway :+1: . But the returned object includes the wrong spelling in theword
fieldfíccion
) a wrong accent mark has been added and the same thing happensPeekin'round the code found that the word used to generate the returned object is the same received by parameter - define.go:127
Haven't gone thru the scraping details, but I guess the correct word spelling will be in the returned document.
It would be a very nice feature to have (I use drae very frequently) since sometimes I don't feel confident about having the spelling right even if I check the dictionary (so I have to go to the official site)
BTW, thanks a lot for drae!!!!