## 2 Materials and Methods
### Data  
The core of the machine learning model is the data set on which it is trained and evaluated. The data set considered in this study is derived from two primary sources. Thefirst is the well-known public dataset \"SemEval\" (Semantic Evaluation Exercises), which comprises about 500,000 entries. This set has been collected over several years and is widely recognized in the NLP community for its richness in semantic information and diversity of contexts. Furthermore, to ensure the topicality and relevance of the content, we have supplemented this set with data extracted from news platforms and online forums totaling some 200,000 additional entries, collected over six months, from January to June 2023. In addition, sources with demographic data are considered; these play a crucial role in improving the personalization and effectiveness of chatbots. However, to use these data effectively, it is essential to understand how it is collected, processed, and applied. This work collects demographic data through various sources, including surveys, user logs, online interactions, and social networks. Ensuring that collection is done ethically and with appropriate user consent is essential. This involves ensuring privacy and compliance with data protection regulations. Demographic data is used in chatbots to personalize responses and the user experience. This may include tailoring tone of voice, communication style, and product or service recommendations based on age, gender, geographic location, and other demographic factors. It is essential to highlight that these data must be transparent and ethical, avoiding discrimination or bias. Using these data also raises ethical challenges and considerations, such as fairness in treating different demographic groups and protecting privacy. It is essential to address these aspects responsibly and ensure that the chatbot does not perpetuate bias or discrimination. Since the data comes from multiple sources, it was essential to ensure consistency and quality. Approximately 25,000 duplicate entries were initially removed, and an additional 10,000 not in the target language (Spanish and English) were filtered out. Entries with missing or inconsistent information numbered around 5000 were also discarded. Subsequently, advanced tokenization was performed, separating the text into meaningful units. These tokens were then mapped to concepts in our ontologies using semantic matching techniques. The final data set, with a size of approximately 660,000 entries, is organized in JSON format. Each entry in the set consists of three main parts:  
* Original Text: The fragment of source text that can be a sentence or a paragraph. * Semantic Tokens: A list of tokens derived from the original text, each associated with its corresponding semantic entity in the ontology. On average, each entry contains around 50 tokens. * Attention Labels: An annotation about the type of semantic attention required for manually labeled tokens is included. These tags are present in approximately 40% of the entries. In the preprocessing phase of our chatbot model, various techniques were applied to ensure data quality and consistency. Initially, data cleaning was performed to remove special characters and spelling errors. Text normalization was then performed, including converting all text to lowercase, removing unnecessary punctuation, reducing variability, and improving computational efficiency. For tokenization, the Natural Language Toolkit (NLTK) was widely recognized in NLP for its effectiveness in identifying and segmenting words into meaningful units. This tool allows you to handle exceptional cases, such as contractions or hyphenated words, ensuring an accurate text decomposition into tokens. In the preprocessing, a filtering of'stop words' is included. Common words such as \"the\" and \"a\" were eliminated due to their frequent presence and little semantic value, based on research that demonstrates how the elimination of'stop words' can improve efficiency and precision in the NPL.