udibr/headlines
udibr/headlines has 518 GitHub stars and 144 forks. GitHot measured -1 in 7 days and -1 in 15 days. Last checked 2026-11-13 17:19 UTC. Last push 2018-04-22.
Progression mesurée des étoiles
- in 24h
- Mise à jour retardée
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
À propos
Automatically generate headlines to short articles
Outils de développementREADME.md
OriginalAutomatically generate headlines to short articles
This project attempts to reproduce the results in the paper: Generating News Headlines with Recurrent Neural Networks
How to run
Software
- The code is running with jupyter notebook
- Install Keras
pip install python-Levenshtein
Data
It is assumed that you already have training and test data.
The data is made from many examples (I'm using 684K examples),
each example is made from the text
from the start of the article, which I call description (or desc),
and the text of the original headline (or head).
The texts should be already tokenized and the tokens separated by spaces.
Once you have the data ready save it in a python pickle file as a tuple:
(heads, descs, keywords) were heads is a list of all the head strings,
descs is a list of all the article strings in the same order and length as heads.
I ignore the keywords information so you can place None.
Build a vocabulary of words
The vocabulary-embedding notebook describes how a dictionary is built for the tokens and how an initial embedding matrix is built from GloVe
Train a model
train notebook describes how a model is trained on the data using Keras
Use model to generate new headlines
predict generate headlines by the trained model and showes the attention weights used to pick words from the description. The text generation includes a feature which was not described in the original paper, it allows for words that are outside the training vocabulary to be copied from the description to the generated headline.
Examples of headlines generated
Good (cherry picking) examples of headlines generated

Examples of attention weights

Explorer des projets similaires
codecrafters-io/build-your-own-x
Maîtrisez la programmation en recréant de zéro vos technologies préférées.
562,334 étoilespublic-apis/public-apis
Une liste collective d'API gratuites
498,772 étoilesmorluto/rea
Rétro-ingénierie de n'importe quoi avec des agents, du comportement des applications jusqu'aux binaires natifs.
457,478 étoilesopenclaw/openclaw
L'IA qui fait vraiment les choses. Tout système d'exploitation, toute plateforme. À la manière du homard. 🦞
394,397 étoiles