# Systematic Comparison of Vectorization Methods in Classification Context
## 2 Natural Language Processing in Artificial Intelligence  
Natural language processing (NLP) is a field of artificial intelligence, as well as linguistics, designed to make computers understand statements or written words in natural language used by humans [3]. It is commonly possible to encounter applications of NLP within autocorrect of written text, correctness checking, including grammar as well as spelling, automatic completion of a written word or sentence, spam filter in an email system, chatbots that are part of a customer service system, linguistic summaries of statements, or databases. Due to the enormous potential that NLP brings, current work in this topic focuses on the following topics [4]: natural language understanding at spoken and written levels, preparing summaries, commentaries and summaries of texts, extracting information from texts (e.g., search engines), conducting dialogue in natural language, automatic analysis of the meaning and grammar of texts, foreign language teaching, and the translation of texts. There are three basic steps in automatic text processing: (1) text preparation, (2) vectorization, and (3) final processing, such as classification. Any type of text analysis requires the transformation of unstructured documents into structured data. In machine learning, for supervised learning, it is necessary to create feature vectors in a specified feature space. The process in which we store previously prepared text in a specified vector space is called vectorization. Within natural language processing, from the point of view of data structures, two main types of vectorization can be distinguished:  
* mapping texts to vectors of strings--direct representation of words or sentences,
* mapping texts to vectors of numbers--indirect representation of words or sentences. The first one is not used often because of the high computational complexity of comparing words stored as strings. However, it has the advantage of being understandable by humans, which makes it easier to catch potential errors in the algorithm or to perform manual analysis of cases for which the algorithm fails. The second one refers to all methods that allow words to be converted to numbers, including language modeling and feature learning, referred to as word embedding. Mapping to vectors of numbers is possible only after tokenization. It is one of the basic transformations of the text by dividing it into smaller parts, which will then be analyzed. These parts are called tokens. In the case of text analysis, tokens are most often single words, but due to the nature of the analysis performed, they can also be punctuation marks or sets of words. Within the vectorization of text by mapping it to real numbers, specific methods are known, such as: (1) Continuous Bag of Words (CBOW), (2) Skip-gram bag of words, (3) Term Frequency-Inverse Document Frequency (TF-IDF), and (4) Distributed Memory of Paragraph Vector (DM-PV) [5; 6; 7; 8; 9]. Word2 Vec is one of the largest and most widely used word vectorization methods in natural language processing. This model was created by Google in 2013. It is a predictive deep learning model based on computing and generating high-quality, distributed and continuous, consistent vector representations of words to capture the contextual and semantic similarity of words. These are typically unsupervised models that can take large text corpora, create dictionaries for words, and generate consistent word embeddings in vector space [5; 6]. There are two different model architectures that can be used within Word2 Vec to create representations of embedded words [5; 6]: Continuous Bag of Words (CBOW) Model and Skip-gram Model. The Continuous Bag of Words (CBOW) model learns to predict the target word using all the words in its environment. The sum of context vectors is used to predict the target word, which means that the target word vector is created based on the surrounding words. The number of neighboring words considered is determined by the defined size of the window surrounding the target word.