Coder Social home page Coder Social logo

mcsh / digikala-sentiment-lstm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rajabzz/digikala-sentiment-lstm

0.0 2.0 0.0 301 KB

🧠Trains a simple LSTM model on the Digikala product comment dataset for the sentiment classification task

License: MIT License

Python 100.00%

digikala-sentiment-lstm's Introduction

digikala-sentiment-lstm

🧠Trains a simple LSTM model on the Digikala product comment dataset for the sentiment classification task

Installation

Install python and pip. Create a virtualenv and activate it. Then:

$ git clone https://github.com/rajabzz/digikala-sentiment-lstm.git
$ cd digikala-sentiment-lstm
$ mkdir data
$ mkdir models
$ pip install -r requirements.txt

Copy your dataset to the data folder. If you don't have a dataset, consider using digikala-crawler.

Running The Program

The following command pre-processes the data, trains the LSTM model, evaluates it and starts an interactive mode for the user's manual inputs:

$ python main.py

In case where you need to override the default path for the raw data, use the following command:

$ python main.py --full_data_path=path/to/data.jl

After training, the trained model will be saved. You can use this model instead of training a new one by using the following command:

$ python main.py -t -M --data_model_ready --model_path=models/model.h5

For more information on other options:

$ python main.py --help

License

This project is licensed under the MIT License - see the LICENSE file for details

Task List

  • Split the code into multiple files.
  • Use sys.argv instead of manually changing the variables inside the code.

digikala-sentiment-lstm's People

Contributors

mcsh avatar rajabzz avatar szamani20 avatar

Watchers

 avatar  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.