Overview
| Comment: | [core][js] gc engine: fix several bugs |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | core | rg |
| Files: | files | file ages | folders |
| SHA3-256: |
e47d159953c042edc1dbb7279e36ebd1 |
| User & Date: | olr on 2018-09-11 18:38:53 |
| Other Links: | branch diff | manifest | tags |
Context
|
2018-09-11
| ||
| 18:55 | [graphspell][js] tokenizer: don’t use spaces as tokens, yield information token (start/end) check-in: d12872816f user: olr tags: graphspell, rg | |
| 18:38 | [core][js] gc engine: fix several bugs check-in: e47d159953 user: olr tags: core, rg | |
| 13:17 | [core][fr] analyses: update functions check-in: 6c3d434a28 user: olr tags: fr, core, rg | |
Changes
Modified gc_core/js/lang_core/gc_engine.js from [ca317a7cea] to [607d7e2290].
| ︙ | |||
179 180 181 182 183 184 185 | 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 | - + - + + - + |
}
asString () {
let s = "===== TEXT =====\n"
s += "sentence: " + this.sSentence0 + "\n";
s += "now: " + this.sSentence + "\n";
for (let dToken of this.lToken) {
|
| ︙ | |||
229 230 231 232 233 234 235 | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | - + - + - - + - + - + |
this.lToken = Array.from(_oTokenizer.genTokens(this.sSentence, true));
this.dTokenPos.clear();
for (let dToken of this.lToken) {
if (dToken["sType"] != "INFO") {
this.dTokenPos.set(dToken["nStart"], dToken);
}
}
|
| ︙ | |||
323 324 325 326 327 328 329 | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | - + |
}
}
}
if (bChange) {
if (bParagraph) {
this.sText = sText;
} else {
|
| ︙ | |||
589 590 591 592 593 594 595 | 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | - + |
if (!sOption || dOptions.gl_get(sOption, false)) {
bCondMemo = !sFuncCond || oEvalFunc[sFuncCond](this.lToken, nTokenOffset, nLastToken, sCountry, bCondMemo, this.dTags, this.sSentence, this.sSentence0);
if (bCondMemo) {
if (cActionType == "-") {
// grammar error
let [iTokenStart, iTokenEnd, cStartLimit, cEndLimit, bCaseSvty, nPriority, sMessage, sURL] = eAct;
let nTokenErrorStart = (iTokenStart > 0) ? nTokenOffset + iTokenStart : nLastToken + iTokenStart;
|
| ︙ | |||
792 793 794 795 796 797 798 | 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | - + |
if (bUppercase && m[iGroup].slice(0,1).gl_isUpperCase()) {
sNew = sNew.gl_toCapitalize();
}
} else {
sNew = sRepl.gl_expand(m);
sNew = sNew + " ".repeat(ln-sNew.length);
}
|
| ︙ |