Giter VIP home page Giter VIP logo

sentiment-analysis's Introduction

Sentiment Analysis: 情感分析

Python


一、简介

1. 文本分类

文本分类是自然语言处理(NLP)最基础核心的任务,或者换句话说,几乎所有的任务都是「分类」任务,或者涉及到「分类」这个概念。情感分析是文本分类中非常主要的一个方向,应用场景非常广泛。

2. 情感分析

我们将中文文本情感分析分为三大类型,第一个是应用情感词典和句式结构方法来做的;第二个是使用传统机器学习方法来做的,例如Bayes、SVM等;第三个是应用深度学习的方法来做的,例如LSTM、CNN、LSTM+CNN、BERT+CNN等。
这三种方法中,第一种不需要人工标注,也不需要训练,第二种和第三种方法都需要人工标注大量的数据,然后做有监督的模型训练。


二、算法

4种实现方法

├── sentiment-analysis
    └── sentiment_analysis_dict
    └── sentiment_analysis_bayes
    └── sentiment_analysis_albert
    └── sentiment_analysis_albert_emoji

1. sentiment_analysis_dict

基于词典的方法。

2. sentiment_analysis_bayes

基于传统机器学习bayes的方法。

3. sentiment_analysis_albert

基于深度学习的方法,使用了语言模型ALBERT和下游任务框架TextCNN

4. sentiment_analysis_albert_emoji

基于深度学习的方法,使用了语言模型ALBERT和下游任务框架TextCNN
引入未知token(emoji是其中的一种),在微调过程中的同时学习未知token的语义向量,从而达到识别未知token情感语义的目的。


参考

基于词典的文本情感分析(附代码)
文本分类 [ALBERT+TextCNN] [中文情感分析](附代码)
中文情感分析 [emoji 表情符号]

sentiment-analysis's People

Contributors

hellonlp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.