Skip to content

Add topic-modeling pipelines (v1-v3) and evaluator #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

myrsiniioannou
Copy link
Collaborator

Introduction of topic_modeling/ module – three pipelines plus an evaluator – without touching any other part of the repo.

  1. 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).
  2. 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.
    • Supports --dump_prompts to write prompts to disk without burning API tokens.
    • Relaxed Gemini safety settings and early-exit on blocked content.
  3. **Documentation

    • Each script now starts with a header comment describing the pipeline and a CLI “quick usage” block.
  4. House-keeping

    • Updated .gitignore to keep secrets & artefacts out of the repo (*.env, /topic_modeling/.env, __pycache__/).
    • .env with the Gemini API key is not committed.
  5. 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 --local Gemma.

  6. Security / secrets
    No credentials or personal data included.
    API key remains in topic_modeling/.env, which is ignored by Git.

  7. Impact on existing code
    Only .gitignore modified; all other existing directories remain unchanged.

@myrsiniioannou myrsiniioannou requested a review from fffoivos June 26, 2025 14:06
myrsiniioannou and others added 4 commits June 27, 2025 17:24
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants