mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-04 19:21:33 -07:00
refactor(tokenizer): address review feedback on Yomitan scan runtime
- extract the injected scan runtime (helpers, install script, call-script builder) into tokenizer/yomitan-scan-runtime-script.ts; the host module drops from ~2700 to ~1900 lines - append the kana run to the reading as well as the surface when an unparsed run extends the previous token, so the reading keeps covering the surface and the known-word reading fallback stays enabled (bumps scan runtime version) - stop annotateMs before character-image resolution so the stage timing measures the annotation stage only
This commit is contained in:
@@ -920,8 +920,8 @@ export async function tokenizeSubtitle(
|
||||
if (yomitanTokens && yomitanTokens.length > 0) {
|
||||
const annotateStartedAtMs = Date.now();
|
||||
const annotatedTokens = await applyAnnotationStage(yomitanTokens, deps, annotationOptions);
|
||||
const renderedTokens = applyCharacterNameImages(annotatedTokens, deps, annotationOptions);
|
||||
stageTimings.annotateMs = Date.now() - annotateStartedAtMs;
|
||||
const renderedTokens = applyCharacterNameImages(annotatedTokens, deps, annotationOptions);
|
||||
logStageTimings(renderedTokens.length);
|
||||
return {
|
||||
text: displayText,
|
||||
|
||||
Reference in New Issue
Block a user