EthioMart is a Telegram-based e-commerce hub for Ethiopia, centralizing data from independent channels. Using fine-tuned Amharic NER models, it extracts business details from text, images, and documents, enabling seamless product discovery and vendor interactions on a unified platform.
# Telegram Analysis Project
This project is designed to analyze messages from Telegram channels by scraping, preprocessing, and performing exploratory data analysis (EDA). The extracted insights can help businesses understand trends and improve decision-making.
---
## Features
- Fetch messages from Telegram channels using Telethon.
- Preprocess messages (cleaning and tokenization).
- Perform exploratory data analysis (EDA) to identify trends.
- Save cleaned and structured data for further use.
---
## Prerequisites
Before you begin, ensure you have the following installed:
- Python 3.7 or above
- pip (Python package manager)
Install the required Python libraries:
```bash
pip install -r requirements.txt
Setup
Create a Telegram App:
Log in to Telegram Developer Portal.
Generate your API_ID and API_HASH.
Set Up Credentials:
Replace the placeholders in the script with your API_ID, API_HASH, and Telegram phone number.
Run the Script: Open the telegram_analysis.ipynb Jupyter Notebook and run the cells sequentially.
Files
telegram_analysis.ipynb: The main notebook for scraping and analyzing Telegram data.
telegram_messages.csv: The output file containing cleaned and tokenized data.
.gitignore: Ensures sensitive or unnecessary files are not tracked in the repository.
README.md: This file, explaining the project and setup instructions.
Example Usage
Fetch messages from Telegram channels:
await connect_to_telegram()
messages = await fetch_messages('@example_channel', limit=500)
Preprocess and analyze data:
df['cleaned_text'] = df['text'].apply(clean_text)
df['tokens'] = df['cleaned_text'].apply(word_tokenize)
Save results to a CSV file:
df.to_csv('telegram_messages.csv', index=False)
Troubleshooting
"Server closed the connection": Ensure a stable internet connection and restart the script.
"LookupError for NLTK resources": Run nltk.download('punkt') before tokenizing.
License
This project is licensed under the MIT License. See LICENSE for details.
---
### ** …