lemmatizer 启动器
此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/534391/1580076/lemmatizerStarter.js
;const lemmatizer = (() => {
const wn_files = {
noun: [
'index.noun.json',
'noun.exc.json'
],
verb: [
'index.verb.json',
'verb.exc.json'
],
adj: [
'index.adj.json',
'adj.exc.json'
],
adv: [
'index.adv.json',
'adv.exc.json'
]
};
const wn_data = {};
Object.values(wn_files).forEach(v => v.forEach(vv => wn_data[vv] = GM_getResourceText(vv)));
return new Lemmatizer(wn_data)
})();