process_both.py 文件源码

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

项目:disaster-mitigation 作者: varun-manjunath 项目源码 文件源码
def resource_similarity_score_via_word_net_1(need_res_set,offer_tweet_list):
    if len(need_res_set)==0:
        return 0
    value=0
    offer_res_list=[]
    for i in offer_tweet_list:
        for j in i.split():
            if stemmer.stem(j.lower()) not in out_stem_list:
                offer_res_list.append(stemmer.stem(j.lower()))

    for word in need_res_set:
        temp= get_similarity_score_1(word,offer_res_list)
        if temp > 0.6:
            value=value+temp

    return value/len(need_res_set)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号