The goal of this task is to analyze a set of news articles through Named Entity Recognition (NER) and to engineer numerical features based on these entities for predictive modeling. The task involves:
- Extracting named entities from articles using an open-source LLM model.
- Creating insightful features.
- Building a predictive model to determine article popularity based on engagement metrics.
This task assesses skills in natural language processing (NLP), feature engineering, and predictive analytics. 🧠
- The provided dataset of news articles can be accessed here: News Articles Dataset
- Cleaning the Text:
- Remove unnecessary whitespace, HTML tags, and special characters.
- Normalize text (convert to lowercase).
- Tokenization & Stop Words Removal:
- Tokenize the text and remove stop words using libraries like NLTK or SpaCy.
- Entity Extraction:
- Use an open-source LLM model SpaCy to extract named entities from the cleaned articles.
- Entity Categorization:
- Ensure entities are categorized correctly into types such as Organizations (ORG), Locations (GPE), and People (PERSON).
- Entity Frequency:
- Create numerical features based on the frequency of each entity type in each article (e.g., count of organizations, locations, and people).
- Additional Features:
- Article length (number of words).
- Sentiment scores (using TextBlob or VADER).
- Engagement metrics (likes, shares, comments) if available in the dataset.
- Innovation:
- Derive creative features beyond the basic entity counts to enhance the feature set.
- Model Selection:
- Train a predictive model using the engineered features to predict article popularity. Possible models include Linear Regression, Random Forest, etc.
- Model Evaluation:
- Evaluate the model performance using accuracy scores, F1-scores, or mean absolute error (MAE).
- Visualizations:
- Create visualizations to show the relationship between named entities and article popularity.
- Use libraries like Matplotlib or Seaborn to generate:
- Bar charts for entity frequency.
- Scatter plots illustrating correlations.
- Heatmaps for the relationship between entity counts and engagement metrics.
- Named Entities Impact: The frequency of organizations and locations in news articles tends to correlate positively with engagement metrics such as likes and shares.
- Sentiment Analysis: Articles with more positive sentiment tend to receive higher engagement compared to those with neutral or negative sentiment.
- Article Length: Articles with a higher word count tend to have more named entities, which in turn leads to better engagement.
- Experiment with more sophisticated NLP techniques for entity extraction and feature engineering.
- Explore different predictive models and evaluation metrics to improve accuracy and generalizability.
This project is licensed under the MIT License - see the LICENSE file for details.
- Dataset: News Articles Dataset
- Libraries: SpaCy, TextBlob, NLTK, Matplotlib, Seaborn
Feel free to open an issue or submit a pull request if you have any suggestions or improvements! 💬

