The paper introduces a very current topic in the field of natural language processing oriented to the automatic detection of hate speech and offensive language performed in the Slovak language. In this work, we describe the creation and processing database of short texts composed of posts and comments written in Slovak and published on social media. The proposed approach is based on sentiment analysis and implementing a tool for detecting hate speech using a convolutional neural network with elements of a recursive neural network, applied to a created database of comments. We achieved 61.32% detection accuracy only on a small set of training data balanced in the number of positive, neutral, and negative sentiments.