176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
-
+
+
+
+
+
-
+
-
+
-
+
+
+
+
+
-
-
+
+
-
|
}
}
};
class Verb {
constructor (sVerb) {
constructor (sVerb, sVerbPattern="") {
// conjugate a unknown verb with rules from sVerbPattern
if (typeof sVerb !== "string" || sVerb === "") {
throw new TypeError ("The value should be a non-empty string");
}
if (sVerbPattern.length == 0) {
sVerbPattern = sVerb;
}
this.sVerb = sVerb;
this.sVerbAux = "";
this._sRawInfo = conj.getVtyp(this.sVerb);
this._sRawInfo = conj.getVtyp(sVerbPattern);
this.sInfo = this._readableInfo(this._sRawInfo);
this._tTags = conj._getTags(sVerb);
this._tTags = conj._getTags(sVerbPattern);
this._tTagsAux = conj._getTags(this.sVerbAux);
this.bProWithEn = (this._sRawInfo[5] === "e");
this.dConj = new Map ([
[":Y", new Map ([
["label", "Infinitif"],
[":Y", sVerb]
[":", sVerb]
])],
[":P", new Map ([
["label", "Participe présent"],
[":", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":P")]
])],
[":PQ", new Map ([
["label", "Participes passés et présent"],
[":Q", new Map ([
["label", "Participes passés"],
[":Q1", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q1")],
[":Q2", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q2")],
[":Q3", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q3")],
[":Q4", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":Q4")],
[":P", conj._getConjWithTags(sVerb, this._tTags, ":PQ", ":P")]
])],
[":Ip", new Map ([
["label", "Présent"],
[":1s", conj._getConjWithTags(sVerb, this._tTags, ":Ip", ":1s")],
[":1ś", conj._getConjWithTags(sVerb, this._tTags, ":Ip", ":1ś")],
[":2s", conj._getConjWithTags(sVerb, this._tTags, ":Ip", ":2s")],
[":3s", conj._getConjWithTags(sVerb, this._tTags, ":Ip", ":3s")],
|
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
|
-
+
-
+
-
+
|
if (bInt) {
sInfi += " … ?";
}
return sInfi;
}
participePasse (sWho) {
return this.dConj.get(":PQ").get(sWho);
return this.dConj.get(":Q").get(sWho);
}
participePresent (bPro, bNeg, bTpsCo, bInt, bFem) {
if (!this.dConj.get(":PQ").get(":P")) {
if (!this.dConj.get(":P").get(":")) {
return "";
}
let sPartPre;
if (bTpsCo) {
sPartPre = (!bPro) ? conj._getConjWithTags(this.sVerbAux, this._tTagsAux, ":PQ", ":P") : conj.getConj("être", ":PQ", ":P");
} else {
sPartPre = this.dConj.get(":PQ").get(":P");
sPartPre = this.dConj.get(":P").get(":");
}
if (sPartPre === "") {
return "";
}
let bEli = conj._zStartVoy.test(sPartPre);
if (bPro) {
if (this.bProWithEn) {
|