This article discusses how simple and automated steps can now be taken using machine learning to collect offensive comments on social media. Today, the number of negative comments on online content is on the rise. We are building a database of obscene comments posted on social networks and the media in Kazakhstan, which reach a large audience. While studying complaints from many social networks, we noticed that the number of discriminatory comments on online content is growing every day. The results of our study will not only explore the root of rude words posted on social media using machine learning methods, but will also help differentiate types of offensive comments and access an automated dataset.