def split_text_by_maxlen(text, maxlen=512):
    """
    长句切分为短句，每个短句maxlen个字
    :param text: str
    :param maxlen: int, 最大长度
    :return: list, (sentence, idx)
    """
    result = []
    for i in range(0, len(text), maxlen):
        result.append((text[i:i + maxlen], i))
    return result