Fixed a/an generation for, for example, "Eurocopter".

This commit is contained in:
John Wiseman 2019-12-19 16:57:26 -08:00
parent af40b86410
commit 5228f02507
3 changed files with 7 additions and 4 deletions

View File

@ -296,8 +296,8 @@
:icao 1 :icao 1
:neighbourhood 3 :neighbourhood 3
:locality 3}}))] :locality 3}}))]
(log-info "Top description candidates (%s total):" (count results)) ;;(log-info "Top description candidates (%s total):" (count results))
(log-table results [:score :text]) ;;(log-table results [:score :text])
(first results))) (first results)))

View File

@ -61,7 +61,8 @@
(not (vowels (string/lower-case c)))) (not (vowels (string/lower-case c))))
(defn starts-with-consonant? [s] (defn starts-with-consonant? [s]
(is-consonant? (subs s 0 1))) (or (is-consonant? (subs s 0 1))
(string/starts-with? (string/lower-case s) "eur")))
(def filters (def filters

View File

@ -80,7 +80,9 @@
(is (= "It is an animal" (is (= "It is an animal"
(generation/generate templates {:thing "animal"}))) (generation/generate templates {:thing "animal"})))
(is (= "It is an Animal" (is (= "It is an Animal"
(generation/generate templates {:thing "Animal"}))))) (generation/generate templates {:thing "Animal"})))
(is (= "It is a Eurocopter"
(generation/generate templates {:thing "Eurocopter"})))))
;; (deftest var-paths ;; (deftest var-paths
;; (is (= "Hello, John" ;; (is (= "Hello, John"