                      (log/debug (str "it2lex: " (count
                                                  (get it2lex (get-in spec [:italiano :italiano]
                                                                      ::undefined)))))
-                     (log/debug (str "infl2lex: " (count
-                                                   (get infl2lex (get-in spec [:synsem :infl]
-                                                                         ::undefined)))))
                      (log/debug (str "pred2lex: " (count
                                                    (get pred2lex (get-in spec [:synsem :sem :pred]
                                                                          ::undefined)))))


        ;; indices from paths to subsets of the lexicon
        aux2lex (map-subset-by-path lexicon-for-generation [:synsem :aux])
        infl2lex (map-subset-by-path lexicon [:synsem :infl])
        pred2lex (map-subset-by-path lexicon-for-generation [:synsem :sem :pred])
        cat2lex (map-subset-by-path lexicon-for-generation [:synsem :cat])
        it2lex (map-subset-by-path lexicon-for-generation [:italiano :italiano])]

                     (let [result
                           (reduce intersection-with-identity
                                   (filter #(not (empty? %))
                                           [(get it2lex (get-in spec [:italiano :italiano] ::undefined))
                                            (get pred2lex (get-in spec [:synsem :sem :pred] ::undefined))
                                            (get aux2lex (get-in spec [:synsem :aux] ::undefined))
                                            (get cat2lex (get-in spec [:synsem :cat] ::undefined))
                                            ]))]
                       (log/debug (str "intersection size: " (count result)))
                       result)))
                       
