# Development of Dialogue Management System for Banking Services
## 3 Dataset and Pre-Processing  
Dataset used in this research is LiveChat data from the banking domain in the Azerbaijan language. It consists of 161,856 customer-to-operator chats. The amount of customer messages is 1,894,543 out of 3,178,989 total sentences. Although the dataset is related to the narrow field of the financial sector, due to the agglutinative nature of the Azerbaijan language and noise of the online chat data, it has large vocabulary content (450,321 unique words). For example, because of the misspellings, online chatting style, and usage of different languages there can be encountered several variations of the same word, such as _\"kredit\"_, _\"credit\"_, _\"speum\"_, _\"kridit\"_, _\"kredit\"_, etc., all referring to the word _\"credit\"_. Usage of different keyboard layouts between English and Azerbaijan can also cause other variations of the words and sentences. Let us consider following two sentences: \"Mon olayn kredit sifaris vermak istoyiram\" and \"Men online kridit sifarish vermek isteyirem\". In these examples, the first sentence consists of orthographically correct words, but in the second sentence all the words are misspelled. The contextual meanings of these two sentences are absolutely identical--\"I would like to order a credit card\", however we ended up with 12 unique word forms of 6 total words. Overall, in the used dataset, 74% of all sentences have misspelled words.  
Another reason for having many different forms of words is the morphological structure of the agglutinative languages, e.g., having suffixes. For example, some of the morphological forms of the word \"_kart_\" (\"_card_\") are: _\"kartt_\", _\"karttm\"_, _\"karttm\"_, _\"kartta\"_, _\"karttm\"_, _\"karttm\"_, _\"karttm\"_, _\"karttm\"_, etc.  
A total of 293,182 words are used only once throughout the whole dataset. The quantity of words that were encountered more than five times is 59,861. Distributions of the frequencies of words are shown in the bar chart in Figure 1.  
In our work, the most recent 10,000 chats were processed, and their intent manually labeled by human agents. Intent refers to the goal of a customer during the conversation with an agent. Intent of a user message in the chat-bot can be a question or an operation that the user wants to execute. Various examples can be seen in the Table 1.  
First user messages in each thread were used to detect an intent of a conversation. Other sentences were used in conversations to handle a dialog flow or added as chitchat and FAQ questions. Additionally, messages of greetings and gratitude were added to the intent set, which together formed a total of 63 intents. On average, for each intent the number of examples is 161, and the maximum number of examples encountered for all the types of \"card request\" is 1589. Information about distribution of intents is represented in Table 2 and Figure 2.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Message** & **Intent** \\ \hline “Mon sizin bankda kredit sifaris etmok istayirom.” 1 & credit request \\ (I _would like to order a credit card in your bank_) 2 & card activation \\ \hline “Debet karth necaaktivlasdirobilárom?” & \\ _(How can I activate the debit card?)_ & card activation \\ \hline “Kredit börcumuódomok istayirom.” & \\ _(I would like to pay my credit debt.)_ & credit payment \\ \hline \hline \end{tabular} \({}^{1}\) Original user message in Azerbaijan language;2 English translation of the original text.  
\end{table}
Table 1: Chat-bot intent examples.  
Figure 1: Word frequency group distribution.