Grammalecte  Diff

Differences From Artifact [57156dedce]:

To Artifact [3c4bc79cac]:


1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
1
2
3
4
5
6
7


8
9
10
11
12
13
14
15
16







-
-
+
+







// Grammar checker engine

${string}
${regex}
${map}


if (typeof(exports) !== 'undefined') {
    var ibdawg = require("resource://grammalecte/ibdawg.js");
if (typeof(require) !== 'undefined') {
    var IBDAWG = require("resource://grammalecte/ibdawg.js").IBDAWG;
    var helpers = require("resource://grammalecte/helpers.js");
    var gc_options = require("resource://grammalecte/${lang}/gc_options.js");
    var gc_rules = require("resource://grammalecte/${lang}/gc_rules.js");
    var cregex = require("resource://grammalecte/${lang}/cregex.js");
    var text = require("resource://grammalecte/text.js");
    var echo = require("resource://grammalecte/helpers.js").echo;
}
308
309
310
311
312
313
314
315

316
317
318
319
320
321
322
308
309
310
311
312
313
314

315
316
317
318
319
320
321
322







-
+







        return gc_rules.lParagraphRules;
    },

    //// Initialization

    load: function (sContext="JavaScript") {
        try {
            _oDict = new ibdawg.IBDAWG("${dic_name}.json");
            _oDict = new IBDAWG("${dic_name}.json");
            _sAppContext = sContext;
            _dOptions = gc_options.getOptions(sContext).gl_shallowCopy();     // duplication necessary, to be able to reset to default
        }
        catch (e) {
            helpers.logerror(e);
        }
    },