Add topic-modeling pipelines (v1-v3) and evaluator#3
Open
myrsiniioannou wants to merge 8 commits into
Open
Conversation
… ranked by BERTopic, refresh enhanced evaluator and README
…ansformers 2.6, scikit-learn 1.4, other updates)
- Add README.md and requirements.txt for all folders - Add anonymizer.py for privacy compliance - Rename gemma_summarization_task/ to monolithic_summarizers_DEPRE/ - Remove obsolete cleaning/nomoi/ files - Update pipeline orchestrator path resolution
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.
Introduction of
topic_modeling/module – three pipelines plus an evaluator – without touching any other part of the repo.Pipelines
src/consultation_topic_modeling_v1.py– baseline BERTopic workflow.src/consultation_topic_modeling_v2.py– improved version (automatic stop-words, SBERT/GTE embeddings, UMAP + HDBSCAN, JSON titling).src/consultation_topic_modeling_v3.py– hybrid key-phrase approach inspired by QualIT (Gemma key-phrase extraction, hallucination filter, titles).Evaluator
src/evaluate_topics.py– asks an LLM (Gemini API or local Gemma) to grade how well each auto-generated topic title fits its representative comments.--dump_promptsto write prompts to disk without burning API tokens.**Documentation
House-keeping
.gitignoreto keep secrets & artefacts out of the repo (*.env,/topic_modeling/.env,__pycache__/)..envwith the Gemini API key is not committed.Tested
Ran all three pipelines locally on consultation 320 and generated outputs under
outputs/v1|v2|v3/320/.Evaluator tested with both
--gemini(free-tier Flash) and--localGemma.Security / secrets
No credentials or personal data included.
API key remains in
topic_modeling/.env, which is ignored by Git.Impact on existing code
Only
.gitignoremodified; all other existing directories remain unchanged.