Here's an example script that uses Python's random module to generate a random phrase for each word in a file:
main.py1157 chars28 lines
This script reads a file named input.txt and replaces each word in the file that matches a key in the phrases dictionary with a randomly chosen phrase from the corresponding list of phrases. The output is written to a new file named output.txt. You can modify the phrases dictionary to include additional words and phrases.
gistlibby LogSnag