Skip to content

feat(nlp): tool analyze_sentiment con cardiffnlp (E3-03)#42

Merged
g-garciac2022 merged 1 commit into
mainfrom
feat/E3-03-analyze-sentiment
Jun 2, 2026
Merged

feat(nlp): tool analyze_sentiment con cardiffnlp (E3-03)#42
g-garciac2022 merged 1 commit into
mainfrom
feat/E3-03-analyze-sentiment

Conversation

@g-garciac2022

Copy link
Copy Markdown
Collaborator

E3-03 — Análisis de sentimiento

Closes #38

Qué incluye

  • Tool analyze_sentiment(text) (backend/integrations/nlp/tool.py): clasifica el sentimiento de un texto en positive / neutral / negative vía cardiffnlp/twitter-roberta-base-sentiment-latest. Reutiliza HFClient.classify (text-classification, sin variante nueva). Modelo fijo dentro de la tool. Se añade al register() existente (sin tocar main.py).
  • Docs (commit aparte): iteración E3-03 en el README con el motivo de elegir cardiffnlp (3 vías) frente a distilbert (binario).

Decisiones

  • cardiffnlp (3 vías) porque en titulares de noticias el neutral es frecuente; forzar pos/neg distorsiona. Verificado: "The committee will meet on Tuesday"neutral (0.94).
  • La inferencia remota da timeouts puntuales (HF); el cliente los reporta como ToolResult.fail. Reintento = mejora futura.

Tras este PR queda #39 (tests NLP) para cerrar la Épica 3.

@g-garciac2022 g-garciac2022 merged commit 39ee1cc into main Jun 2, 2026
1 check passed
@g-garciac2022 g-garciac2022 deleted the feat/E3-03-analyze-sentiment branch June 2, 2026 16:36
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.

[E3-03] feat(integrations): tool analyze_sentiment

1 participant