   [:refer-clojure :exclude [get-in resolve]]
   [:require
    [babel.korma :as korma]
+   [clojure.string :as string]
    [clojure.data.json :as json :refer [read-str write-str]]
    [clojure.tools.logging :as log]
    [compojure.core :as compojure :refer [GET PUT POST DELETE ANY]]

                  source-locale "US"
                  target "it"
                  target-locale "IT"
                  target-spec
                  (read-str (if-let [target-spec (get (:query-params request) "target-spec")]
                              target-spec ""))
                  game-spec
                  {:target_spec {:root {:italiano {:italiano "decidere"}}
                                 :synsem {:sem {:tense :past
                                                :aspect :perfect}}}
                   :source_spec :top}
                  ]
              (write-str {:source "some english stuff..."
                          :target-spec target-spec
                          :g-q-a-c-s
                          (try
                            (generate-question-and-correct-set
                             (:target_spec game-spec)
                             source source-locale
                             target target-locale)
                            (catch Exception e

      
      (GET "/:expr" request
           (let [expr (:expr (:route-params request))]
             (log/debug (str "expr(1):" expr))
             (log/debug (str "expr(2):" (Integer. expr)))
             {:status 200
              :headers {"Content-Type" "application/json;charset=utf-8"}
              :body (write-str (id2expression (Integer. expr)))}))))
