Skip to content

Repository files navigation

Sentimental_analysis_Chinese

Chinese sentences sentimental analysis

Step0: Download the code and create Save_modeldirectory in the same In the current root

Step1: Train model

run: - Bi_LSTM_model - TextCNN - LSTM_model

Step2: Inference

  • Inference some chinese movies sentimental results in inference.py
if __name__ == "__main__":
    sentence_negative = '这部电影演的太烂的,演员也烂,台词也烂,整个电影就是一个烂片'
    sentence_positive = '这部电影有点善良。'
    tensor = get_sentence_infer(sentence_positive)
    predict_sentence(tensor, 'Bi_LSTM')

分词

结巴分词可能会快一些,清华和北大的分词load model需要一定时间

About

Chinese sentences sentimental analysis

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages