Back

Help with programmation and EPWING

#1
Sorry to bother you again with this topic, but I've managed to do a decent version of the cloze-deletion tool I wanted to do.
It takes a text where I've marked all the words that I want to cloze, and for each word it takes the sentence, long at least n characters.
For each sentence I have the dictionary form of the clozed word, so that I can use it to retrieve definitions from a dictionary.
I've tried to give the result to EPWINGtoAnki, but the problem is that I want to make the process more automatic.
For example, if I have a word in kanji, like 足, and its reading あし, it retrieves all the results for 足 (which are three in this case) and it gives only the one with the あし reading.
Another thing is that in this epwing dictionary (daijirin) some words are like 合(い)の子 so I need to check both with 合いの子 and 合の子.
So, this and other things make it very slow to search inside this dictionary, which btw is in JSON format (I've converted it from epwing). So, any suggestion to make it faster?
I was thinking to convert it to sqlite. Is it a faster alternative?
Another thing I was thinking to do, if I decide to convert it to sql, is to clean all the trash during the conversion, all the things like "間の子・合(い)の子" and other stupid symbols used to give alternative, so that each word will actually have one field with kanji, one field with reading, and one field with the definition.
So that I won't need to use any regex or other things during the search, but a simple "x == y" will suffice.

Any suggestion is welcome Smile
Reply