Grammalecte  Diff

Differences From Artifact [64ba38ab05]:

To Artifact [2f4877bef2]:


308
309
310
311
312
313
314
315

316
317
318
319
320
321

322
323
324
325
326
327
328
308
309
310
311
312
313
314

315
316
317
318
319
320

321
322
323
324
325
326
327
328







-
+





-
+







            return gc_rules.lSentenceRules;
        }
        return gc_rules.lParagraphRules;
    },

    //// Initialization

    load: function (sContext="JavaScript") {
    load: function (sContext="JavaScript", sPath="") {
        try {
            if (typeof(require) !== 'undefined') {
                var ibdawg = require("resource://grammalecte/ibdawg.js");
                _oDict = new ibdawg.IBDAWG("${dic_name}.json");
            } else {
                _oDict = new IBDAWG("${dic_name}.json");
                _oDict = new IBDAWG("${dic_name}.json", sPath);
            }
            _sAppContext = sContext;
            _dOptions = gc_options.getOptions(sContext).gl_shallowCopy();     // duplication necessary, to be able to reset to default
        }
        catch (e) {
            helpers.logerror(e);
        }