Evaluate a news article with NLP is a single page application designed for the Udacity Frontend Web Developer Nanodegree. This project allows users to enter a valid URL and receive an evaluation of the article's sentiment using the MeaningCloud Sentiment Analysis API.
The application provides insights into the article's polarity, confidence, agreement, subjectivity, and irony. The project utilizes tools such as Webpack for build automation, Sass for styling, and Jest for testing. It is designed to offer hands-on experience with these tools and to understand their roles in building a frontend application.
Untitled.video.-.Made.with.Clipchamp.8.mp4
-
Webserver: Node.js
- Manages backend server operations and request handling.
-
Web Application Framework: Express
- Facilitates backend server routing and API management.
-
Build Tool: Webpack
- Development Mode:
- Features Hot Module Replacement (HMR) for real-time updates.
- Includes source maps for easier debugging.
- Production Mode:
- Minifies code and optimizes assets for performance.
- Splits code into bundles for improved load times.
- Integrates service workers to enhance offline capabilities.
- Development Mode:
-
External Script: Service Worker
- Provides offline functionality and caching for better performance.
-
External API: MeaningCloud
- Delivers sentiment analysis to evaluate and interpret news articles.
-
Clone the Repository
git clone https://github.com/HebaHamdan2/Evaluate-a-news-article-with-NLP.git
-
Install Dependencies
Install the necessary npm packages:
npm install
-
Set Up Environment Variables
Create a .env file in the root of your project directory with the following content:
API_KEY=your_api_key
Here are the available npm scripts:
- Start the Server
npm start
- Start Development Server
npm run build-dev
- Build for Production
npm run build-prod
- Run Tests
npm run test