Overview
Comment: | [core] gc engine: fix several errors |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | rg |
Files: | files | file ages | folders |
SHA3-256: |
cf1d146f81eb22868d1c00352deed148 |
User & Date: | olr on 2018-09-11 12:44:47 |
Other Links: | branch diff | manifest | tags |
Context
2018-09-11
| ||
12:45 | [fx] worker: import rules graph check-in: b122bc9187 user: olr tags: fx, rg | |
12:44 | [core] gc engine: fix several errors check-in: cf1d146f81 user: olr tags: core, rg | |
12:09 | [core] gc engine: fix several errors check-in: a80212d0a4 user: olr tags: core, rg | |
Changes
Modified gc_core/js/lang_core/gc_engine.js from [c816ea9b43] to [ca317a7cea].
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + - + | asString () { let s = "===== TEXT =====\n" s += "sentence: " + this.sSentence0 + "\n"; s += "now: " + this.sSentence + "\n"; for (let dToken of this.lToken) { s += '#${dToken["i"]}\t${dToken["nStart"]}:{$dToken["nEnd"]}\t${dToken["sValue"]}\t${dToken["sType"]}'; |
︙ | |||
255 256 257 258 259 260 261 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + | bChange = false; } for (let [sGraphName, sLineId] of lRuleGroup) { if (!dOptions.has(sGraphName) || dOptions.get(sGraphName)) { if (bDebug) { console.log("\n>>>> GRAPH: " + sGraphName + " " + sLineId); } |
︙ | |||
291 292 293 294 295 296 297 | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | - + | if (bDebug) { console.log("~ " + sText + " -- " + m[eAct[0]] + " # " + sLineId); } break; case "=": // disambiguation //console.log("-> disambiguation by " + sLineId + "\nzRegex: " + zRegex.source); |
︙ | |||
593 594 595 596 597 598 599 | 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - + | // grammar error let [iTokenStart, iTokenEnd, cStartLimit, cEndLimit, bCaseSvty, nPriority, sMessage, sURL] = eAct; let nTokenErrorStart = (iTokenStart > 0) ? nTokenOffset + iTokenStart : nLastToken + iTokenStart; if (this.lToken[nTokenErrorStart].hasOwnProperty("bImmune")) { let nTokenErrorEnd = (iTokenEnd > 0) ? nTokenOffset + iTokenEnd : nLastToken + iTokenEnd; let nErrorStart = this.nOffsetWithinParagraph + ((cStartLimit == "<") ? this.lToken[nTokenErrorStart]["nStart"] : this.lToken[nTokenErrorStart]["nEnd"]); let nErrorEnd = this.nOffsetWithinParagraph + ((cEndLimit == ">") ? this.lToken[nTokenErrorEnd]["nEnd"] : this.lToken[nTokenErrorEnd]["nStart"]); |
︙ | |||
1048 1049 1050 1051 1052 1053 1054 | 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | - + | } function morph (dTokenPos, aWord, sPattern, sNegPattern, bNoWord=false) { // analyse a tuple (position, word), returns true if not sNegPattern in word morphologies and sPattern in word morphologies (disambiguation on) if (!aWord) { return bNoWord; } |
︙ |