Giter Club home page Giter Club logo

sentiment-analysis-with-lstm-in-persian's Introduction

Sentiment-Analysis-in-Persian-Language_LSTM

Sentiment Analysis with LSTM in Persian

First Phase

Data Aquisition

In this repository I have used LSTM for prediction of whether people would like or dislike a product based on the previous comments in the Digikala site. I have scraped the data from Digikala and have labeled them based on the stars people who had bought the products gave to them. I have also used another label from the same website which indicates people suggest others to buy that products or not. because many of the comments are noisy and do not provide a clean data for us and it is not such a reliable source by adding the second label to the data we can ensure a higher accuracy of our training data. For more clarifying the labels: 1 indicates suggesting others to buy and 2 means otherwise, 3 illusterates a neutral opinion about the product and 4 means the person has rate the product, but not suggest whether to buy or not. and the two or three digits number indicates the satisfaction percentage of the consumer with the preceding comment.

You can reach this data in the "totalReviewWithSuggestion.csv" file.

Second Phase

Data Preparation

In this Phase I have cleaned my data with Hazm library and other modifications which has commented in my source code. Then, I have splitted my dataset to parts for training and testing.

Third Phase

Build your own Neural Network in Tensorflow for LSTM

I have built my own graph for calculation the sentiments of each sentence based on the scores mentioning above.

Forth Phase

compute the word embeddings

In this phase I have used the precious guide from other repository and I have included that in my repository in the "ipynb_checkpoints" folder for more guidence to who wants to become more familiar with ehat I have done. As it is mentioned there using a one-hot method is too cumbersome and unefficient I have prepared a dictionary of my vocabulary and convert that to a feature vector.

Fifth Phase

Training and Testing

I have trained and have tested the code on my own dataset which have high accuracy near 93 percent.

Thanks

Thanks to Mr. AminMozhgani for his devoted assistance through the project.

sentiment-analysis-with-lstm-in-persian's People

Contributors

minasmz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sentiment-analysis-with-lstm-in-persian's Issues

labels

Hello , dear friend

Can you explain how with the way the label is selected

labels = np.array([1 if each > 3 else 0 for each in labels])

Isn't it better to use 60 instead of 3 ?

Thank you. Your job was great.

cannot test test.py file

Hi dear minasmz
I run your files and I cannot run test.py
CleanedReviews.csv file doesn't exit
please add it to your files
Thanks

کمک در حوزه aspect based sentiment analysis

سلام
می خواستم در حوزهaspect based sentiment analysis با استفاده از قوانین زبانی و آماری کار کنم. ولی هم تازه کارم و هم در کد زدن و تحلیل آن ها ضعیف هستم می خواستم در صورتی که کدی در این رابطه دارید و یا مخزنی را می شناسید برای من ارسال کنید.
همچنین اگر مطالبی که بتواند مرا در این امر کمک کند را برایم ارسال کنید لطف بزرگی می کنید
با تشکر فراوان از شما محقق عزیز

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.