30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
-
+
|
// Temporary sets
this.aAllSugg = new Set(); // All suggestions, even the one rejected
this.dGoodSugg = new Map(); // Acceptable suggestions
this.dBestSugg = new Map(); // Best suggestions
// Parameters
this.nSuggLimit = nSuggLimit;
this.nSuggLimitExt = nSuggLimit + 2; // we add few entries in case suggestions merge after casing modifications
this.nBestSuggLimit = Math.floor(nSuggLimit * 1.5); // n times the requested limit
this.nBestSuggLimit = Math.floor(nSuggLimit * 2); // n times the requested limit
this.nGoodSuggLimit = nSuggLimit * 15; // n times the requested limit
}
addSugg (sSugg) {
// add a suggestion
if (this.aAllSugg.has(sSugg)) {
return;
|