tf_glove.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:FYP-AutoTextSum 作者: MrRexZ 项目源码 文件源码
def _window(region, start_index, end_index):
    """
    Returns the list of words starting from `start_index`, going to `end_index`
    taken from region. If `start_index` is a negative number, or if `end_index`
    is greater than the index of the last word in region, this function will pad
    its return value with `NULL_WORD`.
    """
    last_index = len(region) + 1
    selected_tokens = region[max(start_index, 0):min(end_index, last_index) + 1]
    return selected_tokens
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号