1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
|
// Disambiguation: add a morphology to a token
let lMorph = (oToken.hasOwnProperty("lMorph")) ? oToken["lMorph"] : _oSpellChecker.getMorph(oToken["sValue"]);
lMorph.push(...sNewMorph.split("|"));
oToken["lMorph"] = lMorph;
return true;
}
function g_rewrite (dToken, sToReplace, sReplace) {
// Disambiguation: rewrite morphologies
let lMorph = (oToken.hasOwnProperty("lMorph")) ? oToken["lMorph"] : _oSpellChecker.getMorph(oToken["sValue"]);
oToken["lMorph"] = lMorph.map(s => s.replace(sToReplace, sReplace));
return true;
}
function g_define (oToken, sMorphs) {
|
|
|
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
|
// Disambiguation: add a morphology to a token
let lMorph = (oToken.hasOwnProperty("lMorph")) ? oToken["lMorph"] : _oSpellChecker.getMorph(oToken["sValue"]);
lMorph.push(...sNewMorph.split("|"));
oToken["lMorph"] = lMorph;
return true;
}
function g_rewrite (oToken, sToReplace, sReplace) {
// Disambiguation: rewrite morphologies
let lMorph = (oToken.hasOwnProperty("lMorph")) ? oToken["lMorph"] : _oSpellChecker.getMorph(oToken["sValue"]);
oToken["lMorph"] = lMorph.map(s => s.replace(sToReplace, sReplace));
return true;
}
function g_define (oToken, sMorphs) {
|