Updating enamdict and edict, code to load dictionaries.
This commit is contained in:
parent
43e2024529
commit
02d679a461
@ -36,11 +36,15 @@ class Dictionary {
|
|||||||
|
|
||||||
for (let name in this.termDicts) {
|
for (let name in this.termDicts) {
|
||||||
const dict = this.termDicts[name];
|
const dict = this.termDicts[name];
|
||||||
const indices = dict.indices[term] || [];
|
const indexStr = dict.i[term] || null;
|
||||||
|
if (indexStr === null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const indices = indexStr.split(' ').map(Number);
|
||||||
results = results.concat(
|
results = results.concat(
|
||||||
indices.map(index => {
|
indices.map(index => {
|
||||||
const [e, r, t, ...g] = dict.defs[index];
|
const [e, r, t, ...g] = dict.d[index];
|
||||||
const addons = [];
|
const addons = [];
|
||||||
const tags = t.split(' ');
|
const tags = t.split(' ');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user