Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@keegangeorge
Copy link
Member

@keegangeorge keegangeorge commented Feb 4, 2025

πŸ” Overview

This update adds a new report page at admin/reports/sentiment_analysis where admins can see a sentiment analysis report for the forum grouped by either category or tags.

βž• More details

The report can breakdown either category or tags into positive/negative/neutral sentiments based on the grouping (category/tag). Clicking on the doughnut visualization will bring up a post list of all the posts that were involved in that classification with further sentiment classifications by post.

The report can additionally be sorted in alphabetical order or by size, as well as be filtered by either category/tag based on the grouping.

πŸ‘¨πŸ½β€πŸ’» Technical Details

The new admin report is registered via the pluginAPi with api.registerReportModeComponent to register the custom sentiment doughnut report. However, when each doughnut visualization is clicked, a new endpoint found at: /discourse-ai/sentiment/posts is fetched to showcase posts classified by sentiments based on the respective params.

πŸ“Έ Screenshots

Screenshot 2025-02-14 at 11 11 35

@keegangeorge keegangeorge marked this pull request as ready for review February 18, 2025 21:18
Copy link
Contributor

@lis2 lis2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is excellent PR, I just have minor comments πŸš€

@keegangeorge keegangeorge requested a review from lis2 February 20, 2025 16:48
@keegangeorge keegangeorge merged commit 24f0e12 into main Feb 20, 2025
6 checks passed
@keegangeorge keegangeorge deleted the sentiment-analysis branch February 20, 2025 17:14
keegangeorge added a commit that referenced this pull request Feb 27, 2025
## πŸ” Overview
This update adds a new report page at `admin/reports/sentiment_analysis` where admins can see a sentiment analysis report for the forum grouped by either category or tags. 

## βž• More details
The report can breakdown either category or tags into positive/negative/neutral sentiments based on the grouping (category/tag). Clicking on the doughnut visualization will bring up a post list of all the posts that were involved in that classification with further sentiment classifications by post. 

The report can additionally be sorted in alphabetical order or by size, as well as be filtered by either category/tag based on the grouping.

## πŸ‘¨πŸ½β€πŸ’» Technical Details
The new admin report is registered via the pluginAPi with `api.registerReportModeComponent` to register the custom sentiment doughnut report. However, when each doughnut visualization is clicked, a new endpoint found at: `/discourse-ai/sentiment/posts` is fetched to showcase posts classified by sentiments based on the respective params.


## πŸ“Έ Screenshots
![Screenshot 2025-02-14 at 11 11 35](https://github.com/user-attachments/assets/a63b5ab8-4fb2-477d-bd29-92545f44ff09)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants