Let's suppose it's possible to tell that a keyword is spammy, what benefit does that provide? The person typing the keyword doesn't care if it's spammy, they just want useful results, quickly.
You can't just reverse the spammer's process, because it's a process followed by many legitimate, successful websites: Research keywords that drive traffic > produce content > build links > get traffic.