Your question is NLP Preprocessing and Overfitting. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
How do you handle NLP data preprocessing, prevent overfitting, and evaluate models using F1 score?
Explain a practical workflow for preparing raw text, splitting data without leakage, training a text classification model, and selecting regularization methods. Include how you would handle class imbalance, choose between macro and weighted F1, and investigate errors. Provide concise Python or pseudocode showing preprocessing, training, and evaluation.