修复匹配的问题

This commit is contained in:
andy
2026-09-19 11:06:02 +08:00
parent 6eeaee07d4
commit ea9c4b34c6
23 changed files with 470 additions and 31 deletions

View File

@@ -79,7 +79,7 @@ export function effectiveParserModeForRoute(route: BusinessRouteDefinition, conf
return route.parserPolicy === 'program_only' ? 'program' : 'ai';
}
const PROGRAM_VERSION = 'ltjt-program-parser-v1.0.13';
const PROGRAM_VERSION = 'ltjt-program-parser-v1.0.14';
export const BUSINESS_INPUT_CONTRACT_VERSION = 'business-input-templates-0.5.136';
const lookupFields = ({ customerRequired = true } = {}): ProgramFieldDefinition[] => [

View File

@@ -273,8 +273,10 @@ function parseDateList(rawValue: string, context: DateContext, nextOccurrence: b
}
function namedRef(rawValue: string): JsonRecord {
const keyword = compactText(rawValue);
return { name: keyword.replace(/人名币/gu, '人民币'), keyword };
// Keep the supplied spelling for traceability; only the comparison name
// retains the existing width normalization and registered typo alias.
const keyword = String(rawValue || '').trim();
return { name: compactText(keyword).replace(/人名币/gu, '人民币'), keyword };
}
function positiveInteger(rawValue: string): FieldParseResult {