feat(analytics): implement NER tagging & entity filtering for news article (#455)#485
Merged
Cedarich merged 2 commits intoPulsefy:mainfrom Mar 28, 2026
Conversation
…ticles (Pulsefy#455) - Add NERService in src/analytics/ner_service.py using spaCy with crypto-domain entity ruler patterns and graceful blank-pipeline fallback - Add detected_entities JSON column to Article model and Alembic migration 002 - Auto-tag articles with detected entities on save in PostgresService - Add entity= filter support to get_recent_articles() - Add GET /news?entity=Soroban API endpoint with asset and time window filters - Add unit tests for NER extraction and integration test for entity persistence and filtering - Add spacy>=3.7.0 to requirements.txt
|
@titilayo967 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
@Cedarich please, review. |
Cedarich
approved these changes
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Named Entity Recognition (NER) for automatic tagging of news articles with detected entities (projects, people, assets) and adds API filtering by entity to enable ecosystem-specific news discovery.
Key Features:
NERServiceusing spaCy with crypto-domain entity ruler patternsdetected_entitiesJSON column added to Article modelPostgresService?entity=Soroban)Linked Issue
Closes #455
Type of Change
Validation
Test Results:
Documentation
Note: This is a backend-only change; documentation for the new
?entityfilter is available in API endpoint descriptions.Files Added/Modified
apps/data-processing/src/analytics/ner_service.pyapps/data-processing/alembic/versions/002_add_detected_entities_to_articles.pydetected_entitiesJSON columnapps/data-processing/tests/test_ner_service.pyapps/data-processing/src/db/models.pydetected_entitiesfield to Articleapps/data-processing/src/db/postgres_service.pyapps/data-processing/src/api/server.py?entityquery parameter to/newsendpointapps/data-processing/requirements.txtspacy>=3.7.0API Usage
Checklist
feat/,fix/, ordocs/Closes #455