Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

rajabzz/digikala-sentiment-lstm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages