It is good you are thinking about solving spam. But automated ways can be problematic. And in comments, many times we only have one single vote, worth 0.01, and it means a lot. It would be psychologically a bit bad if that cent that a lovely friend gave you is removed. I know it can sound stupid... being only 1 cent.
I cannot contribute with code in github, since it is not my programming language, but with ideas.
I guess it is a bit more complicated to do, but what about being able to flag posts/comments with different types of flagging, one of them could be flag as possible spam. Then if only one person flags it as spam, nothing happens, it could have been a bad interpretation, but if many different people flag a post as spam, then all pending payout rewards are removed from that user and bandwidth is halved or something similar. They could buy SP again and keep doing it? Then maybe a spam flagged user, should not be able to increase bandwidth or SP for some months for example. We could also flag users, not only posts.
Thanks!