def inv_bow_sp(b: str, n: int) -> list:
    """
        Inverse of `bow` method, sparse version. Allows repeats.
        @param b: string representation
        @param n: number of words in vocabulary
        @return: sparse representation of bag of words of the form [(data,row,column)]
    """
    assert isinstance(b, str), type(b)
    s = []  # [(dat,row,col)] representation
    if len(b) > 0: s = list(map(int, b.split(':')))
    return s