themoeway / kaikki-to-yomitan

Yomitan-compatible dictionaries from wikitionary data
https://github.com/themoeway/kaikki-to-yomitan/releases
39 stars 8 forks source link

Error while importing some dictionaries #9

Closed fruitports closed 3 months ago

fruitports commented 5 months ago

Trying to import kty-id-en.zip into Yomitan on Kiwi Browser or PC Firefox returns "Error: Dictionary has invalid data in 'term_bank_1.json'"

kty-pt-en.zip - "Error: Dictionary has invalid data in 'term_bank_10.json'"

I also tried to import kty-id-en-ipa.zip and kty-fr-de.zip and found no errors.

StefanVukovic99 commented 5 months ago

Looks like the yomitan version in the Mozilla Add-ons Browser is 23.12.29.0 and the dictionary format used here requires 24.01.20.0.

phamthaison1207 commented 4 months ago

currently as of 10/3/2024 Yomitan (development build) 24.2.26.0, 3 dictionaries remain affected by this error: macmillan with ipa, new oxford and yzkwEn

StefanVukovic99 commented 4 months ago

The "yzk" dictionaries are obsoleted by this repo. The other two you mentioned need two fixes:

  1. v4 to v3 in index.json
  2. have a script remove the last two fields in every entry. I added these to yezichak's v4 to hold deinflection information (though they weren't required), but that's done differently now in yomitan's v3 format.
    [
    ...
    "", // remove
    [] // remove 
    ]
phamthaison1207 commented 4 months ago

How do I run these scripts for these dicts (sorry, I am not a programmer, just a power user of these things, best thing I have done so far was just editing 4 to 3)

On Sun, Mar 10, 2024, 22:43 StefanVukovic99 @.***> wrote:

The "yzk" dictionaries are obsoleted by this repo. The other two you mentioned need two fixes:

  1. v3 to v4 in index.json https://github.com/themoeway/kaikki-to-yomitan/issues/10#issuecomment-1969991181
  2. have a script remove the last two fields in every entry. I added these to yezichak's v4 to hold deinflection information (though they weren't required), but that's done differently now in yomitan's v3 format.

[..."", // remove [] // remove ]

— Reply to this email directly, view it on GitHub https://github.com/themoeway/kaikki-to-yomitan/issues/9#issuecomment-1987273063, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFD2IHY5A4QCL5FY7CZAXLYXR5Q7AVCNFSM6AAAAABCYLFBXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGI3TGMBWGM . You are receiving this because you commented.Message ID: @.***>

StefanVukovic99 commented 4 months ago

I've added a v4 to v3 tool. You paste a v4 zip in the same directory and run node v4-to-v3.js DICTNAME.zip

jamesmaa commented 3 months ago

Maybe it's worth cutting a new release with the fixed dictionary files?

StefanVukovic99 commented 3 months ago

The dictionaries in the release should all work (and they replace the old yzk- dicts). Unfortunately there are a few older (and possibly proprietary) dicts that are in circulation, and the v4 to v3 stuff is for those few cases.

jamesmaa commented 3 months ago

I've been trying to import kty-es-en.zip and see the Error: Dictionary has invalid data in 'term_bank_10.json'.

StefanVukovic99 commented 3 months ago

Closing since there should be no more of these errors on the new stable releases.