359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
|
aPfx2: new Set([
"belgo", "franco", "génito", "gynéco", "médico", "russo"
]),
cut: function (sWord) {
// returns an arry of strings (prefix, trimed_word, suffix)
let m = /^([a-zA-Zà-öÀ-Ö0-9_ø-ÿØ-ßĀ-ʯfi-st]+)(-(?:t-|)(?:ils?|elles?|on|je|tu|nous|vous|ce)$)/.exec(sWord);
if (m) {
return ["", m[1], m[2]];
}
return ["", sWord, ""];
},
// Other functions
filterSugg: function (aSugg) {
return aSugg.filter((sSugg) => { return !sSugg.endsWith("è") && !sSugg.endsWith("È"); });
}
|
>
>
>
>
>
>
>
|
|
>
|
|
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
|
aPfx2: new Set([
"belgo", "franco", "génito", "gynéco", "médico", "russo"
]),
cut: function (sWord) {
// returns an arry of strings (prefix, trimed_word, suffix)
let sPrefix = "";
let sSuffix = "";
let m = /^([ldmtsnjcç]|lorsqu|presqu|jusqu|puisqu|quoiqu|quelqu|qu)[’'‘`]([a-zA-Zà-öÀ-Ö0-9_ø-ÿØ-ßĀ-ʯfi-st-]+)/i.exec(sWord);
if (m) {
sPrefix = m[1] + "’";
sWord = m[2];
}
m = /^([a-zA-Zà-öÀ-Ö0-9_ø-ÿØ-ßĀ-ʯfi-st]+)(-(?:t-|)(?:ils?|elles?|on|je|tu|nous|vous|ce)$)/i.exec(sWord);
if (m) {
sWord = m[1];
sSuffix = m[2];
}
return [sPrefix, sWord, sSuffix];
},
// Other functions
filterSugg: function (aSugg) {
return aSugg.filter((sSugg) => { return !sSugg.endsWith("è") && !sSugg.endsWith("È"); });
}
|