nishjay commited on
Commit
24eed38
·
verified ·
1 Parent(s): 3d65ea8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -13
README.md CHANGED
@@ -1,13 +1,21 @@
1
- ---
2
- title: Country Specific Updated Sentiment Analysis Of India
3
- emoji: 🚀
4
- colorFrom: purple
5
- colorTo: red
6
- sdk: streamlit
7
- sdk_version: 1.42.2
8
- app_file: app.py
9
- pinned: false
10
- short_description: Analyzing 5,000+ MEA India press releases using semantic mat
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
1
+ # Country-specific-Updated-Sentiment-Analysis-of-India
2
+ Analyzing 5,000+ MEA India press releases using semantic matching via embeddings
3
+ ```mermaid
4
+ flowchart TD
5
+ A[Start] --> B[Load CSV Data: Read mea_press_releases_1.csv]
6
+ B --> C[Preprocess Data:<br>- Convert date to datetime<br>- Combine title and description into combined_text<br>- Drop rows with missing values<br>- Extract year from date]
7
+ C --> D[Calculate Sentiment Scores:<br>- Initialize VADER Sentiment Analyzer<br>- Apply to combined_text for all rows]
8
+ D --> E[Extract Countries:<br>- Use spaCy NER to identify countries in combined_text<br>- Remove 'India' and 'New Delhi'<br>- Store as comma-separated strings in countries column]
9
+ E --> F[Get Unique Country Names from countries column]
10
+ F --> G[Generate Embeddings:<br>- Use SentenceTransformer to encode unique countries]
11
+ G --> H[Build FAISS Index with country embeddings]
12
+ H --> I[Input Query:<br>- Country name e.g., 'United States'<br>- Year threshold e.g., 2010]
13
+ I --> J[Encode Query Using SentenceTransformer]
14
+ J --> K[Find Similar Country Names:<br>- Search FAISS index for top k matches]
15
+ K --> L[Filter Data:<br>- Match countries column with similar names<br>- Keep rows where year >= threshold]
16
+ L --> M[Calculate Mean Sentiment per Year]
17
+ M --> N[Plot Mean Sentiment Over Years:<br>- Line plot with yearly averages]
18
+ N --> O[Plot Sentiment Over Time:<br>- Scatter plot with color-coded sentiments]
19
+ O --> P[Calculate and Print Average Sentiment]
20
+ P --> Q[End]
21
+ ```