def find_column(text, token):
    """ Compute column.
    input is the input text string
    token is a token instance
    """
    last_cr = text.rfind('\n', 0, token.index)
    if last_cr < 0:
        last_cr = 0
    column = (token.index - last_cr) + 1
    return column