@deadair/plugin-sdk 0.77.6 → 0.77.7
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/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/match.text.d.ts +10 -0
- package/dist/match.text.d.ts.map +1 -1
- package/dist/plugin.config.fields.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -995,6 +995,13 @@ function baseForm(value) {
|
|
|
995
995
|
return normalize(value.replace(PARENTHETICAL, " ").split(/\s+[-–—]\s+/)[0] ?? value);
|
|
996
996
|
}
|
|
997
997
|
__name(baseForm, "baseForm");
|
|
998
|
+
function textAgreement(candidate, reference) {
|
|
999
|
+
if (!candidate) return "none";
|
|
1000
|
+
if (normalize(candidate) === normalize(reference)) return "exact";
|
|
1001
|
+
if (baseForm(candidate) === baseForm(reference)) return "base";
|
|
1002
|
+
return "none";
|
|
1003
|
+
}
|
|
1004
|
+
__name(textAgreement, "textAgreement");
|
|
998
1005
|
|
|
999
1006
|
// src/plausible.audio.ts
|
|
1000
1007
|
var MIN_PLAUSIBLE_AUDIO_BYTES = 256;
|
|
@@ -1546,6 +1553,7 @@ export {
|
|
|
1546
1553
|
sentToProblems,
|
|
1547
1554
|
sentencesOf,
|
|
1548
1555
|
sentencesWithin,
|
|
1556
|
+
textAgreement,
|
|
1549
1557
|
toPluginError,
|
|
1550
1558
|
truncateSentences,
|
|
1551
1559
|
truncateUpstreamMessage,
|