Overview
Comment: | [graphspell][js] tokenizer: fix var init |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | graphspell | rg |
Files: | files | file ages | folders |
SHA3-256: |
52d64fd395c1ec9319b0b26adbb90503 |
User & Date: | olr on 2018-09-14 09:48:36 |
Other Links: | branch diff | manifest | tags |
Context
2018-09-14
| ||
09:50 | [fr] rebuild dictionary for JS check-in: e3c499aad8 user: olr tags: fr, rg | |
09:48 | [graphspell][js] tokenizer: fix var init check-in: 52d64fd395 user: olr tags: graphspell, rg | |
09:46 | [core][js][bug] wrong parameter name check-in: c1f1c0d9c1 user: olr tags: core, rg | |
Changes
Modified graphspell-js/tokenizer.js from [d2289444f9] to [aac6560c8a].
︙ | ︙ | |||
55 56 57 58 59 60 61 | this.sLang = "default"; } this.aRules = aTkzPatterns[this.sLang]; } * genTokens (sText, bStartEndToken=false, bWithSpaces=false) { let m; | | < | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | this.sLang = "default"; } this.aRules = aTkzPatterns[this.sLang]; } * genTokens (sText, bStartEndToken=false, bWithSpaces=false) { let m; let iToken = 0; let iNext = 0; let iEnd = sText.length; if (bStartEndToken) { yield { "i": 0, "sType": "INFO", "sValue": "<start>", "nStart": 0, "nEnd": 0, "lMorph": ["<start>"] }; } while (sText) { let iCut = 1; for (let [zRegex, sType] of this.aRules) { if (sType !== "SPACE" || bWithSpaces) { try { if ((m = zRegex.exec(sText)) !== null) { iToken += 1; yield { "i": iToken, "sType": sType, "sValue": m[0], "nStart": iNext, "nEnd": iNext + m[0].length } iCut = m[0].length; |
︙ | ︙ |