Moving urlStopwords.js to json file.
This commit is contained in:
Родитель
c465b4b362
Коммит
2244972d50
|
@ -1,4 +1,4 @@
|
|||
var interestsUrlStopwords = {
|
||||
{
|
||||
"com": true,
|
||||
"net": true,
|
||||
"org": true,
|
|
@ -85,7 +85,7 @@ WorkerFactory.prototype = {
|
|||
let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader);
|
||||
scriptLoader.loadSubScript(data.url("models/" + this._localeCode + "/" + modelName + "/domainRules.js"));
|
||||
// use the same url stop words
|
||||
scriptLoader.loadSubScript(data.url("models/urlStopwords.js"));
|
||||
let interestsUrlStopwords = JSON.parse(data.load("models/urlStopwords.json"));
|
||||
|
||||
let worker = new ChromeWorker(data.url("interests/interestsWorker.js"));
|
||||
worker.postMessage({
|
||||
|
|
|
@ -13,7 +13,7 @@ const {testUtils} = require("./helpers");
|
|||
const {Cc, Ci} = require("chrome");
|
||||
|
||||
let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader);
|
||||
scriptLoader.loadSubScript(data.url("models/urlStopwords.js"));
|
||||
let interestsUrlStopwords = JSON.parse(data.load("models/urlStopwords.json"));
|
||||
scriptLoader.loadSubScript(data.url("models/zh-CN/41-cat/domainRules.js"));
|
||||
scriptLoader.loadSubScript(data.url("interests/tokenizers/zh-CN.js"));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче