Giter VIP home page Giter VIP logo

abilstm_att's Introduction

ABiLSTM_Att

融合对抗与注意力机制的Bi-LSTM网络在景区评论情感分析中的应用

情感分类流程

  • 0、数据标注,规范语句结构
  • 1、word2vec词向量训练
  • 2、使用标注语句进行模型训练
  • 3、使用未标注语句进行情感预测
  • 4、结合预测值生成评价分数

环境配置

  • Python 3.8.12
  • Tensorflow 2.3.0
  • Gensim 4.1.2
  • Jieba 0.42.0

数据目录

数据目录结构如下:

.
├── data # 语料
│   ├── 2class
│   │    ├── JD_MixedTrain.csv
│   │    ├── reviews_wuhan_labeled_plus.csv 
│   │    └── reviews_wuhan_labeled.csv
│   ├── 3class
│   │     ├── reviews_wuhan_labeled_plus.csv
│   │     └── reviews_wuhan_labeled.csv
│   ├── corpus
│   │     └──reviews_wuhan_seg.txt
|   └── result
|
├── logs # 日志文件
│
├── model_load # 预训练模型路径
│   ├── xxxxx
│   └── xxxxx
│
├── model_save # 训练模型保存路径
│   ├── xxxxx
│   └── xxxxx
│
├── stopwords # 停用词
│   └── hit_stopwords.txt   # https://github.com/goto456/stopwords
│
├── word2vec
│   ├── sgns.weibo.bigram-char
│   │   └── sgns.weibo.bigram-char # https://github.com/Embedding/Chinese-Word-Vectors
│   ├── gensim_word2vec.ipynb
│   └── xxxx
│
├── config.py
├── dataSet.py
├── main_load.ipynb
├── main_save.ipynb
├── model.py
├── README.md
└── tools.py

代码介绍

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.