You are given a list of words which are reviews. Build a sentiment analysis model. No off the shelf functions/packages to be used.
Asked in the ML coding stage. Implement a multinomial Naive Bayes classifier using only standard language features and math.log.
training_reviews is a list of [review, label] pairs, where review is a string and label is 0 or 1. test_reviews is a list of strings. Return a list of predicted labels in the same order. Tokenize case-insensitively, treating consecutive English letters as one token. Use Laplace smoothing, classify by the larger log posterior, and predict 0 on ties.
def train_sentiment_model(training_reviews, test_reviews):