Take 100k joke and explanation tuples as training.
Pattern match input joke to training jokes.
Edit amalgamation of most structuraly similar training jokes to match content of input joke.
Edit corresponding training explanation with same substitutions.
Output explanation.
Repeat with 100 input jokes, pick the best one.