Differences From Artifact [b87d78e936]:
- File graphspell-js/ibdawg.js — part of check-in [cbbb58a487] at 2020-03-27 12:45:19 on branch trunk — [graphspell] suggestion: prevents splitting trailing numbers if not following an alpha character (user: olr, size: 27225) [annotate] [blame] [check-ins using]
To Artifact [9b51ad972c]:
- File graphspell-js/ibdawg.js — part of check-in [a00365529c] at 2020-04-14 15:26:59 on branch trunk — [graphspell] add 1 to distance between word and suggestion if word is split (user: olr, size: 27361) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
if (this.aAllSugg.has(sSugg)) {
return;
}
this.aAllSugg.add(sSugg);
if (!this.aSugg.has(sSugg)) {
let nDist = str_transform.distanceDamerauLevenshtein(this.sSimplifiedWord, char_player.simplifyWord(sSugg));
if (nDist <= this.nDistLimit) {
if (!this.dSugg.has(nDist)) {
this.dSugg.set(nDist, []);
}
this.dSugg.get(nDist).push(sSugg);
this.aSugg.add(sSugg);
if (nDist < this.nMinDist) {
this.nMinDist = nDist;
| > > > | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
if (this.aAllSugg.has(sSugg)) {
return;
}
this.aAllSugg.add(sSugg);
if (!this.aSugg.has(sSugg)) {
let nDist = str_transform.distanceDamerauLevenshtein(this.sSimplifiedWord, char_player.simplifyWord(sSugg));
if (nDist <= this.nDistLimit) {
if (sSugg.includes(" ")) { // add 1 to distance for split suggestions
nDist += 1;
}
if (!this.dSugg.has(nDist)) {
this.dSugg.set(nDist, []);
}
this.dSugg.get(nDist).push(sSugg);
this.aSugg.add(sSugg);
if (nDist < this.nMinDist) {
this.nMinDist = nDist;
|
| ︙ | ︙ |