PyTorch Seq2Seq: Joke2Punchline, Punchline2Joke, and English<>French
- joke2punchline: Given a question-format joke, output a generated punchline.
- punchline2joke: Given a punchline, output a generated question-format joke.
- eng<>fra: Given a French sentence, output its English translation, or vice versa.
Given a question-format joke, output a generated punchline.
> what do you call an unpredictable chef ? < ouch . > what do you call a pile of pillowcases ? < screw music > why was the sun hospitalized ? < because he was sitting on me . > who s there ? < in the dictionary . > what is red and bad for your teeth ? < a a gummy bear
Given a punchline, output a generated question-format joke.
> watermelon concentrate < when do you stop at green and go at the orange juice factory ? > cool space < what do you call an alligator in a vest with a scoop of ice cream ? > the impossible ! < what did the worker say when he swam into the wall ? > both ! < what do you call a ghosts mom and dad ? > one two three four < what did the buffalo say to the bartender ?
Given a French sentence, output the English translation.
> je n appartiens pas a ce monde . = i m not from this world . < i m not from this world . > je suis impatient de la prochaine fois . = i m looking forward to the next time . < i m looking forward to the next time . > tu es sauve . = you re safe . < you re safe . > vous etes a nouveau de retour . = you re back again . < you re back again . > il n est pas marie . = he s not married . < he s not married .
joke2punchline.py: Generate punchlines given jokes.
punchline2joke.py: Generate jokes given punchlines.
seq2seq.py: Train or translate English<>French sentences.
- Pre-trained models:
- Contains trained encoders and decoders for joke2punchline, punchline2joke, and eng<>french.
jokes_data/jokes.tsv: Tab-separated file with question-answer format jokes.
eng_translation_data/: Contains tab-separated text files with English-French sentence pairs.