Enable frequency dictionaries to specify the frequency mode (#1944)
This commit is contained in:
parent
c15683d206
commit
6694a9d9c3
@ -46,6 +46,10 @@
|
||||
"type": "string",
|
||||
"description": "Attribution information for the dictionary data."
|
||||
},
|
||||
"frequencyMode": {
|
||||
"type": "string",
|
||||
"enum": ["occurrence-based", "rank-based"]
|
||||
},
|
||||
"tagMeta": {
|
||||
"type": "object",
|
||||
"description": "Tag information for terms and kanji. This object is obsolete and individual tag files should be used instead.",
|
||||
|
@ -201,11 +201,12 @@ class DictionaryImporter {
|
||||
importDate: Date.now()
|
||||
};
|
||||
|
||||
const {author, url, description, attribution} = index;
|
||||
const {author, url, description, attribution, frequencyMode} = index;
|
||||
if (typeof author === 'string') { summary.author = author; }
|
||||
if (typeof url === 'string') { summary.url = url; }
|
||||
if (typeof description === 'string') { summary.description = description; }
|
||||
if (typeof attribution === 'string') { summary.attribution = attribution; }
|
||||
if (typeof frequencyMode === 'string') { summary.frequencyMode = frequencyMode; }
|
||||
|
||||
Object.assign(summary, details);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user