Fixes an issue in local models when predicting with text fields

If the term to predict with contains special regex chars (*?$ ...) there
was an exception in the `Pattern.compile`