# A Web Interface for Analyzing Hate Speech
## 3 Results
### The Implemented Web Interface  
The PHARM Interface serves as the front-end of the PHARM software. It is the graphical interface for exposing data and functionality to the users and relies on the back-end, which consists of the PHARM scripts. For the development of the interface, the Python web framework Flask has been used. The choice is justified, as the NLP and data analysis scripts are also written in Python and, following this approach, all the functionality of the interface can be included within a common software project. The graphical user interface (GUI) has been mainly designed in Bootstrap, a popular HTML, CSS, and JavaScript library. Additional HTML, CSS, and JavaScript blocks have been added where needed. The Flask project has been deployed on a virtual machine and is served using the Waitress, a production-quality pure-Python web server gateway interface (WSGI) with very acceptable performance. The PHARM Interface is accessible at [[http://pharm-interface.usal.es](http://pharm-interface.usal.es)]([http://pharm-interface.usal.es](http://pharm-interface.usal.es)) (accessed on 18 March 2021). The home screen of the Interface gives some basic information about the PHARM project and provides a starting point for accessing the supported NLP methods (Figure 1). Let us further describe the software by analyzing the types of users and the actions that have been formally specified. The core functions of the Interface are five: search, analyze, scrape, annotate, and submit, whereas two types of users have been defined: the visitor and the contributor. A visitor can search and analyze hate speech data, while the contributor can also scrape, annotate and submit relevant content. The functions that are available to all users can be considered as public, while the rest as private. The private functionality is only accessible by registered users which are intended to be media professionals. Figure 2 demonstrates the succession of all functions in a single workflow, divided into the two aforementioned groups. As the current work focuses on the public functionality of the interface, only a brief description of the private functions is given. \begin{table}
\begin{tabular}{c c c} \hline \hline \# & **Question** & **Answers-Distribution** \\ \hline
1 & Gender & Male (28.1\%), Female (71.9\%) \\
2 & Age & 18–22 (12.5\%), 23–30 (43.8\%), 31–40 (34.4\%), \\  & & 41–50 (47.7\%), 50+ (4.7\%) \\
3 & Education & Highschool (14.1\%), Vocational Learning (1.6\%), \\  & & Bachelor (31.3\%), Master (45.3\%), PhD (7.8\%) \\
4 & Computer Familiarity & 1 (3.1\%), 2 (29.7\%), 3 (20.3\%), 4 (34.4\%), 5 (12.5\%) \\
5 & Internet Familiarity & 1 (1.6\%), 2 (18.8\%), 3 (9.3\%), 4 (54.7\%), 5 (15.6\%) \\
6 & News Awareness & 1 (0\%), 2 (3.1\%), 3 (21.9\%), 4 (37.5\%), 5 (37.5\%) \\
7 & Working/has worked as Journalist & Yes (46.9\%), No (53.1\%) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Demographic Information of Participants. Search: One of the main functionalities of the interface is the navigation through the hate speech records contained in the database. The user can view records for any supported language (English, Greek, Italian, Spanish) or, additionally, filter the results by applying a variety of filters. The available filters are:  
* Source selection (tweets, Facebook posts and replies, website articles and comments). * Date and time selection (show results inside a specific period). * Annotation filtering (hate/no hate, positive/neutral/negative sentiment). * Keyword filtering (a search query for finding occurrences to texts). The user can preview the records as a list, download them as a CSV or a JSON file, or display detailed information for each item. The search results can be viewed and downloaded either in the \"simple\" or the \"scientific\" form, disabling or enabling the presence of metadata, respectively. Figure 3 presents the search results screen of the interface. Analyze: When a record is selected, or a text is placed on the home screen, a detailed report appears.