Grammalecte  Diff

Differences From Artifact [68b70111ba]:

To Artifact [27133631b8]:


17
18
19
20
21
22
23

24
25
26
27
28
29
30
31
32






33
34
35
36
37
38
39
17
18
19
20
21
22
23
24
25
26
27
28





29
30
31
32
33
34
35
36
37
38
39
40
41







+




-
-
-
-
-
+
+
+
+
+
+







}

var conj = {
    _lVtyp: [],
    _lTags: [],
    _dPatternConj: {},
    _dVerb: {},
    _dVerbNames: {},

    bInit: false,
    init: function (sJSONData) {
        try {
            let _oData = JSON.parse(sJSONData);
            this._lVtyp = _oData.lVtyp;
            this._lTags = _oData.lTags;
            this._dPatternConj = _oData.dPatternConj;
            this._dVerb = _oData.dVerb;
            let oData = JSON.parse(sJSONData);
            this._lVtyp = oData.lVtyp;
            this._lTags = oData.lTags;
            this._dPatternConj = oData.dPatternConj;
            this._dVerb = oData.dVerb;
            this._dVerbNames = oData.dVerbNames;
            this.bInit = true;
        }
        catch (e) {
            console.error(e);
        }
    },

117
118
119
120
121
122
123




124
125
126
127
128
129
130
131
132










133
134
135
136
137
138
139
119
120
121
122
123
124
125
126
127
128
129









130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146







+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+







                    aSugg.add("eut");
                } else {
                    aSugg.add("étais");
                    aSugg.add("était");
                }
                aSugg.delete("");
            } else {
                if (this._dVerbNames.hasOwnProperty(sInfi)) {
                    // there are names derivated from the verb
                    aSugg.update(this._dVerbNames[sInfi]);
                } else {
                // we suggest past participles
                aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q1"));
                aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q2"));
                aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q3"));
                aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q4"));
                aSugg.delete("");
                // if there is only one past participle (epi inv), unreliable.
                if (aSugg.size === 1) {
                    aSugg.clear();
                    // we suggest past participles
                    aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q1"));
                    aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q2"));
                    aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q3"));
                    aSugg.add(this._getConjWithTags(sInfi, tTags, ":PQ", ":Q4"));
                    aSugg.delete("");
                    // if there is only one past participle (epi inv), unreliable.
                    if (aSugg.size === 1) {
                        aSugg.clear();
                    }
                }
            }
        }
        return aSugg;
    },

    _getTags: function (sVerb) {