wingbot 3.53.2 → 3.53.3
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 +1 -1
- package/src/AiMatching.js +8 -2
- package/src/Router.js +1 -3
package/package.json
CHANGED
package/src/AiMatching.js
CHANGED
|
@@ -515,11 +515,17 @@ class AiMatching {
|
|
|
515
515
|
this._ai.confidence + this.redundantEntityHandicap
|
|
516
516
|
));
|
|
517
517
|
|
|
518
|
-
|
|
518
|
+
const remainingTextLen = (textLength - matchedEntitiesTextLength);
|
|
519
|
+
const minus = (remainingTextLen / textLength) * remainingScore;
|
|
520
|
+
|
|
521
|
+
// eslint-disable-next-line no-console,max-len,object-curly-newline
|
|
522
|
+
// console.log({ minus, matchedEntitiesTextLength, textLength, remainingScore })
|
|
523
|
+
|
|
524
|
+
finalScore -= minus;
|
|
519
525
|
}
|
|
520
526
|
|
|
521
527
|
// eslint-disable-next-line no-console,max-len,object-curly-newline
|
|
522
|
-
// console.log({ finalScore, rule, baseScore, score, allOptional, entities, reqEntities, matchedEntitiesTextLength, countOfAdditionalItems });
|
|
528
|
+
// console.log({ countOfAdditionalItems, multiMatch: this.multiMatchGain ** countOfAdditionalItems, handicap, finalScore, rule, baseScore, score, allOptional, entities, reqEntities, matchedEntitiesTextLength, countOfAdditionalItems });
|
|
523
529
|
|
|
524
530
|
if (finalScore <= 0) {
|
|
525
531
|
return null;
|
package/src/Router.js
CHANGED
|
@@ -14,9 +14,7 @@ function defaultPathContext () {
|
|
|
14
14
|
return { globalIntentsMeta: {}, path: '/*' };
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* @typedef {true|false|null|undefined|-1|void} RoutingInstruction
|
|
19
|
-
*/
|
|
17
|
+
/** @typedef {true|false|null|undefined|number|void} RoutingInstruction */
|
|
20
18
|
|
|
21
19
|
/**
|
|
22
20
|
* @callback PostBackDataCallback
|