## 3 The Methodology Used for the Implementation
### Input Data Processing  
The input data collected in the first step are processed using a set of fundamental and acknowledged techniques for the NLP domain [17].  
1. The first procedure applied on the data is the elimination of punctuation. Given that tweet posts are close to natural language, they do not follow spelling and punctuation rules. In general, abbreviations are used in a tweet, punctuation marks are non-existent, too few, or used incorrectly. The case where a post follows all the grammatical norms is rare, even if some posts come from some great political individuals. Therefore, to perform this procedure we use a regular expression, or RegEx.
2. Transform all characters in lower-case, using a predefined Python method. This plays an important role in the characteristics matrix which is used in training the models.
3. The next steps in the data processing are the tokenization, lemmatization, and stemming processes, implemented through the Natural Language Toolkit (NLTK) platform [18]. Tokenization splits the text based on separators, the most commonly used being the space to generate the most common type of token--the word. This is also the approach used in this research. Once we obtained the tokens, we applied the lemmatization and stemming procedures. Lemmatization groups the different infected forms of a word, so that they are further treated as a single element. Bringing the words to the basic form takes into account several forms of derivation, such as the plural, conjugation according to person or tense, possessive pronouns, datives, and superlative forms. Stemming removes or replaces word suffixes to reduce words to their common root. Lemmatization and stemming are quite similar; however, lemmatizing focuses more on the context of words and on their morphological analysis [19].  
Thus, the tokenized text is further processed, and the vocabulary initially obtained is substantially reduced by merging tokens that refer to the same element.  
4. Remove Stop Words--connection terms connection, conjunctions, interjections, indefinite article, etc., will be removed. The purpose of this step is to isolate only the terms with high informational value. We used the specialized utility from the NLTK package, which automates the process of removing Stop-Words. Lists of such keywords have been built over time but are constantly updated. Using the NLTK utility which we finally obtained, after all the procedures performed in this subsection, the set of posts were prepared for the next stage.  
In order to observe the differences before and after processing, let us analyze as an example the content of the following unprocessed Republican post: \"#Zika fears realized in Florida. House GOP acted to prevent the crisis. Dems in action, inexcusable! Time to put politics aside & work together!\". After all the processing techniques mentioned above have been applied, this tweet becomes: \"zika fear realize Florida House GOP act prevent crisis Democrat action in excuse time put political aside work together\". It can be noticed  
Figure 3: Democratic and Republican tweets distribution in the data set.  
how unknown tokens such as \"zika\" or \"gop\" were kept, and the rest of the terms were brought back to basic form. These applied procedures make the classification of posts much easier. Now, even an analysis performed with the naked eye on the keywords in this post can already direct us to the political ideology of the individual who posted this tweet. Further on, we automate this process with the help of the algorithms which is presented in Section 4.