Giter Site home page Giter Site logo

Comments (25)

meetDeveloper avatar meetDeveloper commented on May 21, 2024 1

@brunodema Thanks for bringing this up, I will fix this as soon as possible. Sorry for the inconvenience.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024 1

@brunodema Thanks, I will soon push the commit to github. :) Is there any particular thing you want to see in the API?

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

I will try to solve what you propose here, Sorry for late reply, notification for issues does not come on my mail, it would from now on, Sorry for late response.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

Actually can you tell me, this json2 is object right?? Which you made from json response.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

I think what you need is Mirror, https://developer.apple.com/documentation/swift/mirror. It will help you out. In case you find any trouble you can ask for help.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

You can take a look at this https://makeitnew.io/reflection-in-swift-68a06ba0cf0e. It will help you a lot and definitely solve your problem.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

@rawandahmad698 Hello?

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

I have introduced v2 of API that will solve this problem. Kindly look at the readme.

from freedictionaryapi.

brunodema avatar brunodema commented on May 21, 2024

Hello @meetDeveloper. First, I'd like to congratulate you on your work this API... it's really amazing. I've been currently working on an app prototype which uses your dictionary API to retrieve word entries. Since I noticed a change in behavior lately, I checked the code here in Github and saw that changes were actually made to it.

As previously mentioned, this structure change really helped a lot, since I dealt with the same problems when retrieving and parsing the data. The change that I noticed and made me come here is that the phonetic data isn't being retrieved anymore, as it seems. I just would like to confirm that this is the intended behavior, and not some sort of bug/problem of the API.

Best regards,
Bruno.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

Actually the code here is not the current one, can you exactly tell me your problem, which version are you using and for which language?

from freedictionaryapi.

brunodema avatar brunodema commented on May 21, 2024

I started working with the version available at https://dictionaryapi.dev/, which I believe is the v1 version. I first started about 2-3 weeks ago, and I remember it retrieved phonetic data (in IPA style) alongside definitions. I'm noticing that the both the v1 and v2 (which I discovered when browsing this page) aren't retrieving phonetic data anymore.

I just tested this in versions v1 and v2 with the following words (in english): link, love, sky, in, scourge. I explicitly remember that the word 'link' had phonetics associated with it (I had to make changes in my app to accept the different encoding and I used 'link' as reference for it).

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

@brunodema I have fixed this now, could you check once. Sorry for so late reply, life got me little busy. Can you check once and tell me? Again I am sorry for the inconvenience you faced.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

@brunodema ^

from freedictionaryapi.

brunodema avatar brunodema commented on May 21, 2024

Hello @meetDeveloper. Sorry, but I set github notifications as spam due to some annoyances lately.

I just tested the API with the same 5 words that I previously used and all of them returned the new (at least I assume that you implemented this in the last build) phonetic structure, with both IPA pronunciation and link for audio pronunciation.

All words retrieved both attributes, except 'love', which had it's IPA text empty (but retrieved the audio link).

I also took the opportunity to check the retrieved phonetic data for other languages (german and spanish) for the word 'link' (which is valid for these languages as well). I noticed that the retrieved structure for these entries weren't consistent - that is, sometimes the phonetic branch just returned empty; in other cases it retrieved multiple phonetic results (with only the phonetic text). I also noticed it didn't return the audio link for these languages. French entries also showed this inconsistencies for some words.

I know that these remarks aren't related to my original issue... I just wanted to notify you in case this structure change you adopted was supposed to be universal and not only for the English language. Regardless, thank you very much for taking the time you took to look on these issues :)
Best regards

Best regards.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

Can you tell me the non english words you tested, I found the problem for the word love. Fixing it, for others I need to know the words you tried, for the word link in spanish the source I am using does not provide the phonetics, for german it does not provide the audio. Are there any other words that contains inconsistencies?. So when audio exists it will be returned. I will soon make sure non english words have audio most of the times. @brunodema

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

@brunodema I have fixed the phonetics for love.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

@brunodema ^

from freedictionaryapi.

brunodema avatar brunodema commented on May 21, 2024

I just tested 'love' and it retrieved all fields (text/audio).

I'll mention a few words that I tested for some languages that I know of:

French:

  • fromage: both empty;
  • aile: both empty;
  • mon: both empty.

German:

  • Kopf: retrieves a 'phonetic' struct (has IPA text data) and a 'phonetics' struct (the same IPA text from the other struct, no audio);
  • Wurst: retrieves a 'phonetic' struct (has IPA text data) and a 'phonetics' struct (the same IPA text from the other struct, no audio);
  • Kirche: retrieves a 'phonetic' struct (has IPA text data) and a 'phonetics' struct (has two identical 'text' fields with the same IPA text as the other struct, no audio);

Italian:

  • ala: retrieves a 'phonetic' struct (has IPA text data) and a 'phonetics' struct (the same IPA text from the other struct, no audio);
  • casa: retrieves a 'phonetic' struct (has IPA text data) and a 'phonetics' struct (the same IPA text from the other struct, no audio);
  • giro: retrieves a 'phonetic' struct (has IPA text data) and a 'phonetics' struct (the same IPA text from the other struct, no audio);

These were all random words that I thought of. I'll try to take a look on the code and help, If I can.

from freedictionaryapi.

brunodema avatar brunodema commented on May 21, 2024

So, as an exercise to both learn node.js, and to try help you with the API, I cloned this repository and tested it for a while. After a couple of hours digging stuff (due to lack of knowledge hehe), I noticed that dictionary.js contains the v1 implementation of the API, and not the current one - at least that's what I assumed after testing it with the word 'hi', which retrieved me the old data structure, with no 'partOfSpeech'. Am I crazy or does this version contain the current implementation?

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

@brunodema Actually in repository the code is not present for the v2 implementation. The code uploaded is little different from here.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

I am relaying what google is sending me in some cases it just send the text and in some it send the audio also, I am just relaying it back. I checked for all the words you mentioned google is sending me the same data, for most cases it does not send the audio back, but I have a way to have the audio, I will soon update the API to include those.

Regarding the phonetic struct, I kept that for backward compatibility when I introduced the phonetics. I will soon remove that entirely

from freedictionaryapi.

brunodema avatar brunodema commented on May 21, 2024

OK, no problem @meetDeveloper . I just wanted to let you know in case something unplanned by the app was happening.

If you decide to put v2 here or somewhere else, let me know... I'd like to take a look and see if I can help.

from freedictionaryapi.

brunodema avatar brunodema commented on May 21, 2024

Nah, nothing in particular at the moment. After reading the current version's code, I could understand the flow of information in the API and from where you take the information, so I believe that v2 probably has the same structure. Once you post it here I'll try to mess with it a little, at least while I have time to do so.

from freedictionaryapi.

meetDeveloper avatar meetDeveloper commented on May 21, 2024

@brunodema Sure, I am closing this ticket then. Will keep you updated when I post v2 API here. 😊

from freedictionaryapi.

huntit avatar huntit commented on May 21, 2024

@meetDeveloper any success with posting the v2 API ? Thanks.

from freedictionaryapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.