Write a python code to clean, preprocess the public titanic dataset and model a machine learning algorithm
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence