Skip to content

feat: add optional TextBlob and HuggingFace backends to classify_sentiment#48

Open
agentksimha wants to merge 8 commits intohumanai-foundation:mainfrom
agentksimha:added/textblob-and-pipeline
Open

feat: add optional TextBlob and HuggingFace backends to classify_sentiment#48
agentksimha wants to merge 8 commits intohumanai-foundation:mainfrom
agentksimha:added/textblob-and-pipeline

Conversation

@agentksimha
Copy link
Copy Markdown

  • Added use_textblob and use_huggingface boolean flags to classify_sentiment() — both default to False, keeping VADER as the default with no behaviour change
  • hf_pipeline and textblob_analyzer initialised as None at module level and globalised inside the function; each loads only once on first use, avoiding redundant re-instantiation across .apply() calls
  • Imports for transformers and textblob are lazy — pipeline won't break if neither package is installed

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