         ]
     (clojure.walk/keywordize-keys pmap)))
 
+;; The following is an attempt (unsuccessful so far) to directly translate
+;; into clojure the perl PrintCompPdgm subroutine from 
+;; aama-data/pl/pdgm-fv-bil-tsv2table2.pl
 (defn handle-pdgmprlldisplay2
   [pdgmstr pdgmnames]
   (let [

                       (= pos "noun")
                       (sparql/pdgmqry-sparql-noun language1 lpref1 valstring1)
                       :else (sparql/pdgmqry-sparql-fv language1 lpref1 valstring1))
             ;;query-sparql-pr (replace query-sparql #"<" "&lt;")
        req1 (http/get aama
                       {:query-params
                        {"query" query-sparql1 ;;generated sparql
                         "format" "csv"}})
                         ;;"format" "application/sparql-results+json"}})
                         ;;"format" "text"}})
        ;;req-pr1 (replace (:body req1) #"<" "&lt;")
        ;;req-pr3 ( -> (:body req1)
        ;;             (replace #"[<>]" "\"")
        ;;             (replace #"\n" " "))
        ;;lex-form1 (split req-pr3 #" " 2)
        ;;lex1 (first lex-form1)
        ;;pdgm1 (rest lex-form1)
        pdgm1 (replace (:body req1) #"\r\n" "%%")
        query-sparql2 (cond 
                       (= pos "pro")

                       (= pos "noun")
                       (sparql/pdgmqry-sparql-noun language2 lpref2 valstring2)
                       :else (sparql/pdgmqry-sparql-fv language2 lpref2 valstring2))
        req2 (http/get aama
                       {:query-params
                        {"query" query-sparql2 ;;generated sparql
                         "format" "csv"}})
                         ;;"format" "application/sparql-results+json"}})
                         ;;"format" "text"}})
        pdgm2 (replace (:body req2) #"\r\n" "%%")
        pdgm3 (replace (:body req2) #"," "\t\t")
        pdgmnames (str language1":"valstring1"+"language2":"valstring2)
        pdgmstr1 (str pdgm1 pdgm2)
        pdgmstr2 (replace pdgmstr1 #"," "_")
             ]
  (layout/common
   [:body
      [:h3 "PNames:"]
    [:ol
     [:li (str language1":"valstring1)]
     [:li (str language2":"valstring2)]]
      [:h3 "Paradigms:"]
      [:p "(csv format)"]
      [:pre (:body req1)]
      [:pre (:body req2)]
    [:hr]
      [:h3 "Parallel Display"]
     [:p "Choose PNG Values (comma-separated list)"]
