How saketh9549/news-search-classification-engine works
News Search & Classification Engine ingests RSS/Atom feeds, normalizes and queues article URLs, politely crawls pages, extracts article content, classifies and indexes it, then serves ranked search results through a FastAPI UI/API. Its live-search path can trigger query-scoped discovery and crawling while returning existing results. The README documents the main stages and capabilities; sampled-source references support several internal calls, but some implementation details were not inspected, so uncertain links are omitted.
Main entry points: service.py Search Service · live_retriever.py Live Retrieval · repository.py Corpus Repository · poller.py Feed Poller
Components 24
Feed Ingestion
- Feed Poller
src/poller/poller.py - Feed Parser
src/poller/parser.py - Live Discovery
src/poller/live_discovery.py
Polite Collection
- Crawl Frontier
src/storage/repository.py - Polite Crawler
src/crawler/crawler.py - Robots Policy
src/crawler/robots.py - Article Extractor
src/extractor/extractor.py
Corpus and Index
- Domain Schemas
src/models/schemas.py - URL Normalizer
src/models/urls.py - SQLite Corpus
src/storage/init_db.py - Corpus Repository
src/storage/repository.py - Text Preprocessing
src/indexer/preprocessing.py - BM25 Index
src/indexer/bm25_index.py
Search Intelligence
- Category Classifier
src/search/classifier.py - Query Expansion
src/search/expansion.py - Entities and Links
src/search/context.py - Result Snippets
src/search/snippets.py - IR Evaluation
src/search/evaluation.py - Search Service
src/search/service.py - Live Retrieval
src/search/live_retriever.py
Web Delivery
- FastAPI and SSE
src/search/api.py - Search Web UI
src/search/templates/search_ui.html
Other components
- RSS/Atom Feeds
- Search User
Connections 37
- RSS/Atom Feeds → Feed Poller: provides feeds
README.md - Feed Poller → Feed Parser: parses entries
src/poller/poller.py - Feed Parser → URL Normalizer: normalizes URLs
src/poller/parser.py - Feed Poller → Crawl Frontier: queues URLs
src/poller/poller.py - Live Discovery → Feed Parser: parses feeds
src/poller/live_discovery.py - Live Discovery → Corpus Repository: queries corpus
src/poller/live_discovery.py - Crawl Frontier → Polite Crawler: supplies URLs
README.md - Polite Crawler → Robots Policy: checks policy
src/crawler/crawler.py - Polite Crawler → Corpus Repository: updates frontier
src/crawler/crawler.py - Polite Crawler → Article Extractor: fetches article HTML
README.md - Article Extractor → Corpus Repository: persists articles
src/extractor/extractor.py - Article Extractor → URL Normalizer: normalizes URLs
src/extractor/extractor.py - Corpus Repository → SQLite Corpus: reads and writes
src/storage/repository.py - Article Extractor → Domain Schemas: validates articles
src/extractor/extractor.py - Feed Poller → Domain Schemas: uses schemas
src/poller/poller.py - Corpus Repository → Domain Schemas: maps records
src/storage/repository.py - SQLite Corpus → Category Classifier: provides training articles
README.md - SQLite Corpus → BM25 Index: provides corpus articles
README.md - Category Classifier → BM25 Index: supplies category predictions
README.md - Text Preprocessing → BM25 Index: prepares index terms
src/indexer/bm25_index.py - Corpus Repository → Text Preprocessing: uses text processing
src/storage/repository.py - Search User → Search Web UI: searches
README.md - Search Web UI → FastAPI and SSE: requests search
README.md - FastAPI and SSE → Search Service: dispatches queries
src/search/api.py - Search Service → BM25 Index: ranks documents
src/search/service.py - Search Service → Query Expansion: expands queries
src/search/service.py - Search Service → Category Classifier: gets predictions
src/search/service.py - Search Service → Entities and Links: extracts entities and links
src/search/service.py - Search Service → Result Snippets: builds snippets
src/search/service.py - Search Service → IR Evaluation: uses metrics
src/search/service.py - FastAPI and SSE → Live Retrieval: starts live stream
src/search/api.py - Live Retrieval → Live Discovery: discovers matching URLs
src/search/live_retriever.py - Live Retrieval → Feed Poller: polls stale feeds
src/search/live_retriever.py - Live Retrieval → Polite Crawler: crawls matches
src/search/live_retriever.py - Live Retrieval → Article Extractor: extracts fresh articles
src/search/live_retriever.py - Live Retrieval → Corpus Repository: updates corpus
src/search/live_retriever.py - Live Retrieval → Search Service: refreshes search
src/search/live_retriever.py