Our first NLP model will use traditional NLP techniques, that is, not deep learning. For the rest of this chapter, when we use the term traditional NLP, we mean approaches that do not use deep learning. The most used method for NLP in traditional NLP classification uses a bag-of-words approach.
We will also use a set of hyperparameters and machine learning algorithms to maximize accuracy:
- Feature generation: The features can be term frequency, tf-idf, or binary flags
- Preprocessing: We preprocess text data by stemming the words
- Remove stop-words: We treat the feature creation, stop-words, and stemming options as hyperparameters
- Machine learning algorithm: The script applies three machine learning algorithms ...