main.py 文件源码

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

项目:RottenCrawler 作者: kevin940726 项目源码 文件源码
def main():
    with open(path, 'r') as data_file:
        movieList = json.load(data_file)

    count = 0
    np.seterr(divide='ignore', invalid='ignore')
    for movie in movieList:
        if movie["reviews"] and movie["critics"]:
            readMovie(movie)
            # reviewer_list[movie["movieTitle"]] = recommender(movie)
            # cluster[movie["movieTitle"]] = HAC(movie)
            score_list[movie["movieTitle"]] = newScore(movie)

        count += 1
        print count
        break

    with open("scoreList.json", 'w+') as outfile:
        json.dump(score_list, outfile, indent=4, separators=(',', ': '))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号