SOBotics / FireAlarm

A Stack Exchange chatbot to catch low-quality posts.
https://bonfire.sobotics.org
MIT License
14 stars 8 forks source link

New filters #24

Closed double-fault closed 6 years ago

double-fault commented 6 years ago

Adds new metric filters. Their likelihood will subtract from the Naive Bayes difference.

A new filter type has been implemented, customFilterWithWeight. I've also introduced a new field likelihood in the Report struct, to store the complete likelihood. difference has been left as it was storing the Naive Bayes difference. Because of this change, the existing reports in reports.json will need to be modified to create a new likelihood field having the Naive Bayes score (since that was the only filter then). To do this, I've included a simple Python script (I'm more proficient with Python).

Currently, I've added only two filters, Image Without Code and Low Length. I'll add more in the future if necessary.