Files
SnowLuma/.pnpm-store/v11/files/4c/8a150445a4d79d9a4ec5de3370ccede219354fb3c600112c413b75e9795bc997343fde88d248e90741a8f9c340336d5177a4ba4170387b963e13d760565bad
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
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