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.
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
FEATURE: Order by emotion on /filter #913
FEATURE: Order by emotion on /filter #913
Changes from all commits
27121d6
38d14e4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I am confused a bit about ordering vs filtering here. The admin report for a given emotion should point to a filtered list of topics where there is a match for that emotion, right? For that, would we need an explicit filter like
emotion:disgust
?We certainly want
order:emotion_disgust
, no doubt, but I think we also need the filtering...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will all be accessed from a link, they aren't supposed to be typed, so do we really need the double
emotion:disgust order:emotion_disgust
?Filter and Order here are a bit fuzzy. Ordering works, you simply show first topics where most posts have that emotion. But filter means you need to set a threshold, as every classification contains some of that emotion as an infinitesimal decimal. What do you suggest? Also worth noting that emotion is per post, while filter acts on topics, so we need a way to translate the concepts.
I'd go with a
having
clause limiting topics to where the emotion is presented with a score of at least 10% in at least 5% of the replies built-in into the ordering, at least for starters. Expect those to be adjusted over time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not a fan of the double keywords. Not a fan of
order:X
filtering out results either because it goes against what order does in other places. I don't have a definitive answer, maybe in the short-run we go with theorder:
keyword only and accept it is exceptional.Regarding the cutoff, I'm happy with your suggestion. The main thing is that we need to use the same threshold that we use in the admin report:
The graph here will likely change to accomodate the additional emotion dimensions, but, if it will still show a count per emotion, we need to respect that same count in the filtered view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That graph is going the way of the dodo. We will replace it with a table that will contain the links to this new filter.
This PR is only adding the filter, but they won't be used yet.
Added the proposed filter in 38d14e4, see the updated tests.