HumorTranslate
Using Machine Translation to "translate" non-humor into humor. Code for the paper "Humorous Headline Generation via Style Transfer" at FigLang 2020
Install / Use
/learn @orionw/HumorTranslateREADME
Humorous Headline Generation via Style Transfer (a.k.a. Humor Translation)
Code and Datasets from the paper, "Can Humor Prediction Datasets be used for Humor Generation? Humorous Headline Generation via Style Transfer" by Orion Weller, Nancy Fulda, and Kevin Seppi.
Related Work
For related projects, see our work on Humor Detection (separating the humorous jokes from the non-humorous) or our collection of 500k+ jokes.
** We do not endorse these jokes. Please view at your own risk **
Overview
Data files are located in data/*.csv and are from the HumicroEdit Dataset. The script to reproduce the dataset files is create_sentences.py. The neural translation model is in transformer.py while the random model comes from the random_translate.py file.
How to Use
Set Up
- Run
pip3 install -r requirements.txtandpython -m spacy download ento install the correct packages
Train the Model
- Run
python3 translate.pyto start producing translations. If you want to enter in your own sentences interactively after each epoch, usepython3 translate.py --interactive
Evaluate Trained Models:
- Run
python3 translate.py -all -e -sto generate a file with outputs - Run
python3 clean_and_ready_eval.pyto add in the Random model and clean up puncuation, etc.
Pre-trained Models
I've included four pre-trained models at various epochs (30, 60, 90, 120). If you'd like to just play with a model, feel free to use one of them (found in the models/{epoch_num}-{timestamp}-model.pt).
Citation
If you found this repository helpful, please cite the following paper:
@inproceedings{weller2020can,
title={Can Humor Prediction Datasets be used for Humor Generation? Humorous Headline Generation via Style Transfer},
author={Weller, Orion and Fulda, Nancy and Seppi, Kevin},
booktitle={Proceedings of the Second Workshop on Figurative Language Processing},
pages={186--191},
year={2020}
}
Related Skills
proje
Interactive vocabulary learning platform with smart flashcards and spaced repetition for effective language acquisition.
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
401Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
