bool ShouldStepInRecursion(const TfLiteSkipGramParams* params,
                           const std::vector<int>& stack, int stack_idx,
                           int num_words) {
  // If current stack size and next word enumeration are within valid range.
  if (stack_idx < params->ngram_size && stack[stack_idx] + 1 < num_words) {
    // If this stack is empty, step in for first word enumeration.
    if (stack_idx == 0) {
      return true;
    }
    // If next word enumeration are within the range of max_skip_size.
    // NOTE: equivalent to
    //   next_word_idx = stack[stack_idx] + 1
    //   next_word_idx - stack[stack_idx-1] <= max_skip_size + 1
    if (stack[stack_idx] - stack[stack_idx - 1] <= params->max_skip_size) {
      return true;
    }
  }
  return false;
}
bool ShouldStepInRecursion(const TfLiteSkipGramParams* params,
                           const std::vector<int>& stack, int stack_idx,
                           int num_words) {
   
  if (stack_idx < params->ngram_size && stack[stack_idx] + 1 < num_words) {
     
    if (stack_idx == 0) {
      return true;
    }
     
     
     
     
    if (stack[stack_idx] - stack[stack_idx - 1] <= params->max_skip_size) {
      return true;
    }
  }
  return false;
}