Remove unused requires and fix paths

main
Eric Ihli 4 years ago
parent 39a7889a71
commit c2d3882854

@ -1,10 +1,8 @@
(ns com.owoga.prhyme.lymeric (ns com.owoga.prhyme.lymeric
(:require [com.owoga.prhyme.gen :as gen] (:require [com.owoga.prhyme.gen :as gen]
[com.owoga.prhyme.util :as util]
[com.owoga.prhyme.generation.weighted-selection :as weighted-selection] [com.owoga.prhyme.generation.weighted-selection :as weighted-selection]
[clojure.string :as string] [clojure.string :as string]
[com.owoga.prhyme.frp :as frp] [com.owoga.prhyme.frp :as frp]
[com.owoga.prhyme.util.nlp :as nlp]
[com.owoga.corpus.darklyrics :as darklyrics])) [com.owoga.corpus.darklyrics :as darklyrics]))
@ -30,7 +28,7 @@
darklyrics/darkov-2 darklyrics/darkov-2
0.99) 0.99)
(when (rhymes pattern) (when (rhymes pattern)
(weighted-selection/adjust-for-rhymes 0.99))])) (weighted-selection/adjust-for-tail-rhyme 0.99))]))
rhyme (if (nil? (get rhymes pattern)) rhyme (if (nil? (get rhymes pattern))
(gen/gen-sentence-with-syllable-count (gen/gen-sentence-with-syllable-count
adj adj

@ -1,11 +1,12 @@
(ns com.owoga.prhyme.util.nlp (ns com.owoga.prhyme.util.nlp
(:require [opennlp.nlp :as nlp] (:require [opennlp.nlp :as nlp]
[opennlp.treebank :as tb] [opennlp.treebank :as tb]
[clojure.string :as string])) [clojure.string :as string]
[clojure.java.io :as io]))
(def tokenize (nlp/make-tokenizer "models/en-token.bin")) (def tokenize (nlp/make-tokenizer (io/resource "models/en-token.bin")))
(def get-sentences (nlp/make-sentence-detector "models/en-sent.bin")) (def get-sentences (nlp/make-sentence-detector (io/resource "models/en-sent.bin")))
(def parse (tb/make-treebank-parser "en-parser-chunking.bin")) (def parse (tb/make-treebank-parser (io/resource "models/en-parser-chunking.bin")))
(defn valid-sentence? (defn valid-sentence?
"Tokenizes and parses the phrase using OpenNLP models from "Tokenizes and parses the phrase using OpenNLP models from

Loading…
Cancel
Save