meetDeveloper / freeDictionaryAPI

There was no free Dictionary API on the web when I wanted one for my friend, so I created one.
https://dictionaryapi.dev/
GNU General Public License v3.0
2.57k stars 259 forks source link

Synonyms for other languages (and antonym if its possible) #62

Closed JRamos29 closed 4 years ago

JRamos29 commented 4 years ago

Hi, It's possible to get the synonyms (and antonyms) for other languages? I tested all languages but just english show the synonyms.

meetDeveloper commented 4 years ago

There is some problem with other languages will fix that this weekend.

meetDeveloper commented 4 years ago

Are you using API v1 or v2?

JRamos29 commented 4 years ago

I'm using API v2. After the fix i will can get the synonyms for other languages? Tnks for the answer.

meetDeveloper commented 4 years ago

@JRamos29 Yes.

JRamos29 commented 4 years ago

Great! Hope you can implement that soon. Tnks in advance.

meetDeveloper commented 4 years ago

@JRamos29 Can you give me some word for which synonyms are coming in google but not in api?

JRamos29 commented 4 years ago

When you say 'google' what you mean? A general search in google or some specific tool like translator? By the way I haven't searched the words with google, i just tested the api with Postman, and the other languages doesn't have synonyms, just English. The API only gets synonyms if exists in google? What is the URL for search?

The examples bellow doesn't have synonyms, the array comes empty: French: mot - https://api.dictionaryapi.dev/api/v2/entries/fr/mot Portuguese-BR: palavra: https://api.dictionaryapi.dev/api/v2/entries/pt-BR/palavra

But this has the synonyms: English: word - https://api.dictionaryapi.dev/api/v2/entries/en/word

meetDeveloper commented 4 years ago

I made many changes to the API. Now it will return antonym and synonym for the words which have that on google. So I am taking data from google and others and if they have synonym I show synonyms.

meetDeveloper commented 4 years ago
Screenshot 2020-06-16 at 8 06 55 PM

The area under square that is one that I pick up. So if that is there, I will pick it up and show.

JRamos29 commented 4 years ago

Nice. But it's for English. I think that won't have for other languages, or not for all languages. But it's ok, i'll try another way to get the synonyms for other languages if not have in the API. Tnks.

meetDeveloper commented 4 years ago

For whatever word (and it shows for words not belonging to english also) google shows synonyms I will parse them and show it. I will try to find more sources for synonyms.

JRamos29 commented 4 years ago

When I search a word in google it brings the definitions in English only. Did you already published the changes?

meetDeveloper commented 4 years ago

Search for word dictionary in google and modify url to add hl=lang_code as query param. Then you will see the dictionary in that language. To get list of anguage code you can see the list on my website.

Like Spanish language code is es and so on.

On Tue, Jun 16, 2020, 10:42 PM JRamos29 notifications@github.com wrote:

When I search a word in google it brings the definitions in English only. Did you already published the changes?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/meetDeveloper/googleDictionaryAPI/issues/62#issuecomment-644896732, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXTH3HMCKCQQETRFTRSGADRW6RZFANCNFSM4NRGFU7A .

meetDeveloper commented 4 years ago

Synonyms are available for both English and other languages, and antonyms are available for languages other than English. Will make sure english also has antonyms soon. Closing this issue as this was for languages other than english. @JRamos29