For the input, do the predictions and return them. Args: input (a pandas dataframe): The data on which to do the predictions. There will be one prediction per row in the dataframe
(cls, text, bing_key=None)
| 56 | |
| 57 | @classmethod |
| 58 | def predict(cls, text, bing_key=None): |
| 59 | """For the input, do the predictions and return them. |
| 60 | Args: |
| 61 | input (a pandas dataframe): The data on which to do the predictions. There will be |
| 62 | one prediction per row in the dataframe""" |
| 63 | predictor_model = cls.get_predictor_model() |
| 64 | if bing_key: |
| 65 | spellChecker = BingSpellCheck(bing_key) |
| 66 | text = spellChecker.spell_check(text) |
| 67 | prediction = predictor_model.predict(text) |
| 68 | |
| 69 | return prediction |
| 70 | |
| 71 | @classmethod |
| 72 | def predict_batch(cls, texts): |
no test coverage detected