Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create modern, flexible system for handling arbitrary dictionaries #185

Open
melink14 opened this issue Jul 25, 2020 · 6 comments
Open

Create modern, flexible system for handling arbitrary dictionaries #185

melink14 opened this issue Jul 25, 2020 · 6 comments

Comments

@melink14
Copy link
Owner

melink14 commented Jul 25, 2020

More than just updating the old dat and idx files I think it would be good to have a system with the following properties:

  1. Fast to load and query. Maybe indexeddb would fit this or another JS database.
  2. Able to process and load dictionaries from inside the app. This would allow:
    A. Easily supporting non english languages.
    B. Supporting niche dictionaries like computer terms or J-J
    C. Letting people update even when I was slow.

I wouldn't want the system to require the user to update by themselves though so perhaps I would want an autoupdating feature for common sources.

One thing to think about when defining the goals is what types of looks up we may want.

@melink14
Copy link
Owner Author

@melink14
Copy link
Owner Author

Epwing format specifically is filed at #146

@melink14
Copy link
Owner Author

melink14 commented Apr 9, 2022

Dixie specific import/export: https://www.npmjs.com/package/dexie-export-import

@melink14
Copy link
Owner Author

melink14 commented Apr 9, 2022

Yomichan format is in indexedDB so supporting that format directly might be the way to go.

@melink14
Copy link
Owner Author

melink14 commented Apr 9, 2022

@melink14
Copy link
Owner Author

Yomichan format is published as json schemas: https://github.com/FooSoft/yomichan/tree/master/ext/data/schemas
Can use https://www.npmjs.com/package/json-schema-to-typescript to generate types for the json for easier use though might not be useful if just immediately saving them to indexDB.

Though perhaps the schemas can also be used to generate types for Dixie type safe Indexeddb access.

To generate dictionaries I can use https://github.com/actions/setup-go to build latest yomichan and then do something similar to https://github.com/FooSoft/yomichan-import/blob/master/scripts/build_dicts.sh in order to build dictionaries.

json validator: https://ajv.js.org/guide/getting-started.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant