feat(bloomberg): enrich article content for summaries (#36)
This commit is contained in:
@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user