Code Monkey home page Code Monkey logo

for_mari_ai's Introduction

Sentiment Analysis with GRU

Requirements

python3
tensorflow >= 1.13

Task

Given a sentence, assign a label according to its' content.

i liked the Da Vinci Code a lot. --- 1

data & preprocess

The data provided in the data/ directory is a csv file

In data_util.py I provide some funtions to process the csv file.

Usage

This contains several steps:

  1. Before you can get started on training the model, you mast run
python data_util.py
  1. After the dirty preprpcessing jobs, you can try running an training experiment with some configurations by:
python main.py
  1. You can also run an evaluation by:
python server.py 

Then follow the instruction. Hope you enjoy it.

Reference

A Sensitivity Analysis of (and Practitioners’ Guide to) Convolutional Neural Networks for Sentence Classification.

Bag of Tricks for Efficient Text Classification.

Recurrent Convolutional Neural Networks for Text Classification.

Hierarchical Attention Networks for Document Classification.

Folder Structure

├── data            - this fold contains all the data
│   ├── train
├── model           - this fold contains the pkl file to restore
├── main.py         - main structure of the project
├── methods.py      - all methods we use 
├── data_util.py    - preprocess the data
├── load_data.py    - data generator
├── server.py       - server

To do

  1. Still need parameters searching.
  2. Need structure changing to satisfy parameters chosing.
  3. Make codes nicer.

for_mari_ai's People

Contributors

luhengshiwo avatar

Watchers

James Cloos avatar paper2code - bot 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.