wingbot 3.65.8 → 3.65.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.65.8",
3
+ "version": "3.65.9",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/AiMatching.js CHANGED
@@ -183,6 +183,12 @@ class AiMatching {
183
183
  */
184
184
  this.stateEntityScore = 1;
185
185
 
186
+ /**
187
+ * Score of matched regexp
188
+ * (1.02 by default)
189
+ */
190
+ this.regexpScore = 1.02;
191
+
186
192
  this._ai = ai;
187
193
  }
188
194
 
@@ -901,7 +907,9 @@ class AiMatching {
901
907
  return 0;
902
908
  }
903
909
 
904
- return f ? 1 : 1 - noIntentHandicap;
910
+ return f
911
+ ? this.regexpScore
912
+ : this.regexpScore - noIntentHandicap;
905
913
  });
906
914
 
907
915
  return Math.max(0, ...scores);