This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python2.7 | |
#coding=utf-8 | |
""" | |
Compute editorial review and product review similarity feature. | |
This module use gensim to build review tf-idf model and compute similarity of every review and a given txt. | |
So this module need a excel file contain all reviews and a txt file contain editorial review as input data. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python2.7 | |
#coding=utf-8 | |
""" | |
Read data from excel file and txt file. | |
Chinese word segmentation, postagger, sentence cutting function. | |
""" | |
import xlrd |
NewerOlder