A Windows application for harvesting, categorizing, and analyzing news about Fiji.
- News Harvesting: Automatically collects news articles from major Fiji news sources
- News Categorization: Classifies articles into politics, community, sports, crime, and other categories
- Summary Generation: Creates comprehensive summaries of collected news
- Trend Analysis: Identifies emerging trends, potential threats, and suggests mitigation strategies
- Audio Conversion: Converts news summaries into speech for easy consumption
- Python 3.8 or higher
- Windows 10 operating system
-
Clone or download this repository:
git clone https://github.com/yourusername/fiji-news-agent.git cd fiji-news-agent -
Create a virtual environment (recommended):
python -m venv venv venv\Scripts\activate -
Install the required dependencies:
pip install -r requirements.txt -
Create necessary directories:
mkdir -p data
-
Start the application:
python app.py -
Open your web browser and navigate to:
http://localhost:5000 -
Use the application:
- Click "Harvest News" to collect the latest news about Fiji
- View news articles categorized by topic
- Generate a summary of all collected news
- Analyze trends and identify potential threats
- Convert summaries to audio for listening
The application collects news from the following Fiji sources:
- Fiji Times
- Fiji Sun
- Fiji Village
- FBC News
- Islands Business
- Backend: Python with Flask web framework
- Frontend: HTML, CSS, JavaScript with Bootstrap 5
- News Harvesting: Newspaper3k and BeautifulSoup4
- Text Analysis: NLTK and scikit-learn
- Text-to-Speech: pyttsx3 (offline) and gTTS (online)
You can customize the application by:
- Adding News Sources: Edit the
sourceslist innews_harvester.py - Modifying Categories: Update the
categorieslist andcategory_keywordsinnews_classifier.py - Enhancing Analysis: Extend the analysis capabilities in
news_analyzer.py
The application stores data in the following formats:
- Harvested news: JSON files in the
datadirectory - Summaries: Text files in the
datadirectory - Analyses: JSON files in the
datadirectory - Audio files: MP3 files in the
datadirectory
This project is licensed under the MIT License - see the LICENSE file for details.
- Newspaper3k for article extraction
- NLTK for natural language processing
- Flask for the web framework
- Bootstrap for the UI components