def indx_where_ngram_ends(st_indx, ngram_toks, sent_toks):
    """

        Case 1: where sent_toks contains stopwords making it hard to match ngram that already has stopwords removed:
            Given st_index = 2 (sent_toks index where ngram_toks starts)
            Given ngram_toks: ['orange', 'new', 'black']
            Given sent_toks: ['best', 'is', 'orange', 'is', 'the', 'new', 'black']

            The goal of this function is return 5: length of substring (['orange', 'is', 'the', 'new', 'black']) with stopwords that encompass ngram_toks

        Negative Case 1:
            Given st_index = 5 (sent_toks index where ngram_toks starts)
            Given ngram_toks: ['convention', 'center']
            Given sent_toks: ['it', 'is', 'the', 'brown', 'r.', 'convention', 'center']

            The goal of this function is return 2: length of substring ([convention', 'center']) without stopwords that encompass ngram_toks
    """
    j = st_indx
    length = 0
    start = -1
    match_count = 0
    for i in range(len(ngram_toks)):
        while j < len(sent_toks):
            length += 1
            ngram_tok = ngram_toks[i].strip().lower()
            sent_tok = sent_toks[j].strip().lower()
            if sent_tok.find(ngram_tok) != -1:
                if start == -1:
                    start = j
                j += 1
                match_count += 1
                break
            j += 1
    if match_count == len(ngram_toks):
        return start, length
    else:
        return start, -1
