Differences From Artifact [2769c1001e]:
- File gc_core/js/lang_core/gc_engine.js — part of check-in [e0dc52c869] at 2020-11-07 18:36:24 on branch trunk — [core] gc engine: immunity by option (user: olr, size: 51390) [annotate] [blame] [check-ins using]
To Artifact [2d8b7e8dc3]:
- File gc_core/js/lang_core/gc_engine.js — part of check-in [98cbf77aef] at 2020-11-14 11:08:39 on branch trunk — [build][core][fr][misc] phonet token, new syntax (user: olr, size: 52731) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
if (bDebug) {
console.log(" MATCH: >" + sLemma);
}
yield { "iToken1": iToken1, "iNode": oNode["<lemmas>"][sLemma] };
bTokenFound = true;
}
}
}
// morph arcs
if (oNode.hasOwnProperty("<morph>")) {
let lMorph = (oToken.hasOwnProperty("lMorph")) ? oToken["lMorph"] : gc_engine.oSpellChecker.getMorph(oToken["sValue"]);
if (lMorph.length > 0) {
for (let sSearch in oNode["<morph>"]) {
if (!sSearch.includes("¬")) {
| > > > > > > > > > > > > > > > > > > > > > > > > > > | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
if (bDebug) {
console.log(" MATCH: >" + sLemma);
}
yield { "iToken1": iToken1, "iNode": oNode["<lemmas>"][sLemma] };
bTokenFound = true;
}
}
}
// phonetic similarity
if (oNode.hasOwnProperty("<phonet>")) {
for (let sPhonet in oNode["<phonet>"]) {
if (sPhonet.endsWith("!")) {
let sPhon = sPhonet.slice(0,-1);
if (oToken["sValue"] == sPhon) {
continue;
}
if (oToken["sValue"].slice(0,1).gl_isUpperCase()) {
if (oToken["sValue"].toLowerCase() == sPhon) {
continue;
}
if (oToken["sValue"].gl_isUpperCase() && oToken["sValue"].gl_toCapitalize() == sPhon) {
continue;
}
}
}
if (phonet.isSimilAs(oToken["sValue"], sPhonet.gl_trimRight("!"))) {
if (bDebug) {
console.log(" MATCH: %" + sPhonet);
}
yield { "iToken1": iToken1, "iNode": oNode["<phonet>"][sPhonet] };
bTokenFound = true;
}
}
}
// morph arcs
if (oNode.hasOwnProperty("<morph>")) {
let lMorph = (oToken.hasOwnProperty("lMorph")) ? oToken["lMorph"] : gc_engine.oSpellChecker.getMorph(oToken["sValue"]);
if (lMorph.length > 0) {
for (let sSearch in oNode["<morph>"]) {
if (!sSearch.includes("¬")) {
|
| ︙ | ︙ |