fix(registratura): lower subject template min length from 8 to 3 chars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-10 08:48:34 +02:00
parent b3b585e7c8
commit 3a3db3f366
@@ -166,7 +166,7 @@ export function extractTemplates(subjects: string[]): SubjectTemplate[] {
for (const subj of unique) {
// Skip very short subjects (no useful template)
if (subj.length < 8) continue;
if (subj.length < 3) continue;
const tokens = tokenize(subj);
const fields = tokens.filter((t) => t.type === "field");
@@ -189,7 +189,7 @@ export function extractTemplates(subjects: string[]): SubjectTemplate[] {
// duplicates from the full input array)
const fullCounts = new Map<string, number>();
for (const subj of subjects) {
if (subj.length < 8) continue;
if (subj.length < 3) continue;
const tokens = tokenize(subj);
const fields = tokens.filter((t) => t.type === "field");
if (fields.length === 0) continue;