mirror of
https://github.com/benbusby/whoogle-search
synced 2024-11-01 03:20:30 +00:00
18 lines
315 B
Python
18 lines
315 B
Python
from Phyme import Phyme
|
|
import random
|
|
import sys
|
|
import time
|
|
|
|
random.seed(time.clock())
|
|
|
|
ph = Phyme()
|
|
|
|
rhymes = ph.get_perfect_rhymes(sys.argv[1])
|
|
rhyme_vals = []
|
|
|
|
for arr in rhymes.values():
|
|
for rhyme in arr:
|
|
rhyme_vals.append(rhyme)
|
|
|
|
print(rhyme_vals[random.randint(0, len(rhyme_vals))].capitalize())
|