Rule Engine: Fallback System if the Model Fails to Load
It is the backup and open dictionary-based system that kicks in if the machine learning (ML) model cannot be loaded.
This engine is only a fuse; if the ML model is loaded it does not run at all. The two do not run simultaneously and contradict each other. The rule engine does not use complex math; it looks directly at word lists, strict logical conditions (like having consecutive question marks in the title), or dictionary scoring.
Example: When the model file fails to load for any reason, the rule engine kicking in and continuing to classify the news at a basic level.
Go deeper
The Rule Engine is a seatbelt, but its success rates are markedly lower compared to the ML model. For instance, while the ML model shows a success of ≈0.66 (F1) in the Critical TR label, the rule engine stays at only ≈0.30. In fact, the rule engine got 0.00 in all values on the Critical EN row. However, it provides a useful verification in Sentiment Neutral detection with its Turkish (F1: 0.74) and English (F1: 0.66) results. The reason for the engine’s existence is not high accuracy, but ensuring the app is not left without labels when the model fails to load.