def timed(str): t0 = time.time() results = RhymeMaker.rhyme(str) t1 = time.time() print results return t1 - t0
def sentence_rhyme_score(sentence_1,sentence_2): """using yat choi's modules, returns the rhyming score for the last words of 2 sentences""" return RhymeMaker.get_rhyme_score(sentence_1.split()[-1],sentence_2.split()[-1])
def ajax_rhyme(): word = request.args.get('word','') rhymes = RhymeMaker.rhyme(word,75) # return render_template('home.html', word=word, rhymes=rhymes) return json.dumps(rhymes)
def sentence_rhyme_score(sentence_1, sentence_2): """returns how well the last word of the sentence rhymes""" return RhymeMaker.get_rhyme_score(sentence_1.split()[-1], sentence_2.split()[-1])
def sentence_rhyme_score(sentence_1, sentence_2): """using yat choi's modules, returns the rhyming score for the last words of 2 sentences""" return RhymeMaker.get_rhyme_score(sentence_1.split()[-1], sentence_2.split()[-1])