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.56k stars 258 forks source link

Error in response for en_us "bear" #90

Open 12Isabella opened 3 years ago

12Isabella commented 3 years ago

Doing an API call for the word Bear, the returned information does not seem to follow the defined scheme.

Instead of returning an array of "partofSpeech" an array of "word" is returned. This is not consistent, compare to for example "grip"

https://api.dictionaryapi.dev/api/v2/entries/en_US/grip https://api.dictionaryapi.dev/api/v2/entries/en_US/bear

The inconsistent return is included below.


[  {
    word: "bear",
    phonetics: [
      {
        text: "/bɛr/",
        audio: "https://lex-audio.useremarkable.com/mp3/bear_us_1.mp3",
      },
    ],
    meanings: [
      {
        partOfSpeech: "transitive verb",
        definitions: [
          {
            definition: "Carry the weight of; support.",
            synonyms: [
              "support",
              "carry",
              "hold up",
              "prop up",
              "keep up",
              "bolster up",
            ],
            example:
              "the bees form large colonies and need the thick branches of tall trees to bear the weight of their nests",
          },
          {
            definition: "Endure (an ordeal or difficulty)",
            synonyms: [
              "endure",
              "tolerate",
              "put up with",
              "stand",
              "suffer",
              "abide",
              "submit to",
              "experience",
              "undergo",
              "go through",
              "countenance",
              "brook",
              "brave",
              "weather",
              "support",
            ],
            example: "she bore the pain stoically",
          },
          {
            definition: "(of a person) carry (someone or something)",
            synonyms: [
              "carry",
              "bring",
              "transport",
              "move",
              "convey",
              "take",
              "fetch",
              "haul",
              "lug",
              "shift",
            ],
            example: "he was bearing a tray of brimming glasses",
          },
          {
            definition: "Give birth to (a child)",
            synonyms: [
              "give birth to",
              "bring forth",
              "deliver",
              "be delivered of",
              "have",
              "mother",
              "create",
              "produce",
              "spawn",
            ],
            example: "she bore six daughters",
          },
          {
            definition: "Turn and proceed in a specified direction.",
            synonyms: [
              "veer",
              "curve",
              "swerve",
              "incline",
              "turn",
              "fork",
              "diverge",
              "deviate",
              "bend",
            ],
            example: "bear left and follow the old road",
          },
        ],
      },
    ],
  },
  {
    word: "bear",
    phonetics: [
      {
        text: "/bɛr/",
        audio: "https://lex-audio.useremarkable.com/mp3/bear_us_1.mp3",
      },
    ],
    meanings: [
      {
        partOfSpeech: "noun",
        definitions: [
          {
            definition:
              "A large, heavy mammal that walks on the soles of its feet, having thick fur and a very short tail. Bears are related to the dog family but most species are omnivorous.",
            example:
              "Recent DNA analysis indicates that giant pandas are more closely related to bears and red pandas are more closely related to raccoons.",
          },
          {
            definition: "A large, heavy, cumbersome man.",
            example: "a lumbering bear of a man",
          },
          {
            definition:
              "A person who forecasts that prices of stocks or commodities will fall, especially a person who sells shares hoping to buy them back later at a lower price.",
            example: "bear markets",
          },
        ],
      },
    ],
  },
];```
danger-ahead commented 3 years ago

I don't see anything odd. Did check it too.