Update README.md
Browse files
README.md
CHANGED
@@ -1,13 +1,21 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
```
|