Grammalecte  Diff

Differences From Artifact [7cd637b4cc]:

To Artifact [33bc239621]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Grammalecte

"use strict";


if (typeof(require) !== 'undefined') {
    var helpers = require("resource://grammalecte/helpers.js");
}


const mfsp = {
    // list of affix codes
    _lTagMiscPlur: null,
    _lTagMasForm: null,
    // dictionary of words with uncommon plurals (-x, -ux, english, latin and italian plurals) and tags to generate them
    _dMiscPlur: {},
    // dictionary of feminine forms and tags to generate masculine forms (singular and plural)
    _dMasForm: {},

    init: function (sJSONData) {
        try {












|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Grammalecte

"use strict";


if (typeof(require) !== 'undefined') {
    var helpers = require("resource://grammalecte/helpers.js");
}


const mfsp = {
    // list of affix codes
    _lTagMiscPlur: [],
    _lTagMasForm: [],
    // dictionary of words with uncommon plurals (-x, -ux, english, latin and italian plurals) and tags to generate them
    _dMiscPlur: {},
    // dictionary of feminine forms and tags to generate masculine forms (singular and plural)
    _dMasForm: {},

    init: function (sJSONData) {
        try {
100
101
102
103
104
105
106





107
108
109
110
111
112
113
    mfsp.init(helpers.loadFile("resource://grammalecte/fr/mfsp_data.json"));
} else {
    console.log("Error: Impossible d’initialiser le module mfsp");
}


if (typeof(exports) !== 'undefined') {





    exports.isFemForm = mfsp.isFemForm;
    exports.getMasForm = mfsp.getMasForm;
    exports.hasMiscPlural = mfsp.hasMiscPlural;
    exports.getMiscPlural = mfsp.getMiscPlural;
    exports._whatSuffixCode = mfsp._whatSuffixCode;
    exports._modifyStringWithSuffixCode = mfsp._modifyStringWithSuffixCode;
}







>
>
>
>
>







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    mfsp.init(helpers.loadFile("resource://grammalecte/fr/mfsp_data.json"));
} else {
    console.log("Error: Impossible d’initialiser le module mfsp");
}


if (typeof(exports) !== 'undefined') {
    exports._lTagMiscPlur = mfsp._lTagMiscPlur;
    exports._lTagMasForm = mfsp._lTagMasForm;
    exports._dMiscPlur = mfsp._dMiscPlur;
    exports._dMasForm = mfsp._dMasForm;
    exports.init = mfsp.init;
    exports.isFemForm = mfsp.isFemForm;
    exports.getMasForm = mfsp.getMasForm;
    exports.hasMiscPlural = mfsp.hasMiscPlural;
    exports.getMiscPlural = mfsp.getMiscPlural;
    exports._whatSuffixCode = mfsp._whatSuffixCode;
    exports._modifyStringWithSuffixCode = mfsp._modifyStringWithSuffixCode;
}