Last active
December 21, 2016 11:54
-
-
Save spences10/1b1518fe23f25d163ccbf55dc3f753c3 to your computer and use it in GitHub Desktop.
Great way to generate comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_comment(self): | |
c_list = list(itertools.product( | |
["this", "the", "your"], | |
["photo", "picture", "pic", "shot", "snapshot"], | |
["is", "looks", "feels", "is really"], | |
["great", "super", "good", "very good", | |
"good", "wow", "WOW", "cool", | |
"GREAT", "magnificent", "magical", "very cool", | |
"stylish", "so stylish", "beautiful", | |
"so beautiful", "so stylish", "so professional", | |
"lovely", "so lovely", "very lovely", | |
"glorious", "so glorious", "very glorious", | |
"adorable", "excellent", "amazing"], | |
[".", "..", "...", "!", "!!", "!!!"])) | |
repl = [(" ", " "), (" .", "."), (" !", "!")] | |
res = " ".join(random.choice(c_list)) | |
for s, r in repl: | |
res = res.replace(s, r) | |
return res.capitalize() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment