Files
SnowLuma/.pnpm-store/v11/files/4c/8a150445a4d79d9a4ec5de3370ccede219354fb3c600112c413b75e9795bc997343fde88d248e90741a8f9c340336d5177a4ba4170387b963e13d760565bad
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

20 lines
536 B
Plaintext

'use strict';
function factorial(n) {
if (n <= 1) return 1;
return n * factorial(n - 1);
}
var wordSequenceMatcher = match => {
if (match.pattern !== 'wordSequence') {
return 0;
}
// Base guesses: factorial of word count (number of ways to order the words)
const baseGuesses = factorial(match.wordCount);
// Additional penalty for longer sequences
const lengthPenalty = 2 ** (match.wordCount - 2);
return baseGuesses * lengthPenalty;
};
module.exports = wordSequenceMatcher;
//# sourceMappingURL=scoring.cjs.map