def _token_boundaries_by_alignment(tokens, original_text):
    """
    Given a list of tokens and the original text,
    deduce the offsets of tokens
    """
    curr_pos = 0
    for tok in tokens:
        start_pos = original_text.index(tok, curr_pos)
        end_pos = start_pos + len(tok)
        yield start_pos, end_pos
        curr_pos = end_pos
