Last active
December 18, 2018 18:05
-
-
Save hellokaton/c39a099599cb4a9d77adb1bb68593c26 to your computer and use it in GitHub Desktop.
AI核心代码,估值一个亿 Clojure 版本,4行代码实现
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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