How metesertkan/emorec works
EmoRec is a research implementation of emotion-aware neural news recommendation. The data workflow prepares news text, emotion features, and user-impression examples; training loads those examples and fits a model with separate semantic and emotional representations. The model scores candidate stories against a user representation, while the documented test workflow evaluates a selected checkpoint. The source excerpts show the model’s internal encoder calls and training wiring; test implementation and some preprocessing orchestration are not sampled, so those links are conservative.
Main entry points: __init__.py EMOREC scoring · train.py Training entry · parse_news.py News preprocessing · utils.py Attention utilities
Components 17
Data preparation
- News preprocessing
project/data/parse_news.py - Behavior preprocessing
project/data/parse_behavior.py - Batch dataset
project/data/dataset.py - Emotion taxonomies
project/config/model/emorec
Recommendation model
- EMOREC scoring
project/models/emorec/__init__.py - Semantic encoder
project/models/emorec/semantic_encoder.py - Emotion pooling
project/models/emorec/emotion_pooling.py - Emotion encoder
project/models/emorec/emotion_encoder.py - User encoder
project/models/emorec/user_encoder.py - Attention utilities
project/models/utils.py - Ranking metrics
project/models/metrics.py
Training and evaluation
- Training entry
project/train.py - Test entry
project/test.py
Other components
- Researcher
- MIND data
- Word embeddings
- Candidate scores
Connections 22
- Researcher → News preprocessing: prepares news
README.md - Researcher → Behavior preprocessing: prepares behavior
README.md - MIND data → News preprocessing: provides articles
README.md - Word embeddings → News preprocessing: provides vectors
project/data/parse_news.py - News preprocessing → Batch dataset: news features
- Behavior preprocessing → Batch dataset: impression examples
- Researcher → Training entry: starts training
README.md - Researcher → Test entry: runs evaluation
README.md - Training entry → Batch dataset: loads examples
project/train.py - Training entry → EMOREC scoring: initializes model
project/train.py - Emotion taxonomies → Training entry: configures run
README.md - EMOREC scoring → Semantic encoder: encodes text
project/models/emorec/__init__.py - EMOREC scoring → Emotion pooling: pools emotions
project/models/emorec/__init__.py - EMOREC scoring → Emotion encoder: encodes user emotion
project/models/emorec/__init__.py - EMOREC scoring → User encoder: encodes user history
project/models/emorec/__init__.py - Semantic encoder → Attention utilities: uses attention
project/models/emorec/semantic_encoder.py - Emotion pooling → Attention utilities: uses attention
project/models/emorec/emotion_pooling.py - Emotion encoder → Attention utilities: uses attention
project/models/emorec/emotion_encoder.py - User encoder → Attention utilities: uses attention
project/models/emorec/user_encoder.py - EMOREC scoring → Ranking metrics: updates metrics
project/models/emorec/__init__.py - EMOREC scoring → Candidate scores: returns scores
project/models/emorec/__init__.py - Test entry → EMOREC scoring: evaluates checkpoint