Code to infer topics from comments stored in a MySQL database