freeDictionaryAPI icon indicating copy to clipboard operation
freeDictionaryAPI copied to clipboard

Missing synonyms and antonyms

Open RealRong opened this issue 3 years ago • 12 comments

Hello! I noticed that the source of this great dictionary api has been changed to wiktionary.org. But why synonyms and antonyms are missing? Now the result is like this

[
    {
        "word": "hello",
        "phonetics": [
            {
                "audio": "https://api.dictionaryapi.dev/media/pronunciations/en/hello-au.mp3",
                "sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=75797336",
                "license": {
                    "name": "BY-SA 4.0",
                    "url": "https://creativecommons.org/licenses/by-sa/4.0"
                }
            },
            {
                "text": "/həˈləʊ/",
                "audio": "https://api.dictionaryapi.dev/media/pronunciations/en/hello-uk.mp3",
                "sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=9021983",
                "license": {
                    "name": "BY 3.0 US",
                    "url": "https://creativecommons.org/licenses/by/3.0/us"
                }
            },
            {
                "text": "/həˈloʊ/",
                "audio": ""
            }
        ],
        "meanings": [
            {
                "partOfSpeech": "noun",
                "definitions": [
                    {
                        "definition": "\"Hello!\" or an equivalent greeting."
                    }
                ]
            },
            {
                "partOfSpeech": "verb",
                "definitions": [
                    {
                        "definition": "To greet with \"hello\"."
                    }
                ]
            },
            {
                "partOfSpeech": "interjection",
                "definitions": [
                    {
                        "definition": "A greeting (salutation) said when meeting someone or acknowledging someone’s arrival or presence.",
                        "example": "Hello, everyone."
                    },
                    {
                        "definition": "A greeting used when answering the telephone.",
                        "example": "Hello? How may I help you?"
                    },
                    {
                        "definition": "A call for response if it is not clear if anyone is present or listening, or if a telephone conversation may have been disconnected.",
                        "example": "Hello? Is anyone there?"
                    },
                    {
                        "definition": "Used sarcastically to imply that the person addressed or referred to has done something the speaker or writer considers to be foolish.",
                        "example": "You just tried to start your car with your cell phone. Hello?"
                    },
                    {
                        "definition": "An expression of puzzlement or discovery.",
                        "example": "Hello! What’s going on here?"
                    }
                ]
            }
        ],
        "license": {
            "name": "CC BY-SA 3.0",
            "url": "https://creativecommons.org/licenses/by-sa/3.0"
        },
        "sourceUrls": [
            "https://en.wiktionary.org/wiki/hello"
        ]
    }
]

RealRong avatar Feb 18 '22 16:02 RealRong

Same here!

Old verison was really good, there was:

+ GOOD transcription in data.phonetic in 99% of cases + really good audio file with a good GB pronunciation in data.phonetics[0].audio + arrows of synonyms and antonyms

Now in new version

- NO transcription in data.phonetic in half of the words (as you can see above) - Alot of the data.phonetics[0].text = undefined (as you can see above) - BAD audio file with different voices in data.phonetics[0].audio - NO arrows of synonyms and antonyms

Can we have old version from dictionary too? Because new version is so inconsistent

Old version of the word 'hello'

[
  {
    "word": "hello",
    "phonetic": "həˈləʊ",
    "phonetics": [
      {
        "text": "həˈləʊ",
        "audio": "//ssl.gstatic.com/dictionary/static/sounds/20200429/hello--_gb_1.mp3"
      },
      {
        "text": "hɛˈləʊ"
      }
    ],
    "origin": "early 19th century: variant of earlier hollo ; related to holla.",
    "meanings": [
      {
        "partOfSpeech": "exclamation",
        "definitions": [
          {
            "definition": "used as a greeting or to begin a phone conversation.",
            "example": "hello there, Katie!",
            "synonyms": [],
            "antonyms": []
          }
        ]
      },
      {
        "partOfSpeech": "noun",
        "definitions": [
          {
            "definition": "an utterance of ‘hello’; a greeting.",
            "example": "she was getting polite nods and hellos from people",
            "synonyms": [],
            "antonyms": []
          }
        ]
      },
      {
        "partOfSpeech": "verb",
        "definitions": [
          {
            "definition": "say or shout ‘hello’.",
            "example": "I pressed the phone button and helloed",
            "synonyms": [],
            "antonyms": []
          }
        ]
      }
    ]
  }
]

Poccu avatar Feb 19 '22 01:02 Poccu

Definitely an old version of the API is needed. Even my app started failing due to missing properties

saideepd avatar Feb 19 '22 15:02 saideepd

My app started breaking due to the absence of synonyms and antonyms. The old version was really better than this.

AmoabaKelvin avatar Feb 22 '22 20:02 AmoabaKelvin

The new api versions' result has changed from the old one. This is causing a lot of inconsistency.

sanzog03 avatar Feb 27 '22 11:02 sanzog03

My app started having errors because of this change too. The new one should be introduced as version 3, while the old version should be preserved as version 2.

mak-skid avatar Mar 01 '22 10:03 mak-skid

I added synonyms and antonyms, can you tell me any other things that are breaking your implementation?

meetDeveloper avatar Mar 04 '22 21:03 meetDeveloper

I can see that antonyms and synonyms have been added, however, they are just empty lists. Tried it for the words, happy; sad; jump. Here is the response when the search was for sad.

[
  {
    "word": "sad",
    "phonetic": "/sæd/",
    "phonetics": [
      {
        "text": "/sæd/",
        "audio": "https://api.dictionaryapi.dev/media/pronunciations/en/sad-1-us.mp3",
        "sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=1157595",
        "license": {
          "name": "BY-SA 3.0",
          "url": "https://creativecommons.org/licenses/by-sa/3.0"
        }
      }
    ],
    "meanings": [
      {
        "partOfSpeech": "verb",
        "definitions": [
          {
            "definition": "To make melancholy; to sadden or grieve (someone).",
            "synonyms": [],
            "antonyms": []
          }
        ]
      },
      {
        "partOfSpeech": "adjective",
        "definitions": [
          {
            "definition": "(heading) Emotionally negative.",
            "synonyms": [],
            "antonyms": []
          },
          {
            "definition": "Sated, having had one's fill; satisfied, weary.",
            "synonyms": [],
            "antonyms": []
          },
          {
            "definition": "Steadfast, valiant.",
            "synonyms": [],
            "antonyms": []
          },
          {
            "definition": "Dignified, serious, grave.",
            "synonyms": [],
            "antonyms": []
          },
          {
            "definition": "Naughty; troublesome; wicked.",
            "synonyms": [],
            "antonyms": []
          },
          {
            "definition": "Unfashionable; socially inadequate or undesirable.",
            "synonyms": [],
            "antonyms": [],
            "example": "I can't believe you use drugs; you're so sad!"
          },
          {
            "definition": "Soggy (to refer to pastries).",
            "synonyms": [],
            "antonyms": []
          },
          {
            "definition": "Heavy; weighty; ponderous; close; hard.",
            "synonyms": [],
            "antonyms": [],
            "example": "sad bread"
          }
        ]
      }
    ],
    "license": {
      "name": "CC BY-SA 3.0",
      "url": "https://creativecommons.org/licenses/by-sa/3.0"
    },
    "sourceUrls": [
      "https://en.wiktionary.org/wiki/sad"
    ]
  },
  {
    "word": "sad",
    "phonetics": [],
    "meanings": [
      {
        "partOfSpeech": "noun",
        "definitions": [
          {
            "definition": "The letter ص in the Arabic script.",
            "synonyms": [],
            "antonyms": []
          }
        ]
      }
    ],
    "license": {
      "name": "CC BY-SA 3.0",
      "url": "https://creativecommons.org/licenses/by-sa/3.0"
    },
    "sourceUrls": [
      "https://en.wiktionary.org/wiki/saad",
      "https://en.wiktionary.org/wiki/sad"
    ]
  }
]

They are all empty lists, but the word sad has synonyms such as:

  • unhappy
  • sorrowful
  • dejected
  • regretful
  • depressed

AmoabaKelvin avatar Mar 05 '22 01:03 AmoabaKelvin

I added synonyms and antonyms, can you tell me any other things that are breaking your implementation?

What happened to origin in this new changes

You know, that was a fun item in your API which you could see where and when it is exactly from. Also there aren't synonyms and antonyms as perfect as they were, anymore. I mean the API used to be better, I think it can be like that again.

By the way, Thanks for your great and free API :)

RamtinPRG avatar Mar 05 '22 06:03 RamtinPRG

Synonyms antonyms are coming empty because Wiktionary usually do not have synonyms at definition level and has that at parts of speech level. For example for the word set we can take a look at its Wiktionary entry here.

My API parses synonyms at definition level, here Wiktionary usually does not have synonyms present, in below image we can see one instance where synonyms are present at definition level.

image

Usually Wiktionary has synonyms present at parts of speech level, as we can see in the image below.

image

To decrease inconvenience of API users I have decided to parse these synonyms too and expose them at parts of speech level.

@AmoabaKelvin You can try searching for word sad now at parts of speech level you will find synonyms. 😄

Thanks for using this dictionary API.

meetDeveloper avatar Mar 06 '22 08:03 meetDeveloper

@RamtinPRG It will be take some time to bring origin back, I have to change how I parses of the Wiktionary data.

meetDeveloper avatar Mar 06 '22 08:03 meetDeveloper

@meetDeveloper is synonyms going to be populated anytime soon?

hrai avatar Jul 12 '22 06:07 hrai

massive shame to have lost synonyms and antonyms, please bring back!

josephtownshend avatar Jul 29 '22 10:07 josephtownshend