echamudi / cham-jp-deck

Japanese flashcard generator from JMdict, KANJIDIC, and Chinese characters decomposition to Anki deck in CSV format
Mozilla Public License 2.0
3 stars 2 forks source link

full jmdict #1

Closed epistularum closed 4 years ago

epistularum commented 4 years ago

I would like to convert the full jmdict project and not only frequent words, is it possible?

echamudi commented 4 years ago

Hello @epistularum,

Yes, it's possible. I tried that while developing this code.

I think the part that you need to edit is around these lines in code.js

    // Add raw from JMdict Freq

    raw.vocab_jmdict_freq = [];

    JMdict.forEach(function(entry) {

        if (entry.k_ele) entry.k_ele.forEach(function (k_ele) {

            // if it has freq tag, add to the collection
            if (k_ele.ke_pri) {
                raw.vocab_jmdict_freq.push(k_ele.keb);
            }
        });
    });

Remove the if (k_ele.ke_pri) conditional statement, hence it will import all jmdict words with kanji.

epistularum commented 4 years ago

Thank you very much, I'll give it a spin!