def token2id(token_lists, map_token_to_id, unk_id=1):
    """ transform tokens to ids

    Args:
        token_lists: List[List[Char]] -> input list of lists
        map_token_to_id: dict
    Returns:
        ids: List[List[int]]
    
    >>> token_lists = [["中","国","结"]]
    >>> map_token_to_id = {"中":2,"国":3,"<UNK>":1}
    >>> token2id(token_lists, map_token_to_id)
    [[2, 3, 1]]
    """
    ids = []
    for tokens in token_lists:
        ids.append([map_token_to_id.get(t, unk_id) for t in tokens])
    return ids