eval_data_helpers.py 文件源码

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

项目:question-classification-cnn-rnn-attention 作者: sefira 项目源码 文件源码
def process_data(line):
    """
    word break and remove word
    Returns split sentences
    """
    # Word break
    seg_list = jieba.cut(line)
    line = u' '.join(seg_list)
    # Remove word
    ss = re.findall('[\n\s*\r\u4e00-\u9fa5]|nmovie|nrcelebrity', line)
    line = u"".join(ss).strip()

    if(len(line) < 2):
        return "UNK"
    return line
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号