Implement classification redesign

This commit is contained in:
Lars Nolden
2026-09-11 22:46:17 +02:00
parent cc43a2f9a7
commit 87f052a3ea
23 changed files with 1602 additions and 296 deletions
+7
View File
@@ -8,6 +8,7 @@ import (
"strings"
"finance-duck/internal/banking"
"finance-duck/internal/classification"
"finance-duck/internal/domain"
)
@@ -108,6 +109,12 @@ func SaveCategory(d *domain.Dataset, v domain.Category) error {
d.Categories = append(d.Categories, v)
return nil
}
// LearnAlias records the chosen counterparty as a merchant alias when the
// classification matcher remains unambiguous.
func LearnAlias(d *domain.Dataset, f domain.Facts, merchantID string) bool {
return classification.LearnAlias(d, f, merchantID)
}
func SaveTag(d *domain.Dataset, v domain.Tag) error {
v.Name = strings.TrimSpace(v.Name)
if v.ID == "" {