|
|
@ -400,9 +400,35 @@
|
|
|
|
(sort-by (comp - second))
|
|
|
|
(sort-by (comp - second))
|
|
|
|
first)))
|
|
|
|
first)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defn wgu-lyric-suggestions
|
|
|
|
|
|
|
|
[phrase]
|
|
|
|
|
|
|
|
(let [rhymes (rhymes-by-quality phrase)
|
|
|
|
|
|
|
|
seeds (map vector rhymes (repeat "</s>"))
|
|
|
|
|
|
|
|
lyrics (map #(lyric-suggestions
|
|
|
|
|
|
|
|
(string/join " " %)
|
|
|
|
|
|
|
|
models/markov-trie
|
|
|
|
|
|
|
|
models/database)
|
|
|
|
|
|
|
|
seeds)]
|
|
|
|
|
|
|
|
(->> lyrics
|
|
|
|
|
|
|
|
(map (juxt identity open-nlp-perplexity))
|
|
|
|
|
|
|
|
(sort-by (comp - second)))))
|
|
|
|
|
|
|
|
|
|
|
|
(comment
|
|
|
|
(comment
|
|
|
|
|
|
|
|
(wgu-lyric-suggestions "technology")
|
|
|
|
|
|
|
|
|
|
|
|
(phrase->quality-of-rhyme "boss hog" "brain fog")
|
|
|
|
(phrase->quality-of-rhyme "boss hog" "brain fog")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(let [rhymes (rhymes-by-quality "bother me")
|
|
|
|
|
|
|
|
seeds (map vector rhymes (repeat "</s>"))
|
|
|
|
|
|
|
|
lyrics (map #(lyric-suggestions
|
|
|
|
|
|
|
|
(string/join " " %)
|
|
|
|
|
|
|
|
models/markov-trie
|
|
|
|
|
|
|
|
models/database)
|
|
|
|
|
|
|
|
seeds)]
|
|
|
|
|
|
|
|
(->> lyrics
|
|
|
|
|
|
|
|
(map (juxt identity open-nlp-perplexity))
|
|
|
|
|
|
|
|
(sort-by (comp - second))))
|
|
|
|
|
|
|
|
|
|
|
|
(->> #(lyric-suggestions "bother me </s>" models/markov-trie models/database)
|
|
|
|
(->> #(lyric-suggestions "bother me </s>" models/markov-trie models/database)
|
|
|
|
repeatedly
|
|
|
|
repeatedly
|
|
|
|
(take 5)
|
|
|
|
(take 5)
|
|
|
|