behaviorbot / sentiment-bot

Replies to toxic comments with a maintainer designated reply and a link to the repo's code of conduct
https://github.com/apps/sentiment-bot
MIT License
83 stars 12 forks source link

Use summary score instead of span score #19

Closed sloria closed 6 years ago

sloria commented 6 years ago

The bot checks the first span score returned by the Perspective API here:

https://github.com/behaviorbot/sentiment-bot/blob/e3f6c7be50ebd95ff446fcee475bd23a75388a55/index.js#L34

Why only use the first span score? Wouldn't it be more accurate to use the summary score?

See the Perspective API docs.

welcome[bot] commented 6 years ago

Thanks for opening this issue, a maintainer will get back to you shortly!

hiimbex commented 6 years ago

Good point! I must've misunderstood when first reading the docs. Feel free to either open a PR or I'll make this change shortly.