This repository contains a data processing pipeline for scraping, text extraction, translation, sentiment analysis, and sentiment labeling of ShareChat posts. The pipeline is designed to process multilingual posts and generate aggregate sentiment scores for each post.
-
- Run the
main.pyscript located in thesharechat_scraperdirectory using the commandpython3 main.py. - Modify the
constants.pyfile to include leader tags. Leader tags are identifiers for specific ShareChat users. Add leader tags to theLEADER_TAGSlist inconstants.py.
- Run the
-
- Execute the
tesseract.shscript to extract text from images. Use the command./tesseract.sh.
- Execute the
-
- Run the
translation.pyscript using Python 3 to translate multilingual text to English and perform preprocessing on the English text. - Execute
python3 translation.py. - Preprocessed English texts are saved in
translations.pickle.
- Run the
-
- Run the
sentiment_analysis.pyscript to calculate sentiment scores for each post. - Execute
python3 sentiment_analysis.py. - All sentiment scores for each post are saved in
sentiments.pickle.
- Run the
-
- Execute the
sentiment_labeller.pyscript to calculate aggregate sentiment scores and label each post. - Use the command
python3 sentiment_labeller.py. - Labelled results are stored in
results.pickle.
- Execute the
User interface (UI) for visualizing sentiment analysis results for each leader. run index.html in frontend