feat(bloomberg): enrich article content for summaries (#36)

This commit is contained in:
2026-11-24 13:44:52 +01:00
parent 686f66a437
commit a53aec7947
22 changed files with 1148 additions and 127 deletions

View File

@ -8,11 +8,12 @@ import (
)
type Article struct {
Title string
Content string
URL string
PublishedAt *time.Time
Symbols []string
Title string
Content string
ContentTruncated bool
URL string
PublishedAt *time.Time
Symbols []string
}
type Scraper interface {
@ -20,6 +21,12 @@ type Scraper interface {
Scrape(ctx context.Context, symbols []string) ([]Article, error)
}
// ArticleEnricher is an optional, transient enrichment port. Generation calls
// it only for the bounded Bloomberg pool, never for the full collected list.
type ArticleEnricher interface {
Enrich(context.Context, []Article) ([]Article, error)
}
// detectSymbols extrait les symboles mentionnés dans un texte
func DetectSymbols(text string, watchlist []string) []string {
found := map[string]bool{}