mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-07 03:22:17 -08:00
build: expand typecheck coverage beyond src
This commit is contained in:
@@ -348,7 +348,11 @@ function findSelectedCandidateIndexes(
|
||||
const mergedSignatures = mergedTokens.map(mergedTokenSignature);
|
||||
const selected: number[] = [];
|
||||
for (let i = 0; i < candidates.length; i += 1) {
|
||||
const candidateSignatures = candidates[i].tokens.map(candidateTokenSignature);
|
||||
const candidate = candidates[i];
|
||||
if (!candidate) {
|
||||
continue;
|
||||
}
|
||||
const candidateSignatures = candidate.tokens.map(candidateTokenSignature);
|
||||
if (candidateSignatures.length !== mergedSignatures.length) {
|
||||
continue;
|
||||
}
|
||||
@@ -490,6 +494,9 @@ function renderTextOutput(payload: Record<string, unknown>): void {
|
||||
} else {
|
||||
for (let i = 0; i < finalTokens.length; i += 1) {
|
||||
const token = finalTokens[i];
|
||||
if (!token) {
|
||||
continue;
|
||||
}
|
||||
process.stdout.write(
|
||||
` [${i}] ${token.surface} -> ${token.headword} (${token.reading}) [${token.startPos}, ${token.endPos})\n`,
|
||||
);
|
||||
@@ -505,6 +512,9 @@ function renderTextOutput(payload: Record<string, unknown>): void {
|
||||
|
||||
for (let i = 0; i < candidates.length; i += 1) {
|
||||
const candidate = candidates[i];
|
||||
if (!candidate) {
|
||||
continue;
|
||||
}
|
||||
process.stdout.write(
|
||||
` [${i}] source=${String(candidate.source)} index=${String(candidate.index)} selectedByTokenizer=${String(candidate.selectedByTokenizer)} tokenCount=${String(candidate.tokenCount)}\n`,
|
||||
);
|
||||
@@ -514,6 +524,9 @@ function renderTextOutput(payload: Record<string, unknown>): void {
|
||||
}
|
||||
for (let j = 0; j < tokens.length; j += 1) {
|
||||
const token = tokens[j];
|
||||
if (!token) {
|
||||
continue;
|
||||
}
|
||||
process.stdout.write(
|
||||
` - ${token.surface} -> ${token.headword} (${token.reading}) [${token.startPos}, ${token.endPos})\n`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user