We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDdictionary not working
#11
Yep,
That's the one I'll go for, bit of work to parse the Json return but fairly easy.
Reply
#12
LitDev,

Great if you can do it! Maybe you should rename your extension to "LitDev Basic".

JR
Reply
#13
Hi,
Uploaded a new beta 1.2.29.16 version with this.  The French and Spanish variants don't seem to work (depreciated from intellisense for now) - also added to LDBasic as suggested.
Hope this works for a while!
It looks like this one actually scrapes the definitions from https://en.wiktionary.org/wiki.
[-] The following 1 user Likes litdev's post:
  • Scout
Reply
#14
Hi Litdev,
thanks for creating the dictionary function.
The error output goes to a text window, however.
"date" generates the following message:
LDDictionary.GetDefinition : Additional text encountered after finished reading JSON content: ,. Path '', line 1, position 874.
Unknown or incorrect words like "distroy" result in (404)
Reply
#15
Scout,
Thanks for reporting - my tests were OK, I used the word "world".

The problems is that there is no definition of the API Json returned, so I just assumed the format would be similar for different words - unfortunately not.  It's hard to write a reader of a syntax that changes with no proper definition or API.  I will have a look at this example and see what is returned from the call and what in the Json may be different.

We can see the returned Json with a direct call to a browser:

https://api.dictionaryapi.dev/api/v2/entries/uk/date

The issue then seems apparent!

To turn off erro rmessages, you can use LDUtilities.ShowErrors = "False" (not implemented in LDBasic).

Of the other suggestions I would go for the Wordnik one after looking at the complexity/restrictions of the ones listed.  Of course you can get your own free API key and use LDNetwork.SendWebRequest and parse the result - maybe a fun challenge in itself.  But if LDDictrionary is something that is important for some existing users then I will research more test Wordnik.
Reply
#16
https://free-apis.github.io/#/categories/Dictionaries
many free apis from this site i am using in ZSApi extension will be released soon.
also try contain audio also : https://dictionaryapi.dev/

also show if word dont exist : https://api.dictionaryapi.dev/api/v2/entries/en/distroy
ZS
[-] The following 1 user Likes z-s's post:
  • litdev
Reply
#17
ZS, This is the one I used (api.dictionaryapi.dev - free no signup), just didn't realise lots of words 'don't exist' with it - after actually looking at the other suggestions in more detail some have very limited free trials (1000 words total), some have restrictive signup requirements etc, as I say I think the Worknik one looks best with simple signup, fairly simple Json use with access to good dictionary sources and free non commercial use 100 word/hour.
[-] The following 1 user Likes litdev's post:
  • z-s
Reply
#18
wordnik isnt public api
ZS
Reply
#19
(02-13-2025, 02:01 PM)z-s Wrote: wordnik isnt public api

Not sure exactly what you mean, you do have to sign up with email address, but as far as I can see (without actually signing up) you will then get an account with API key that can be used in limited non commercial apps for free.
Reply
#20
ok got it
ZS
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)