Build a small text sentiment classifier as a Python class named SentimentClassifier.
Your class must expose two methods:
After calling fit, the attribute self.vocab must be a dictionary mapping each distinct token seen during training to a unique integer index. Tokens are produced by lowercasing the text and splitting on whitespace. The order of insertion into self.vocab must follow the order tokens are first encountered while scanning the training texts in order.
Tokens in a prediction input that were never seen during training must be ignored. The classifier must be fully deterministic (no randomness).