cessen / kobo_jp_dict

A Japanese-English dictionary builder for Kobo e-readers.
Apache License 2.0
32 stars 2 forks source link

Split dictionary generation code out into its own crate. #3

Open cessen opened 3 years ago

cessen commented 3 years ago

The code for generating the final dictionary may be useful to more projects than just this one, especially if we make it non-language-specific. The resulting crate would likely be pretty straightforward, API-wise. It would just take a list (or iterator) of ([terms], definition) pairs and a Writer, and write the dictionary out.

The terms part of the pair should be a list of some kind, so that all the conjugations of a word can be included as search terms. The definition part would simply be a big String containing the html of the entry that gets displayed to the user.