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:
@@ -166,7 +166,7 @@ export function extractTemplates(subjects: string[]): SubjectTemplate[] {
|
|||||||
|
|
||||||
for (const subj of unique) {
|
for (const subj of unique) {
|
||||||
// Skip very short subjects (no useful template)
|
// Skip very short subjects (no useful template)
|
||||||
if (subj.length < 8) continue;
|
if (subj.length < 3) continue;
|
||||||
|
|
||||||
const tokens = tokenize(subj);
|
const tokens = tokenize(subj);
|
||||||
const fields = tokens.filter((t) => t.type === "field");
|
const fields = tokens.filter((t) => t.type === "field");
|
||||||
@@ -189,7 +189,7 @@ export function extractTemplates(subjects: string[]): SubjectTemplate[] {
|
|||||||
// duplicates from the full input array)
|
// duplicates from the full input array)
|
||||||
const fullCounts = new Map<string, number>();
|
const fullCounts = new Map<string, number>();
|
||||||
for (const subj of subjects) {
|
for (const subj of subjects) {
|
||||||
if (subj.length < 8) continue;
|
if (subj.length < 3) continue;
|
||||||
const tokens = tokenize(subj);
|
const tokens = tokenize(subj);
|
||||||
const fields = tokens.filter((t) => t.type === "field");
|
const fields = tokens.filter((t) => t.type === "field");
|
||||||
if (fields.length === 0) continue;
|
if (fields.length === 0) continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user