feat: keyword search over topics in the prospective demo - #6
Open
picaultj wants to merge 1 commit into
Open
Conversation
Add a keyword search box to the signal-analysis view of the prospective demo so users can filter the weak/strong/noise topic tables by keywords (issue rte-france#59, 'search among topics by keywords'). - New pure helper filter_topics_by_keywords() (topic_search.py) matches case-insensitively across the topic title, LLM description and representation, combining whitespace-separated terms with AND semantics; a blank query leaves the tables unchanged. - dashboard_signals wires a st.text_input above the tables and filters each category through the helper, with a caption echoing the active filter. - Added FR/EN translations and unit tests for the helper.
picaultj
force-pushed
the
feat/topic-keyword-search
branch
from
August 18, 2026 12:54
185d416 to
1b1f541
Compare
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 "search among topics by keywords" — the third idea in upstream issue
rte-france/BERTrend#59— for the prospective demo's signal-analysis view.What it does
Adds a keyword search box above the weak/strong/noise topic tables. Typing filters all three tables to the topics whose title, LLM description, or representation match the query.
Changes
topic_search.py(new): pure, dependency-light helperfilter_topics_by_keywords(df, query, search_columns=None). No Streamlit dependency, so it is unit-testable in isolation.dashboard_signals.py: adds thest.text_inputsearch box and routes each category dataframe through the helper before display.i18n_translations.py: FR/EN strings (search_topics,search_topics_placeholder,search_active).tests/apps/test_topic_search.py(new): unit tests for the helper.Scope notes
Tests
tests/apps/test_topic_search.py: 9 passed (blank/None/empty handling, case-insensitive matches on title/description/representation, AND semantics, no-match, missing columns, customsearch_columns).Generated by Claude Code