Skip to content

Instantly share code, notes, and snippets.

@biezhi

biezhi/ai.clj

Last active Dec 18, 2018
Embed
What would you like to do?
AI核心代码,估值一个亿 Clojure 版本,4行代码实现
(loop [value (read-line)]
(if (not= value "exit")
(do (prn (clojure.string/replace value #"吗|?|\?" {"" "", "" "", "?" "!"}))
(recur (read-line)))))
;; (ai)
;; Hello?
;; 能听懂汉语吗?
;; 真的是人工智能?
;; function define
;; (defn ai []
;; (loop [value (read-line)]
;; (if (not= value "exit")
;; (do (prn (clojure.string/replace value #"吗|?|\?" {"吗" "", "?" "!", "?" "!"}))
;; (recur (read-line))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.