Could you rewrite this using the ternary operator and also so that if the distance variable is out of range it returns -1?
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence