| 50 | } |
| 51 | |
| 52 | bool IsValidNgram(const tflite::StringRef& strref) { |
| 53 | for (const auto& s : kBlacklistNgram) { |
| 54 | if (Equals(s, strref)) { |
| 55 | return false; |
| 56 | } |
| 57 | } |
| 58 | return true; |
| 59 | } |
| 60 | |
| 61 | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { |
| 62 | const TfLiteTensor* input = GetInput(context, node, 0); |