Comments (25)
@brunodema Thanks for bringing this up, I will fix this as soon as possible. Sorry for the inconvenience.
from freedictionaryapi.
@brunodema Thanks, I will soon push the commit to github. :) Is there any particular thing you want to see in the API?
from freedictionaryapi.
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.
Actually can you tell me, this json2 is object right?? Which you made from json response.
from freedictionaryapi.
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.
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.
@rawandahmad698 Hello?
from freedictionaryapi.
I have introduced v2
of API that will solve this problem. Kindly look at the readme.
from freedictionaryapi.
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.
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.
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.
@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.
from freedictionaryapi.
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.
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.
@brunodema I have fixed the phonetics for love
.
from freedictionaryapi.
from freedictionaryapi.
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.
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.
@brunodema Actually in repository the code is not present for the v2 implementation. The code uploaded is little different from here.
from freedictionaryapi.
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.
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.
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.
@brunodema Sure, I am closing this ticket then. Will keep you updated when I post v2 API here. 😊
from freedictionaryapi.
@meetDeveloper any success with posting the v2 API ? Thanks.
from freedictionaryapi.
Related Issues (20)
- [BUG] Word 'wind' has incorrect phonetic HOT 1
- "Ball" returns bad data
- API is down (Jan/2/2023) HOT 6
- API is down (Jan/2/2023) HOT 1
- API is not responding HOT 2
- Server Down HOT 4
- Server down((
- [BUG] Some words are missing single "phonetic"
- Server is down again :( HOT 8
- API not working HOT 2
- Server is down :((( HOT 3
- Empty array returned for synonyms and antonyms HOT 3
- Missing "origin" property in response HOT 1
- Please check the meaning for the word 'scold'
- I can't use it on my local environment. HOT 3
- Missing word 'for' in api V2
- "Your" is not in dictionary
- "Allah" is not in the dictionary please add
- "every" is not returning as a valid word HOT 2
- add pictures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freedictionaryapi.