Repository: accelerated-text/accelerated-text (language: python)

Issue:
Upgrade dictionary item implementation in core
Using graph generated from Paradigm functions, should be able to create solution to work for any type/ language.
Add structural words to document plan editor



Discussion / hints:

Fix patch:
diff --git a/core/src/acc_text/nlg/dictionary/impl.clj b/core/src/acc_text/nlg/dictionary/impl.clj
new file mode 100644
index 000000000..2ab3f0e3f
--- /dev/null
+++ b/core/src/acc_text/nlg/dictionary/impl.clj
@@ -0,0 +1,12 @@
+(ns acc-text.nlg.dictionary.impl
+  (:require [acc-text.nlg.dictionary.item :as dict-item]
+            [acc-text.nlg.dictionary.lang.eng :as eng]
+            [acc-text.nlg.dictionary.lang.other :as other]))
+
+(defmulti resolve-dict-item ::dict-item/language)
+
+(defmethod resolve-dict-item "Eng" [dict-item]
+  (eng/resolve-dict-item dict-item))
+
+(defmethod resolve-dict-item :default [dict-item]
+  (other/resolve-dict-item dict-item))
diff --git a/core/src/acc_text/nlg/dictionary/item.clj b/core/src/acc_text/nlg/dictionary/item.clj
index fb43ca193..e066250b2 100644
--- a/core/src/acc_text/nlg/dictionary/item.clj
+++ b/core/src/acc_text/nlg/dictionary/item.clj
@@ -15,10 +15,17 @@
 (s/def ::definition string?)
 
 (s/def ::category
-  #{"A" "A2" "Adv"
-    "N" "N2" "N3"
-    "PN" "Prep"
-    "V" "V0" "V2" "V3" "V2A" "V2Q" "V2S" "V2V" "VA" "VP" "VQ" "VS" "VV"})
+  #{"A" "A2"
+    "AdA" "AdN" "AdV" "Adv"
+    "Conj"
+    "IP"
+    "Interj"
+    "N" "N2" "N3" "NP" "PN"
+    "Post" "Prep"
+    "Pron"
+    "Quant"
+    "Subj"
+    "V" "V2" "V2A" "V2S" "V2V" "V2Q" "V3" "VA" "VQ" "VS" "VV"})
 
 (s/def ::language #{"Eng" "Ger" "Est" "Lit" "Lav" "Rus"})
 
diff --git a/core/src/acc_text/nlg/dictionary/lang/eng.clj b/core/src/acc_text/nlg/dictionary/lang/eng.clj
new file mode 100644
index 000000000..909df7adf
--- /dev/null
+++ b/core/src/acc_text/nlg/dictionary/lang/eng.clj
@@ -0,0 +1,1161 @@
+(ns acc-text.nlg.dictionary.lang.eng
+  (:require [acc-text.nlg.dictionary.item :as dict-item]
+            [acc-text.nlg.dictionary.item.form :as dict-item-form]
+            [acc-text.nlg.semantic-graph :as sg]
+            [acc-text.nlg.semantic-graph.utils :as utils]))
+
+(def module "ParadigmsEng")
+
+(defmulti resolve-dict-item ::dict-item/category)
+
+(defmethod resolve-dict-item "A" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "A"
+          :concepts  (cons
+                       {:id       concept
+                        :type     :operation
+                        :name     "mkA"
+                        :label    (utils/get-operation-label module "mkA" (take arity (repeat "Str")) "A")
+                        :category "A"
+                        :module   module}
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms))
+          :relations (map-indexed (fn [i arg]
+                                    {:from     concept
+                                     :to       arg
+                                     :role     :arg
+                                     :index    i
+                                     :category "Str"
+                                     :name     "Str"})
+                                  args)}))
+
+(defmethod resolve-dict-item "A2" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "A"))
+        concept (utils/gen-id)
+        arg (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "A2")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkA2"
+                                       :label    (utils/get-operation-label module "mkA2" ["A" "Str"] "A2")
+                                       :category "A2"
+                                       :module   module}
+                                      {:id       arg
+                                       :type     :quote
+                                       :value    (get attributes "Post" "to")
+                                       :category "Str"}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "A"
+                                        :name     "A"}
+                                       {:from     concept
+                                        :to       arg
+                                        :role     :arg
+                                        :index    1
+                                        :category "Str"
+                                        :name     "Str"}]))))
+
+(defmethod resolve-dict-item "N" [{::dict-item/keys [key forms attributes]}]
+  (let [concept (utils/gen-id)
+        noun-concept (utils/gen-id)
+        gender-concept (utils/gen-id)
+        gender (get attributes "Gender" "nonhuman")
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "N"
+          :concepts  (concat
+                       [{:id       concept
+                         :type     :operation
+                         :name     "mkN"
+                         :label    (utils/get-operation-label module "mkN" ["Gender" "N"] "N")
+                         :category "N"
+                         :module   module}
+                        {:id       gender-concept
+                         :type     :operation
+                         :name     gender
+                         :label    (utils/get-operation-label module gender [] "Gender")
+                         :category "Gender"
+                         :module   module}
+                        {:id       noun-concept
+                         :type     :operation
+                         :name     "mkN"
+                         :label    (utils/get-operation-label module "mkN" (take arity (repeat "Str")) "N")
+                         :category "N"
+                         :module   module}]
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms))
+          :relations (concat
+                       [{:from     concept
+                         :to       gender-concept
+                         :role     :arg
+                         :index    0
+                         :category "Gender"
+                         :name     "Gender"}
+                        {:from     concept
+                         :to       noun-concept
+                         :role     :arg
+                         :index    1
+                         :category "N"
+                         :name     "N"}]
+                       (map-indexed (fn [i arg]
+                                      {:from     noun-concept
+                                       :to       arg
+                                       :role     :arg
+                                       :index    i
+                                       :category "Str"
+                                       :name     "Str"})
+                                    args))}))
+
+(defmethod resolve-dict-item "PN" [dict-item]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
+        concept (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "PN")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkPN"
+                                       :label    (utils/get-operation-label module "mkPN" ["N"] "PN")
+                                       :category "PN"
+                                       :module   module}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "N"
+                                        :name     "N"}]))))
+
+(defmethod resolve-dict-item "N2" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
+        concept (utils/gen-id)
+        arg (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "N2")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkN2"
+                                       :label    (utils/get-operation-label module "mkN2" ["N" "Str"] "N2")
+                                       :category "N2"
+                                       :module   module}
+                                      {:id       arg
+                                       :type     :quote
+                                       :value    (get attributes "Post" "to")
+                                       :category "Str"}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "N"
+                                        :name     "N"}
+                                       {:from     concept
+                                        :to       arg
+                                        :role     :arg
+                                        :index    1
+                                        :category "Str"
+                                        :name     "Str"}]))))
+
+(defmethod resolve-dict-item "N3" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
+        concept (utils/gen-id)
+        prep-concept (utils/gen-id)
+        post-concept (utils/gen-id)
+        prep-arg (utils/gen-id)
+        post-arg (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "N3")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkN3"
+                                       :label    (utils/get-operation-label module "mkN3" ["N" "Prep" "Prep"] "N3")
+                                       :category "N3"
+                                       :module   module}
+                                      {:id       prep-concept
+                                       :type     :operation
+                                       :name     "mkPrep"
+                                       :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                                       :category "Prep"
+                                       :module   module}
+                                      {:id       post-concept
+                                       :type     :operation
+                                       :name     "mkPrep"
+                                       :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                                       :category "Prep"
+                                       :module   module}
+                                      {:id       prep-arg
+                                       :type     :quote
+                                       :value    (get attributes "Prep" "from")
+                                       :category "Str"}
+                                      {:id       post-arg
+                                       :type     :quote
+                                       :value    (get attributes "Post" "to")
+                                       :category "Str"}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "N"
+                                        :name     "N"}
+                                       {:from     concept
+                                        :to       prep-concept
+                                        :role     :arg
+                                        :index    1
+                                        :category "Prep"
+                                        :name     "Prep"}
+                                       {:from     concept
+                                        :to       post-concept
+                                        :role     :arg
+                                        :index    2
+                                        :category "Prep"
+                                        :name     "Prep"}
+                                       {:from     prep-concept
+                                        :to       prep-arg
+                                        :role     :arg
+                                        :index    0
+                                        :category "Str"
+                                        :name     "Str"}
+                                       {:from     post-concept
+                                        :to       post-arg
+                                        :role     :arg
+                                        :index    0
+                                        :category "Str"
+                                        :name     "Str"}]))))
+
+(defmethod resolve-dict-item "NP" [{::dict-item/keys [key forms language attributes]}]
+  (let [concept (utils/gen-id)
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))
+        arg-types (concat (take arity (repeat "Str")) ["Number" "Person" "Gender"])
+        number-concept (utils/gen-id)
+        number (get attributes "Number" "singular")
+        person-concept (utils/gen-id)
+        person (get attributes "Person" "P3")
+        gender-concept (utils/gen-id)
+        gender (get attributes "Gender" "nonhuman")]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "NP"
+          :concepts  (cons
+                       {:id       concept
+                        :type     :operation
+                        :name     "mkNP"
+                        :label    (utils/get-operation-label module "mkNP" arg-types "NP")
+                        :category "NP"
+                        :module   (str "Res" language)}
+                       (concat
+                         (map (fn [arg {form ::dict-item-form/value}]
+                                {:id       arg
+                                 :type     :quote
+                                 :value    form
+                                 :category "Str"})
+                              args
+                              forms)
+                         [{:id       number-concept
+                           :type     :operation
+                           :name     number
+                           :label    (utils/get-operation-label module number [] "Number")
+                           :category "Number"
+                           :module   module}
+                          {:id       person-concept
+                           :type     :operation
+                           :name     person
+                           :label    (utils/get-operation-label module person [] "Person")
+                           :category "Person"
+                           :module   (str "Res" language)}
+                          {:id       gender-concept
+                           :type     :operation
+                           :name     gender
+                           :label    (utils/get-operation-label module gender [] "Gender")
+                           :category "Gender"
+                           :module   module}]))
+          :relations (concat
+                       (map-indexed (fn [i arg]
+                                      {:from     concept
+                                       :to       arg
+                                       :role     :arg
+                                       :index    i
+                                       :category "Str"
+                                       :name     "Str"})
+                                    args)
+                       [{:from     concept
+                         :to       number-concept
+                         :role     :arg
+                         :index    (+ arity 1)
+                         :category "Number"
+                         :name     "Number"}
+                        {:from     concept
+                         :to       person-concept
+                         :role     :arg
+                         :index    (+ arity 2)
+                         :category "Person"
+                         :name     "Person"}
+                        {:from     concept
+                         :to       gender-concept
+                         :role     :arg
+                         :index    (+ arity 3)
+                         :category "Gender"
+                         :name     "Gender"}])}))
+
+(defmethod resolve-dict-item "IP" [{::dict-item/keys [key forms language attributes]}]
+  (let [concept (utils/gen-id)
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))
+        arg-types (concat (take arity (repeat "Str")) ["Number"])
+        number-concept (utils/gen-id)
+        number (get attributes "Number" "singular")]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "NP"
+          :concepts  (cons
+                       {:id       concept
+                        :type     :operation
+                        :name     "mkIP"
+                        :label    (utils/get-operation-label module "mkIP" arg-types "IP")
+                        :category "IP"
+                        :module   (str "Res" language)}
+                       (concat
+                         (map (fn [arg {form ::dict-item-form/value}]
+                                {:id       arg
+                                 :type     :quote
+                                 :value    form
+                                 :category "Str"})
+                              args
+                              forms)
+                         [{:id       number-concept
+                           :type     :operation
+                           :name     number
+                           :label    (utils/get-operation-label module number [] "Number")
+                           :category "Number"
+                           :module   module}]))
+          :relations (concat
+                       (map-indexed (fn [i arg]
+                                      {:from     concept
+                                       :to       arg
+                                       :role     :arg
+                                       :index    i
+                                       :category "Str"
+                                       :name     "Str"})
+                                    args)
+                       [{:from     concept
+                         :to       number-concept
+                         :role     :arg
+                         :index    (+ arity 1)
+                         :category "Number"
+                         :name     "Number"}])}))
+
+(defmethod resolve-dict-item "Conj" [{::dict-item/keys [key forms attributes]}]
+  (let [concept (utils/gen-id)
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))
+        arg-types (concat (take arity (repeat "Str")) ["Number"])
+        number-concept (utils/gen-id)
+        number (get attributes "Number")]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "NP"
+          :concepts  (cons
+                       {:id       concept
+                        :type     :operation
+                        :name     "mkConj"
+                        :label    (utils/get-operation-label module "mkConj" arg-types "Conj")
+                        :category "Conj"
+                        :module   module}
+                       (concat
+                         (map (fn [arg {form ::dict-item-form/value}]
+                                {:id       arg
+                                 :type     :quote
+                                 :value    form
+                                 :category "Str"})
+                              args
+                              forms)
+                         (when (some? number)
+                           [{:id       number-concept
+                             :type     :operation
+                             :name     number
+                             :label    (utils/get-operation-label module number [] "Number")
+                             :category "Number"
+                             :module   module}])))
+          :relations (concat
+                       (map-indexed (fn [i arg]
+                                      {:from     concept
+                                       :to       arg
+                                       :role     :arg
+                                       :index    i
+                                       :category "Str"
+                                       :name     "Str"})
+                                    args)
+                       (when (some? number)
+                         [{:from     concept
+                           :to       number-concept
+                           :role     :arg
+                           :index    (+ arity 1)
+                           :category "Number"
+                           :name     "Number"}]))}))
+
+(defmethod resolve-dict-item "AdA" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "AdA"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkAdA"
+                       :label    (utils/get-operation-label module "mkAdA" ["Str"] "AdA")
+                       :category "AdA"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "AdN" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "AdN"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkAdN"
+                       :label    (utils/get-operation-label module "mkAdN" ["Str"] "AdN")
+                       :category "AdN"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "AdV" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "AdV"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkAdV"
+                       :label    (utils/get-operation-label module "mkAdV" ["Str"] "AdV")
+                       :category "AdV"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "Adv" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "Adv"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkAdv"
+                       :label    (utils/get-operation-label module "mkAdv" ["Str"] "Adv")
+                       :category "Adv"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "Prep" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "Prep"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkPrep"
+                       :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                       :category "Prep"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "Post" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "Prep"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkPost"
+                       :label    (utils/get-operation-label module "mkPost" ["Str"] "Prep")
+                       :category "Prep"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "Pron" [{::dict-item/keys [key forms language attributes]}]
+  (let [concept (utils/gen-id)
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))
+        arg-types (concat (take arity (repeat "Str")) ["Number" "Person" "Gender"])
+        number-concept (utils/gen-id)
+        number (get attributes "Number" "singular")
+        person-concept (utils/gen-id)
+        person (get attributes "Person" "P3")
+        gender-concept (utils/gen-id)
+        gender (get attributes "Gender" "nonhuman")]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "Pron"
+          :concepts  (cons
+                       {:id       concept
+                        :type     :operation
+                        :name     "mkPron"
+                        :label    (utils/get-operation-label module "mkPron" arg-types "Pron")
+                        :category "Pron"
+                        :module   (str "Morpho" language)}
+                       (concat
+                         (map (fn [arg {form ::dict-item-form/value}]
+                                {:id       arg
+                                 :type     :quote
+                                 :value    form
+                                 :category "Str"})
+                              args
+                              forms)
+                         [{:id       number-concept
+                           :type     :operation
+                           :name     number
+                           :label    (utils/get-operation-label module number [] "Number")
+                           :category "Number"
+                           :module   module}
+                          {:id       person-concept
+                           :type     :operation
+                           :name     person
+                           :label    (utils/get-operation-label module person [] "Person")
+                           :category "Person"
+                           :module   (str "Res" language)}
+                          {:id       gender-concept
+                           :type     :operation
+                           :name     gender
+                           :label    (utils/get-operation-label module gender [] "Gender")
+                           :category "Gender"
+                           :module   module}]))
+          :relations (concat
+                       (map-indexed (fn [i arg]
+                                      {:from     concept
+                                       :to       arg
+                                       :role     :arg
+                                       :index    i
+                                       :category "Str"
+                                       :name     "Str"})
+                                    args)
+                       [{:from     concept
+                         :to       number-concept
+                         :role     :arg
+                         :index    (+ arity 1)
+                         :category "Number"
+                         :name     "Number"}
+                        {:from     concept
+                         :to       person-concept
+                         :role     :arg
+                         :index    (+ arity 2)
+                         :category "Person"
+                         :name     "Person"}
+                        {:from     concept
+                         :to       gender-concept
+                         :role     :arg
+                         :index    (+ arity 3)
+                         :category "Gender"
+                         :name     "Gender"}])}))
+
+(defmethod resolve-dict-item "Quant" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "Quant"
+          :concepts  (cons
+                       {:id       concept
+                        :type     :operation
+                        :name     "mkQuant"
+                        :label    (utils/get-operation-label module "mkQuant" (take arity (repeat "Str")) "Quant")
+                        :category "Quant"
+                        :module   module}
+                       (concat
+                         (map (fn [arg {form ::dict-item-form/value}]
+                                {:id       arg
+                                 :type     :quote
+                                 :value    form
+                                 :category "Str"})
+                              args
+                              forms)))
+          :relations (map-indexed (fn [i arg]
+                                    {:from     concept
+                                     :to       arg
+                                     :role     :arg
+                                     :index    i
+                                     :category "Str"
+                                     :name     "Str"})
+                                  args)}))
+
+(defmethod resolve-dict-item "Subj" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "Subj"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkSubj"
+                       :label    (utils/get-operation-label module "mkSubj" ["Str"] "Subj")
+                       :category "Subj"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "Interj" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arg (utils/gen-id)]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "Interj"
+          :concepts  [{:id       concept
+                       :type     :operation
+                       :name     "mkInterj"
+                       :label    (utils/get-operation-label module "mkInterj" ["Str"] "Interj")
+                       :category "Interj"
+                       :module   module}
+                      {:id       arg
+                       :type     :quote
+                       :value    (::dict-item-form/value (first forms))
+                       :category "Str"}]
+          :relations [{:from     concept
+                       :to       arg
+                       :role     :arg
+                       :index    0
+                       :category "Str"
+                       :name     "Str"}]}))
+
+(defmethod resolve-dict-item "V" [{::dict-item/keys [key forms]}]
+  (let [concept (utils/gen-id)
+        arity (count forms)
+        args (take arity (repeatedly #(utils/gen-id)))]
+    #::sg{:id        (utils/gen-id)
+          :name      key
+          :category  "V"
+          :concepts  (cons
+                       {:id       concept
+                        :type     :operation
+                        :name     "mkV"
+                        :label    (utils/get-operation-label module "mkV" (take arity (repeat "Str")) "V")
+                        :category "V"
+                        :module   module}
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms))
+          :relations (map-indexed (fn [i arg]
+                                    {:from     concept
+                                     :to       arg
+                                     :role     :arg
+                                     :index    i
+                                     :category "Str"
+                                     :name     "Str"})
+                                  args)}))
+
+(defmethod resolve-dict-item "V2" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)
+        arg (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "V2")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkV2"
+                                       :label    (utils/get-operation-label module "mkV2" ["V" "Str"] "V2")
+                                       :category "V2"
+                                       :module   module}
+                                      {:id       arg
+                                       :type     :quote
+                                       :value    (get attributes "Post" "in")
+                                       :category "Str"}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "V"
+                                        :name     "V"}
+                                       {:from     concept
+                                        :to       arg
+                                        :role     :arg
+                                        :index    1
+                                        :category "Str"
+                                        :name     "Str"}]))))
+
+(defmethod resolve-dict-item "V3" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)
+        prep-concept (utils/gen-id)
+        post-concept (utils/gen-id)
+        prep-arg (utils/gen-id)
+        post-arg (utils/gen-id)
+        prep-attribute (get attributes "Prep" "to")
+        post-attribute (get attributes "Post")
+        arity (cond-> 1
+                      (some? prep-attribute) (inc)
+                      (and (some? prep-attribute) (some? post-attribute)) (inc))
+        arg-types (case arity
+                    1 ["V"]
+                    2 ["V" "Prep"]
+                    3 ["V" "Prep" "Prep"])]
+    (-> child
+        (assoc ::sg/category "V3")
+        (update ::sg/concepts concat
+                [{:id       concept
+                  :type     :operation
+                  :name     "mkV3"
+                  :label    (utils/get-operation-label module "mkV3" arg-types "V3")
+                  :category "V3"
+                  :module   module}]
+                (when (< 1 arity)
+                  [{:id       prep-concept
+                    :type     :operation
+                    :name     "mkPrep"
+                    :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                    :category "Prep"
+                    :module   module}
+                   {:id       prep-arg
+                    :type     :quote
+                    :value    prep-attribute
+                    :category "Str"}])
+                (when (< 2 arity)
+                  [{:id       post-concept
+                    :type     :operation
+                    :name     "mkPrep"
+                    :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                    :category "Prep"
+                    :module   module}
+                   {:id       post-arg
+                    :type     :quote
+                    :value    post-attribute
+                    :category "Str"}]))
+        (update ::sg/relations concat
+                [{:from     concept
+                  :to       (utils/find-root child)
+                  :role     :arg
+                  :index    0
+                  :category "V"
+                  :name     "V"}]
+                (when (< 1 arity)
+                  [{:from     concept
+                    :to       prep-concept
+                    :role     :arg
+                    :index    1
+                    :category "Prep"
+                    :name     "Prep"}
+                   {:from     prep-concept
+                    :to       prep-arg
+                    :role     :arg
+                    :index    0
+                    :category "Str"
+                    :name     "Str"}])
+                (when (< 2 arity)
+                  [{:from     concept
+                    :to       post-concept
+                    :role     :arg
+                    :index    2
+                    :category "Prep"
+                    :name     "Prep"}
+                   {:from     post-concept
+                    :to       post-arg
+                    :role     :arg
+                    :index    0
+                    :category "Str"
+                    :name     "Str"}])))))
+
+(defmethod resolve-dict-item "VA" [dict-item]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "VA")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkVA"
+                                       :label    (utils/get-operation-label module "mkVA" ["V"] "VA")
+                                       :category "VA"
+                                       :module   module}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "V"
+                                        :name     "V"}]))))
+
+(defmethod resolve-dict-item "V2A" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)
+        prep-concept (utils/gen-id)
+        post-concept (utils/gen-id)
+        prep-arg (utils/gen-id)
+        post-arg (utils/gen-id)
+        prep-attribute (get attributes "Prep")
+        post-attribute (get attributes "Post")
+        arity (cond-> 1
+                      (some? prep-attribute) (inc)
+                      (and (some? prep-attribute) (some? post-attribute)) (inc))
+        arg-types (case arity
+                    1 ["V"]
+                    2 ["V" "Prep"]
+                    3 ["V" "Prep" "Prep"])]
+    (-> child
+        (assoc ::sg/category "V2A")
+        (update ::sg/concepts concat
+                [{:id       concept
+                  :type     :operation
+                  :name     "mkV2A"
+                  :label    (utils/get-operation-label module "mkV2A" arg-types "V2A")
+                  :category "V2A"
+                  :module   module}]
+                (when (< 1 arity)
+                  [{:id       prep-concept
+                    :type     :operation
+                    :name     "mkPrep"
+                    :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                    :category "Prep"
+                    :module   module}
+                   {:id       prep-arg
+                    :type     :quote
+                    :value    prep-attribute
+                    :category "Str"}])
+                (when (< 2 arity)
+                  [{:id       post-concept
+                    :type     :operation
+                    :name     "mkPrep"
+                    :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                    :category "Prep"
+                    :module   module}
+                   {:id       post-arg
+                    :type     :quote
+                    :value    post-attribute
+                    :category "Str"}]))
+        (update ::sg/relations concat
+                [{:from     concept
+                  :to       (utils/find-root child)
+                  :role     :arg
+                  :index    0
+                  :category "V"
+                  :name     "V"}]
+                (when (< 1 arity)
+                  [{:from     concept
+                    :to       prep-concept
+                    :role     :arg
+                    :index    1
+                    :category "Prep"
+                    :name     "Prep"}
+                   {:from     prep-concept
+                    :to       prep-arg
+                    :role     :arg
+                    :index    0
+                    :category "Str"
+                    :name     "Str"}])
+                (when (< 2 arity)
+                  [{:from     concept
+                    :to       post-concept
+                    :role     :arg
+                    :index    2
+                    :category "Prep"
+                    :name     "Prep"}
+                   {:from     post-concept
+                    :to       post-arg
+                    :role     :arg
+                    :index    0
+                    :category "Str"
+                    :name     "Str"}])))))
+
+(defmethod resolve-dict-item "VQ" [dict-item]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "VQ")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkVQ"
+                                       :label    (utils/get-operation-label module "mkVQ" ["V"] "VQ")
+                                       :category "VQ"
+                                       :module   module}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "V"
+                                        :name     "V"}]))))
+
+(defmethod resolve-dict-item "V2Q" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)
+        prep-concept (utils/gen-id)
+        prep-arg (utils/gen-id)
+        prep-attribute (get attributes "Prep" "as")]
+    (-> child
+        (assoc ::sg/category "V2Q")
+        (update ::sg/concepts concat
+                [{:id       concept
+                  :type     :operation
+                  :name     "mkV2Q"
+                  :label    (utils/get-operation-label module "mkV2Q" ["V" "Prep"] "V2Q")
+                  :category "V2Q"
+                  :module   module}
+                 {:id       prep-concept
+                  :type     :operation
+                  :name     "mkPrep"
+                  :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                  :category "Prep"
+                  :module   module}
+                 {:id       prep-arg
+                  :type     :quote
+                  :value    prep-attribute
+                  :category "Str"}])
+        (update ::sg/relations concat
+                [{:from     concept
+                  :to       (utils/find-root child)
+                  :role     :arg
+                  :index    0
+                  :category "V"
+                  :name     "V"}
+                 {:from     concept
+                  :to       prep-concept
+                  :role     :arg
+                  :index    1
+                  :category "Prep"
+                  :name     "Prep"}
+                 {:from     prep-concept
+                  :to       prep-arg
+                  :role     :arg
+                  :index    0
+                  :category "Str"
+                  :name     "Str"}]))))
+
+(defmethod resolve-dict-item "VS" [dict-item]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "VS")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkVS"
+                                       :label    (utils/get-operation-label module "mkVS" ["V"] "VS")
+                                       :category "VS"
+                                       :module   module}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "V"
+                                        :name     "V"}]))))
+
+(defmethod resolve-dict-item "V2S" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)
+        prep-concept (utils/gen-id)
+        prep-arg (utils/gen-id)
+        prep-attribute (get attributes "Prep" "to")]
+    (-> child
+        (assoc ::sg/category "V2S")
+        (update ::sg/concepts concat
+                [{:id       concept
+                  :type     :operation
+                  :name     "mkV2S"
+                  :label    (utils/get-operation-label module "mkV2S" ["V" "Prep"] "V2Q")
+                  :category "V2S"
+                  :module   module}
+                 {:id       prep-concept
+                  :type     :operation
+                  :name     "mkPrep"
+                  :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                  :category "Prep"
+                  :module   module}
+                 {:id       prep-arg
+                  :type     :quote
+                  :value    prep-attribute
+                  :category "Str"}])
+        (update ::sg/relations concat
+                [{:from     concept
+                  :to       (utils/find-root child)
+                  :role     :arg
+                  :index    0
+                  :category "V"
+                  :name     "V"}
+                 {:from     concept
+                  :to       prep-concept
+                  :role     :arg
+                  :index    1
+                  :category "Prep"
+                  :name     "Prep"}
+                 {:from     prep-concept
+                  :to       prep-arg
+                  :role     :arg
+                  :index    0
+                  :category "Str"
+                  :name     "Str"}]))))
+
+(defmethod resolve-dict-item "VV" [dict-item]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)]
+    (-> child
+        (assoc ::sg/category "VV")
+        (update ::sg/concepts concat [{:id       concept
+                                       :type     :operation
+                                       :name     "mkVV"
+                                       :label    (utils/get-operation-label module "mkVV" ["V"] "VV")
+                                       :category "VV"
+                                       :module   module}])
+        (update ::sg/relations concat [{:from     concept
+                                        :to       (utils/find-root child)
+                                        :role     :arg
+                                        :index    0
+                                        :category "V"
+                                        :name     "V"}]))))
+
+(defmethod resolve-dict-item "V2V" [{::dict-item/keys [attributes] :as dict-item}]
+  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept (utils/gen-id)
+        prep-concept (utils/gen-id)
+        post-concept (utils/gen-id)
+        prep-arg (utils/gen-id)
+        post-arg (utils/gen-id)
+        prep-attribute (get attributes "Prep" "")
+        post-attribute (get attributes "Post" "to")
+        arity (cond-> 1 (and (some? prep-attribute) (some? post-attribute)) (+ 2))
+        arg-types (case arity
+                    1 ["V"]
+                    3 ["V" "Prep" "Prep"])]
+    (-> child
+        (assoc ::sg/category "V2V")
+        (update ::sg/concepts concat
+                [{:id       concept
+                  :type     :operation
+                  :name     "mkV2V"
+                  :label    (utils/get-operation-label module "mkV2V" arg-types "V2V")
+                  :category "V2V"
+                  :module   module}]
+                (when (< 1 arity)
+                  [{:id       prep-concept
+                    :type     :operation
+                    :name     "mkPrep"
+                    :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                    :category "Prep"
+                    :module   module}
+                   {:id       prep-arg
+                    :type     :quote
+                    :value    prep-attribute
+                    :category "Str"}])
+                (when (< 2 arity)
+                  [{:id       post-concept
+                    :type     :operation
+                    :name     "mkPrep"
+                    :label    (utils/get-operation-label module "mkPrep" ["Str"] "Prep")
+                    :category "Prep"
+                    :module   module}
+                   {:id       post-arg
+                    :type     :quote
+                    :value    post-attribute
+                    :category "Str"}]))
+        (update ::sg/relations concat
+                [{:from     concept
+                  :to       (utils/find-root child)
+                  :role     :arg
+                  :index    0
+                  :category "V"
+                  :name     "V"}]
+                (when (< 1 arity)
+                  [{:from     concept
+                    :to       prep-concept
+                    :role     :arg
+                    :index    1
+                    :category "Prep"
+                    :name     "Prep"}
+                   {:from     prep-concept
+                    :to       prep-arg
+                    :role     :arg
+                    :index    0
+                    :category "Str"
+                    :name     "Str"}])
+                (when (< 2 arity)
+                  [{:from     concept
+                    :to       post-concept
+                    :role     :arg
+                    :index    2
+                    :category "Prep"
+                    :name     "Prep"}
+                   {:from     post-concept
+                    :to       post-arg
+                    :role     :arg
+                    :index    0
+                    :category "Str"
+                    :name     "Str"}])))))
diff --git a/core/src/acc_text/nlg/dictionary/lang/other.clj b/core/src/acc_text/nlg/dictionary/lang/other.clj
new file mode 100644
index 000000000..d650ef2e3
--- /dev/null
+++ b/core/src/acc_text/nlg/dictionary/lang/other.clj
@@ -0,0 +1,50 @@
+(ns acc-text.nlg.dictionary.lang.other
+  (:require [acc-text.nlg.dictionary.item :as dict-item]
+            [acc-text.nlg.dictionary.item.form :as dict-item-form]
+            [clojure.string :as str]))
+
+(defn escape-string [s]
+  (str/replace s #"\"" "\\\\\""))
+
+(defn join-forms [forms]
+  (->> forms
+       (map #(format "\"%s\"" (escape-string (::dict-item-form/value %))))
+       (str/join " ")))
+
+(defmulti resolve-dict-item (fn [{::dict-item/keys [language category]}]
+                              (str/join "/" [language category])))
+
+(defmethod resolve-dict-item :default [{::dict-item/keys [language category]}]
+  (throw (Exception. (format "Don't know how to resolve dictionary item category `%s` for language `%s`" category language))))
+
+(defmethod resolve-dict-item "Spa/N" [{::dict-item/keys [forms attributes]}]
+  (if (contains? attributes "Gender")
+    (format "(ParadigmsSpa.mkN %s ParadigmsSpa.%s)" (join-forms forms) (get attributes "Gender"))
+    (format "(ParadigmsSpa.mkN %s)" (join-forms forms))))
+
+(defmethod resolve-dict-item "Spa/V" [{::dict-item/keys [forms]}]
+  (format "(ParadigmsSpa.mkV %s)" (join-forms forms)))
+
+(defmethod resolve-dict-item "Spa/A" [{::dict-item/keys [forms]}]
+  (format "(ParadigmsSpa.mkA %s)" (join-forms forms)))
+
+(defmethod resolve-dict-item "Spa/Adv" [{::dict-item/keys [forms]}]
+  (format "(ParadigmsSpa.mkAdv %s)" (join-forms forms)))
+
+(defmethod resolve-dict-item "Spa/AdV" [{::dict-item/keys [forms]}]
+  (format "(ParadigmsSpa.mkAdV %s)" (join-forms forms)))
+
+(defmethod resolve-dict-item "Ger/V" [{::dict-item/keys [forms]}]
+  (format "(ParadigmsGer.mkV %s)" (join-forms forms)))
+
+(defmethod resolve-dict-item "Rus/A" [{::dict-item/keys [forms]}]
+  (format "(ParadigmsRus.mkA %s)" (join-forms forms)))
+
+(defmethod resolve-dict-item "Rus/N" [{::dict-item/keys [forms attributes]}]
+  (format "(ParadigmsRus.mkN %s MorphoRus.%s MorphoRus.%s)"
+          (join-forms (if (= 1 (count forms)) (repeat 13 (first forms)) forms))
+          (get attributes "Gender" "Masc")
+          (get attributes "Animacy" "Inanimate")))
+
+(defmethod resolve-dict-item "Rus/V" [{::dict-item/keys [forms attributes]}]
+  (format "(ParadigmsRus.mkV MorphoRus.%s %s)" (get attributes "Aspect") (join-forms forms)))
diff --git a/core/src/acc_text/nlg/generator.clj b/core/src/acc_text/nlg/generator.clj
index 18afff6cb..e2145c1cf 100644
--- a/core/src/acc_text/nlg/generator.clj
+++ b/core/src/acc_text/nlg/generator.clj
@@ -27,10 +27,12 @@
                        cat))))
 
 (defn ->incomplete [lang {::grammar/keys [module cat fun lincat lin]}]
-  (format "incomplete concrete %sBody of %s = open Syntax, Grammar, %sLex, Paradigms%s in {%s\n}"
+  (format "incomplete concrete %sBody of %s = open Syntax, Grammar, %sLex, Morpho%s, Res%s, Paradigms%s in {%s\n}"
           module
           module
           module
+          (if (= lang "Lav") "Eng" lang)
+          lang
           lang
           (join-body
             "lincat" (->> lincat
diff --git a/core/src/acc_text/nlg/grammar/dictionary_item.clj b/core/src/acc_text/nlg/grammar/dictionary_item.clj
deleted file mode 100644
index e19990d0f..000000000
--- a/core/src/acc_text/nlg/grammar/dictionary_item.clj
+++ /dev/null
@@ -1,104 +0,0 @@
-(ns acc-text.nlg.grammar.dictionary-item
-  (:require [clojure.string :as str]
-            [clojure.tools.logging :as log]))
-
-(defn escape-string [s]
-  (str/replace s #"\"" "\\\\\""))
-
-(defmulti build-dictionary-item (fn [type {:keys [category language]}]
-                                  (str/join "/" [language (or type "s:Str") category])))
-
-(defmethod build-dictionary-item :default [type {:keys [category language forms]}]
-  (log/warnf "Unknown dictionary-item type pair for %s: %s/%s" language (or type "s:Str") category)
-  (format "\"%s\"" (if (some? (first forms)) (escape-string (first forms)) "")))
-
-(defn join-forms [forms]
-  (->> forms
-       (map #(format "\"%s\"" (escape-string %)))
-       (str/join " ")))
-
-(defmethod build-dictionary-item "Eng/V/V" [_ {:keys [forms]}]
-  (format "(ParadigmsEng.mkV %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Eng/A/A" [_ {:keys [forms]}]
-  (format "(ParadigmsEng.mkA %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Eng/Adv/N" [_ {:keys [forms attributes]}]
-  (if (contains? attributes "Gender")
-    (format "(ParadigmsEng.mkN ParadigmsEng.%s (ParadigmsEng.mkN %s))" (get attributes "Gender") (join-forms forms))
-    (format "(ParadigmsEng.mkN %s)" (join-forms forms))))
-
-(defmethod build-dictionary-item "Eng/V2/V" [_ {:keys [forms]}]
-  (format "(ParadigmsEng.mkV2 (ParadigmsEng.mkV %s))" (join-forms forms)))
-
-(defmethod build-dictionary-item "Eng/N/N" [_ {:keys [forms attributes]}]
-  (if (contains? attributes "Gender")
-    (format "(ParadigmsEng.mkN ParadigmsEng.%s (ParadigmsEng.mkN %s))" (get attributes "Gender") (join-forms forms))
-    (format "(ParadigmsEng.mkN %s)" (join-forms forms))))
-
-(defmethod build-dictionary-item "Eng/Adv/Adv" [_ {:keys [forms]}]
-  (format "(ParadigmsEng.mkAdv %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Eng/Str/Str" [_ {:keys [forms]}]
-  (format "\"%s\"" (escape-string (first forms))))
-
-(defmethod build-dictionary-item "Eng/s:Str/Str" [_ {:keys [forms]}]
-  (format "{s = \"%s\"}" (escape-string (first forms))))
-
-(defmethod build-dictionary-item "Eng/s:Str/N" [_ {:keys [forms attributes]}]
-  (format "(mkText (mkCl %s))"
-          (if (contains? attributes "Gender")
-            (format "(ParadigmsEng.mkN ParadigmsEng.%s (ParadigmsEng.mkN %s))" (get attributes "Gender") (join-forms forms))
-            (format "(ParadigmsEng.mkN %s)" (join-forms forms)))))
-
-(defmethod build-dictionary-item "Spa/N/N" [_ {:keys [forms attributes]}]
-  (if (contains? attributes "Gender")
-    (format "(ParadigmsSpa.mkN %s ParadigmsSpa.%s)" (join-forms forms) (get attributes "Gender"))
-    (format "(ParadigmsSpa.mkN %s)" (join-forms forms))))
-
-(defmethod build-dictionary-item "Spa/V/V" [_ {:keys [forms]}]
-  (format "(ParadigmsSpa.mkV %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Spa/A/A" [_ {:keys [forms]}]
-  (format "(ParadigmsSpa.mkA %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Spa/Adv/Adv" [_ {:keys [forms]}]
-  (format "(ParadigmsSpa.mkAdv %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Spa/AdV/AdV" [_ {:keys [forms]}]
-  (format "(ParadigmsSpa.mkAdV %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Eng/s:Str/V" [_ {:keys [forms]}]
-  (format "(mkText (mkCl %s))" (format "(ParadigmsEng.mkV %s)" (join-forms forms))))
-
-(defmethod build-dictionary-item "Ger/V/V" [_ {:keys [forms]}]
-  (format "(ParadigmsGer.mkV %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Rus/A/A" [_ {:keys [forms]}]
-  (format "(ParadigmsRus.mkA %s)" (join-forms forms)))
-
-(defmethod build-dictionary-item "Rus/N/N" [_ {:keys [forms attributes]}]
-  (format "(ParadigmsRus.mkN %s MorphoRus.%s MorphoRus.%s)"
-          (join-forms (if (= 1 (count forms)) (repeat 13 (first forms)) forms))
-          (get attributes "Gender" "Masc")
-          (get attributes "Animacy" "Inanimate")))
-
-(defmethod build-dictionary-item "Rus/V2/V" [_ {:keys [forms attributes]}]
-  (format "(ParadigmsRus.mkV2 (ParadigmsRus.mkV MorphoRus.%s %s) \"\" ParadigmsRus.%s)"
-          (get attributes "Aspect") (join-forms forms) (get attributes "Case")))
-
-(defmethod build-dictionary-item "Rus/V/V" [_ {:keys [forms attributes]}]
-  (format "(ParadigmsRus.mkV MorphoRus.%s %s)" (get attributes "Aspect") (join-forms forms)))
-
-(defmethod build-dictionary-item "Rus/Str/Str" [_ {:keys [forms]}]
-  (format "\"%s\"" (escape-string (first forms))))
-
-(defmethod build-dictionary-item "Rus/s:Str/Str" [_ {:keys [forms]}]
-  (format "{s = \"%s\"}" (escape-string (first forms))))
-
-(defmethod build-dictionary-item "Rus/s:Str/N" [_ {:keys [forms attributes]}]
-  (format "(mkText (mkCl (ParadigmsRus.mkN %s MorphoRus.%s MorphoRus.%s)))"
-          (join-forms forms) (get attributes "Gender" "Masc") (get attributes "Animacy" "Inanimate")))
-
-(defmethod build-dictionary-item "Rus/s:Str/V" [_ {:keys [forms attributes]}]
-  (format "(mkText (mkCl (ParadigmsRus.mkV MorphoRus.%s %s)))" (get attributes "Aspect") (join-forms forms)))
diff --git a/core/src/acc_text/nlg/grammar/impl.clj b/core/src/acc_text/nlg/grammar/impl.clj
index 6fefed4f9..442dec931 100644
--- a/core/src/acc_text/nlg/grammar/impl.clj
+++ b/core/src/acc_text/nlg/grammar/impl.clj
@@ -1,15 +1,15 @@
 (ns acc-text.nlg.grammar.impl
-  (:require [acc-text.nlg.grammar.dictionary-item :refer [build-dictionary-item]]
+  (:require [acc-text.nlg.dictionary.impl :as dictionary]
+            [acc-text.nlg.dictionary.item :as dict-item]
             [acc-text.nlg.graph.amr :refer [attach-amrs]]
             [acc-text.nlg.graph.categories :refer [resolve-categories]]
             [acc-text.nlg.graph.condition :refer [determine-conditions]]
             [acc-text.nlg.graph.data :refer [resolve-data]]
-            [acc-text.nlg.graph.dictionary-item :refer [resolve-dictionary-items]]
             [acc-text.nlg.graph.lists :refer [resolve-lists]]
             [acc-text.nlg.graph.modifier :refer [resolve-modifiers]]
             [acc-text.nlg.graph.paths :refer [resolve-paths]]
             [acc-text.nlg.graph.polarity :refer [resolve-polarity]]
-            [acc-text.nlg.graph.utils :refer [add-concept-position find-root-id get-in-edge get-successors prune-graph]]
+            [acc-text.nlg.graph.utils :refer [add-concept-position find-root-id get-successors prune-graph graph->tree]]
             [acc-text.nlg.graph.variables :refer [resolve-variables]]
             [acc-text.nlg.graph.segment :refer [add-paragraph-symbol]]
             [acc-text.nlg.semantic-graph.utils :refer [semantic-graph->ubergraph]]
@@ -21,9 +21,11 @@
 (def data-types #{:data :quote :dictionary-item})
 
 (defn node->cat [graph node-id]
-  (let [{:keys [type position]} (attrs graph node-id)]
-    (str (str/replace (name type) #"-" "_")
-         (format "%02d" (or position 0)))))
+  (let [{:keys [type position] :as attrs} (attrs graph node-id)]
+    (case type
+      :dictionary-item (str/replace (:label attrs) #"-" "_")
+      (str (str/replace (name type) #"-" "_")
+           (format "%02d" (or position 0))))))
 
 (defn s-node? [graph node-id]
   (let [category (:category (attrs graph node-id))]
@@ -81,18 +83,8 @@
     #:acc-text.nlg.grammar
         {:oper [[cat "Str" (format "\"%s\"" (str/replace value #"\"" "\\\\\""))]]}))
 
-(defmethod build-node :dictionary-item [graph node-id]
-  (let [cat (node->cat graph node-id)
-        in-edge-category (get-in graph [:attrs (:id (get-in-edge graph node-id)) :category])
-        {category :category :as attrs} (attrs graph node-id)]
-    #:acc-text.nlg.grammar
-        {:oper [[cat
-                 (cond
-                   (= "Str" in-edge-category) "Str"
-                   (= "Str" category) "{s : Str}"
-                   (nil? in-edge-category) "Text"
-                   :else category)
-                 (build-dictionary-item in-edge-category attrs)]]}))
+(defmethod build-node :dictionary-item [_ _]
+  #:acc-text.nlg.grammar{})
 
 (defmethod build-node :synonyms [graph node-id]
   (let [successors (get-successors graph node-id)
@@ -146,12 +138,21 @@
       (resolve-lists context)
       (resolve-modifiers context)
       (resolve-categories)
-      (resolve-dictionary-items context)
       (resolve-data context)
       (resolve-polarity)
       (resolve-paths context)
       (add-concept-position)))
 
+(defn build-dictionary-operations [context]
+  (map (fn [{::dict-item/keys [key category] :as dict-item}]
+         (let [resolved-item (dictionary/resolve-dict-item dict-item)]
+           [(str/replace key #"-" "_")
+            category
+            (if (string? resolved-item)
+              resolved-item
+              (str (graph->tree (semantic-graph->ubergraph resolved-item))))]))
+       (vals (:dictionary context))))
+
 (defn build-grammar
   ([semantic-graph context]
    (build-grammar "Default" "Instance" semantic-graph context))
@@ -174,5 +175,5 @@
                   :fun      {}
                   :lincat   {}
                   :lin      {}
-                  :oper     []}
+                  :oper     (build-dictionary-operations context)}
              (pre-traverse graph start-id)))))
diff --git a/core/src/acc_text/nlg/graph/data.clj b/core/src/acc_text/nlg/graph/data.clj
index 2aa59d2b0..dbdd1b4e1 100644
--- a/core/src/acc_text/nlg/graph/data.clj
+++ b/core/src/acc_text/nlg/graph/data.clj
@@ -1,7 +1,5 @@
 (ns acc-text.nlg.graph.data
-  (:require [acc-text.nlg.dictionary.item :as dict-item]
-            [acc-text.nlg.graph.utils :refer [find-nodes get-in-edge]]
-            [acc-text.nlg.graph.dictionary-item :refer [get-dictionary-item add-dictionary-item]]
+  (:require [acc-text.nlg.graph.utils :refer [find-nodes get-in-edge]]
             [loom.attr :refer [attrs]]))
 
 (defn get-data [data key]
@@ -25,14 +23,12 @@
 (defn resolve-data [g {data :data dictionary :dictionary {lang "*Language"} :constants}]
   (reduce (fn [g [node-id {key :name}]]
             (let [category (find-data-category g node-id)
-                  value (get-data data key)
-                  dictionary-keys (group-by ::dict-item/key (vals dictionary))]
-              (cond
-                (contains? dictionary [value category]) (add-dictionary-item g node-id
-                                                                             (get-dictionary-item dictionary lang value category))
-                (contains? dictionary-keys value) (add-dictionary-item g node-id
-                                                                       (get-dictionary-item dictionary lang value
-                                                                                            (get-in dictionary-keys [value 0 ::dict-item/category])))
-                :else (update-in g [:attrs node-id] #(merge % {:type :quote :value value})))))
+                  value (get-data data key)]
+              (update-in g [:attrs node-id] #(merge % (if (contains? dictionary [value category])
+                                                        {:type     :dictionary-item
+                                                         :name     (format "%s_%s_%s" value category lang)
+                                                         :label    value
+                                                         :category category}
+                                                        {:type :quote :value value})))))
           g
           (concat (find-nodes g {:type :data}))))
diff --git a/core/src/acc_text/nlg/graph/dictionary_item.clj b/core/src/acc_text/nlg/graph/dictionary_item.clj
deleted file mode 100644
index 94ae03085..000000000
--- a/core/src/acc_text/nlg/graph/dictionary_item.clj
+++ /dev/null
@@ -1,25 +0,0 @@
-(ns acc-text.nlg.graph.dictionary-item
-  (:require [acc-text.nlg.dictionary.item :as dict-item]
-            [acc-text.nlg.dictionary.item.form :as dict-item-form]
-            [acc-text.nlg.graph.utils :refer [find-nodes]]))
-
-(defn get-dictionary-item [dictionary language key category]
-  (if (contains? dictionary [key category])
-    (get dictionary [key category])
-    (throw (Exception. (format "Missing dictionary item for `%s` language category `%s`: `%s`"
-                               language category key)))))
-
-(defn add-dictionary-item [g node-id dictionary-item]
-  (let [{::dict-item/keys [category language forms attributes]} dictionary-item]
-    (update-in g [:attrs node-id] #(merge % {:type       :dictionary-item
-                                             :category   category
-                                             :language   language
-                                             :forms      (map ::dict-item-form/value forms)
-                                             :attributes (or attributes {})}))))
-
-(defn resolve-dictionary-items [g {dictionary :dictionary {lang "*Language"} :constants}]
-  (reduce (fn [g [node-id {key :label name :name category :category}]]
-            (add-dictionary-item g node-id
-                                 (get-dictionary-item dictionary lang (or key name) category)))
-          g
-          (find-nodes g {:type :dictionary-item})))
diff --git a/core/src/acc_text/nlg/graph/utils.clj b/core/src/acc_text/nlg/graph/utils.clj
index 9f5c7d468..c1602caba 100644
--- a/core/src/acc_text/nlg/graph/utils.clj
+++ b/core/src/acc_text/nlg/graph/utils.clj
@@ -1,10 +1,11 @@
 (ns acc-text.nlg.graph.utils
   (:require [acc-text.nlg.semantic-graph :as sg]
+            [clojure.set :as set]
+            [clojure.string :as str]
             [loom.alg :as alg]
             [loom.attr :refer [attrs]]
             [loom.graph :as graph]
-            [ubergraph.core :as uber]
-            [clojure.set :as set]))
+            [ubergraph.core :as uber]))
 
 (defn id-seq []
   (map #(keyword (format "%02d" %)) (rest (range))))
@@ -46,6 +47,9 @@
 (defn find-root-id [g]
   (ffirst (find-nodes g {:type :document-plan})))
 
+(defn find-root-nodes [g]
+  (filter #(nil? (get-in-edge g %)) (graph/nodes g)))
+
 (defn prune-detached-nodes [g root-id]
   (apply graph/remove-nodes g
          (set/difference
@@ -86,5 +90,17 @@
                                  (merge {:id (uuid->id id)} concept)))
                           (sort-by :id))}))
 
+(defn escape-string [s]
+  (str/replace s #"\"" "\\\\\""))
+
+(defn graph->tree
+  ([g] (graph->tree g (first (find-root-nodes g))))
+  ([g root-node]
+   (let [{:keys [type name module value]} (attrs g root-node)]
+     (case type
+       :quote (escape-string value)
+       :operation (cons (symbol (str module "." name))
+                        (map #(graph->tree g %) (get-successors g root-node)))))))
+
 (defn save-graph [graph filename]
   (uber/viz-graph graph {:auto-label true :save {:format :png :filename filename}}))
diff --git a/core/src/acc_text/nlg/semantic_graph/utils.clj b/core/src/acc_text/nlg/semantic_graph/utils.clj
index 76b484773..7cbead31d 100644
--- a/core/src/acc_text/nlg/semantic_graph/utils.clj
+++ b/core/src/acc_text/nlg/semantic_graph/utils.clj
@@ -1,9 +1,13 @@
 (ns acc-text.nlg.semantic-graph.utils
   (:require [acc-text.nlg.semantic-graph :as sg]
             [clojure.set :as set]
+            [clojure.string :as str]
             [ubergraph.core :as uber])
   (:import (java.util UUID)))
 
+(defn gen-id []
+  (str (UUID/randomUUID)))
+
 (defn find-descendant-ids [{relations ::sg/relations} ids]
   (let [relation-map (group-by :from relations)]
     (loop [ids ids descendant-ids #{}]
@@ -20,8 +24,11 @@
          (:to)
          (get concept-map))))
 
-(defn find-root [{::sg/keys [concepts]}]
-  (some #(when (= :document-plan (:type %)) %) concepts))
+(defn find-root [{::sg/keys [concepts relations]}]
+  (first (set/difference (set (map :id concepts)) (set (map :to relations)))))
+
+(defn get-operation-label [module name args category]
+  (format "%s.%s/%s" module name (str/join "->" (conj (vec args) category))))
 
 (defn get-children [{::sg/keys [concepts relations]} {id :id}]
   (let [concept-map (zipmap (map :id concepts) concepts)]


Test patch:
diff --git a/core/test/acc_text/nlg/dictionary_test.clj b/core/test/acc_text/nlg/dictionary_test.clj
new file mode 100644
index 000000000..efab5d7c3
--- /dev/null
+++ b/core/test/acc_text/nlg/dictionary_test.clj
@@ -0,0 +1,699 @@
+(ns acc-text.nlg.dictionary-test
+  (:require [acc-text.nlg.dictionary.item :as dict-item]
+            [acc-text.nlg.dictionary.item.form :as dict-item-form]
+            [acc-text.nlg.dictionary.impl :refer [resolve-dict-item]]
+            [acc-text.nlg.semantic-graph.utils :refer [find-root gen-id]]
+            [acc-text.nlg.semantic-graph :as sg]
+            [acc-text.nlg.core :refer [generate-text]]
+            [clojure.test :refer [deftest is are testing]]))
+
+(defn add-ns [dict-item]
+  (update dict-item ::dict-item/forms #(mapv (fn [form] #::dict-item-form{:value form}) %)))
+
+(deftest ^:integration dictionary-item-generation
+  (are [result dict-item]
+    (let [dict-item-graph (resolve-dict-item (add-ns dict-item))
+          document-plan (gen-id)
+          segment (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    (find-root dict-item-graph)
+                                                             :role  :instance
+                                                             :index 0}]))]
+      (is (= result (map :text (generate-text semantic-graph {} "Eng")))))
+
+    ["Good."] #::dict-item{:key      "good_A"
+                           :category "A"
+                           :language "Eng"
+                           :forms    ["good" "better" "best" "well"]}
+
+    ["Absent."] #::dict-item{:key      "absent_A2"
+                             :category "A2"
+                             :language "Eng"
+                             :forms    ["absent"]}
+
+    ["Cat."] #::dict-item{:key        "cat_N"
+                          :category   "N"
+                          :language   "Eng"
+                          :forms      ["cat"]
+                          :attributes {"Gender" "nonhuman"}}
+
+    ["Vilnius."] #::dict-item{:key        "Vilnius_PN"
+                              :category   "PN"
+                              :language   "Eng"
+                              :forms      ["Vilnius"]
+                              :attributes {"Gender" "nonhuman"}}
+
+    ["Mother."] #::dict-item{:key        "mother_N2"
+                             :category   "N2"
+                             :language   "Eng"
+                             :forms      ["mother"]
+                             :attributes {"Post" "of"}}
+
+    ["Son."] #::dict-item{:key        "son_N3"
+                          :category   "N3"
+                          :language   "Eng"
+                          :forms      ["son"]
+                          :attributes {"Prep" "from"
+                                       "Post" "to"}}
+
+    ["It."] #::dict-item{:key        "it_NP"
+                         :category   "NP"
+                         :language   "Eng"
+                         :forms      ["it" "it" "its"]
+                         :attributes {"Number" "singular"
+                                      "Person" "P3"
+                                      "Gender" "nonhuman"}}
+
+    ["What."] #::dict-item{:key        "what_IP"
+                           :category   "IP"
+                           :language   "Eng"
+                           :forms      ["what" "what" "what's"]
+                           :attributes {"Number" "singular"}}
+
+    ["Quite."] #::dict-item{:key      "quite_AdA"
+                            :category "AdA"
+                            :language "Eng"
+                            :forms    ["quite"]}
+
+    ["Almost."] #::dict-item{:key      "almost_AdN"
+                             :category "AdN"
+                             :language "Eng"
+                             :forms    ["almost"]}
+
+    ["Always."] #::dict-item{:key      "always_AdV"
+                             :category "AdV"
+                             :language "Eng"
+                             :forms    ["always"]}
+
+    ["Today."] #::dict-item{:key      "today_Adv"
+                            :category "Adv"
+                            :language "Eng"
+                            :forms    ["today"]}
+
+    ["At."] #::dict-item{:key      "at_Prep"
+                         :category "Prep"
+                         :language "Eng"
+                         :forms    ["at"]}
+
+    ["About."] #::dict-item{:key      "about_Post"
+                            :category "Post"
+                            :language "Eng"
+                            :forms    ["about"]}
+
+    ["I."] #::dict-item{:key        "I_Pron"
+                        :category   "Pron"
+                        :language   "Eng"
+                        :forms      ["I" "me" "my" "mine"]
+                        :attributes {"Number" "singular"
+                                     "Person" "P1"
+                                     "Gender" "human"}}
+
+    ["Although."] #::dict-item{:key      "although_Subj"
+                               :category "Subj"
+                               :language "Eng"
+                               :forms    ["although"]}
+
+    ["Alas."] #::dict-item{:key      "alas_Interj"
+                           :category "Interj"
+                           :language "Eng"
+                           :forms    ["alas"]}
+
+    ["To feel."] #::dict-item{:key      "feel_V"
+                              :category "V"
+                              :language "Eng"
+                              :forms    ["feel" "felt" "felt"]}
+
+    ["To run from itself."] #::dict-item{:key        "run_V2"
+                                         :category   "V2"
+                                         :language   "Eng"
+                                         :forms      ["run" "ran" "run"]
+                                         :attributes {"Post" "from"}}))
+
+(deftest ^:integration complex-dict-item-generation
+  (testing "V3"
+    (let [dict-item (add-ns #::dict-item{:key        "speak_V3"
+                                         :category   "V3"
+                                         :language   "Eng"
+                                         :forms      ["speak" "spoke" "spoken"]
+                                         :attributes {"Prep" "with"
+                                                      "Post" "about"}})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg2 (gen-id)
+          arg3 (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/V3->NP->NP->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg2
+                                                            :type     :operation
+                                                            :name     "everybody_NP"
+                                                            :label    "Syntax.everybody_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg3
+                                                            :type     :operation
+                                                            :name     "everything_NP"
+                                                            :label    "Syntax.everything_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "V3"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg2
+                                                             :role     :arg
+                                                             :category "NP"
+                                                             :index    1}
+                                                            {:from     operation
+                                                             :to       arg3
+                                                             :role     :arg
+                                                             :category "NP"
+                                                             :index    2}]))]
+      (is (= ["To speak with everybody about everything."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "VA"
+    (let [dict-item (add-ns #::dict-item{:key      "become_VA"
+                                         :category "VA"
+                                         :language "Eng"
+                                         :forms    ["become" "became" "become"]})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/VA->AP->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg
+                                                            :type     :quote
+                                                            :value    "red"
+                                                            :category "Str"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "VA"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg
+                                                             :role     :arg
+                                                             :category "AP"
+                                                             :index    1}]))]
+      (is (= ["To become red."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "V2A"
+    (let [dict-item (add-ns #::dict-item{:key        "paint_V2A"
+                                         :category   "V2A"
+                                         :language   "Eng"
+                                         :forms      ["paint"]
+                                         :attributes {"Prep" "above"
+                                                      "Post" "with"}})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg2 (gen-id)
+          arg3 (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/V2A->NP->AP->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg2
+                                                            :type     :operation
+                                                            :name     "it_NP"
+                                                            :label    "Syntax.it_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg3
+                                                            :type     :quote
+                                                            :value    "red"
+                                                            :category "Str"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "V2A"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg2
+                                                             :role     :arg
+                                                             :category "NP"
+                                                             :index    1}
+                                                            {:from     operation
+                                                             :to       arg3
+                                                             :role     :arg
+                                                             :category "AP"
+                                                             :index    2}]))]
+      (is (= ["To paint above it with red."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "VQ"
+    (let [dict-item (add-ns #::dict-item{:key      "wonder_VQ"
+                                         :category "VQ"
+                                         :language "Eng"
+                                         :forms    ["wonder" "wondered"]})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/VQ->QS->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg
+                                                            :type     :operation
+                                                            :name     "it_NP"
+                                                            :label    "Syntax.it_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "VQ"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg
+                                                             :role     :arg
+                                                             :category "QS"
+                                                             :index    1}]))]
+      (is (= ["To wonder if there is it."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "V2Q"
+    (let [dict-item (add-ns #::dict-item{:key        "ask_V2Q"
+                                         :category   "V2Q"
+                                         :language   "Eng"
+                                         :forms      ["ask"]
+                                         :attributes {"Prep" "about"}})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg2 (gen-id)
+          arg3 (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/V2Q->NP->QS->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg2
+                                                            :type     :operation
+                                                            :name     "she_NP"
+                                                            :label    "Syntax.she_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg3
+                                                            :type     :operation
+                                                            :name     "it_NP"
+                                                            :label    "Syntax.it_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "V2Q"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg2
+                                                             :role     :arg
+                                                             :category "NP"
+                                                             :index    1}
+                                                            {:from     operation
+                                                             :to       arg3
+                                                             :role     :arg
+                                                             :category "QS"
+                                                             :index    2}]))]
+      (is (= ["To ask about her if there is it."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "VS"
+    (let [dict-item (add-ns #::dict-item{:key      "hope_VS"
+                                         :category "VS"
+                                         :language "Eng"
+                                         :forms    ["hope"]})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/VS->S->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg
+                                                            :type     :operation
+                                                            :name     "something_NP"
+                                                            :label    "Syntax.something_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "VS"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg
+                                                             :role     :arg
+                                                             :category "S"
+                                                             :index    1}]))]
+      (is (= ["To hope that there is something."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "V2S"
+    (let [dict-item (add-ns #::dict-item{:key        "answer_V2S"
+                                         :category   "V2S"
+                                         :language   "Eng"
+                                         :forms      ["answer"]
+                                         :attributes {"Prep" "about"}})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg2 (gen-id)
+          arg3 (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/V2S->NP->S->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg2
+                                                            :type     :operation
+                                                            :name     "she_NP"
+                                                            :label    "Syntax.she_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg3
+                                                            :type     :operation
+                                                            :name     "it_NP"
+                                                            :label    "Syntax.it_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "V2S"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg2
+                                                             :role     :arg
+                                                             :category "NP"
+                                                             :index    1}
+                                                            {:from     operation
+                                                             :to       arg3
+                                                             :role     :arg
+                                                             :category "S"
+                                                             :index    2}]))]
+      (is (= ["To answer about her that there is it."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "VV"
+    (let [dict-item (add-ns #::dict-item{:key      "want_VV"
+                                         :category "VV"
+                                         :language "Eng"
+                                         :forms    ["want"]})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/VV->VP->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg
+                                                            :type     :operation
+                                                            :name     "have_V2"
+                                                            :label    "Syntax.have_V2/V2"
+                                                            :category "V2"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "VV"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg
+                                                             :role     :arg
+                                                             :category "VP"
+                                                             :index    1}]))]
+      (is (= ["To want to have itself."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "V2V"
+    (let [dict-item (add-ns #::dict-item{:key        "beg_V2V"
+                                         :category   "V2V"
+                                         :language   "Eng"
+                                         :forms      ["beg"]
+                                         :attributes {"Prep" "for"
+                                                      "Post" "to"}})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg2 (gen-id)
+          arg3 (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkVP"
+                                                            :label    "Syntax.mkVP/V2V->NP->VP->VP"
+                                                            :category "VP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg2
+                                                            :type     :operation
+                                                            :name     "she_NP"
+                                                            :label    "Syntax.she_NP/NP"
+                                                            :category "NP"
+                                                            :module   "Syntax"}
+                                                           {:id       arg3
+                                                            :type     :operation
+                                                            :name     "have_V2"
+                                                            :label    "Syntax.have_V2/V2"
+                                                            :category "V2"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "V2V"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg2
+                                                             :role     :arg
+                                                             :category "NP"
+                                                             :index    1}
+                                                            {:from     operation
+                                                             :to       arg3
+                                                             :role     :arg
+                                                             :category "VP"
+                                                             :index    2}]))]
+      (is (= ["To beg for her to have herself."]
+             (map :text (generate-text semantic-graph {} "Eng"))))))
+
+  (testing "Conj"
+    (let [dict-item (add-ns #::dict-item{:key        "and_Conj"
+                                         :category   "Conj"
+                                         :language   "Eng"
+                                         :forms      ["and"]
+                                         :attributes {"Number" "singular"}})
+          dict-item-graph (resolve-dict-item dict-item)
+          document-plan (gen-id)
+          segment (gen-id)
+          operation (gen-id)
+          arg2 (gen-id)
+          arg3 (gen-id)
+          semantic-graph (-> dict-item-graph
+                             (update ::sg/concepts concat [{:id   document-plan
+                                                            :type :document-plan}
+                                                           {:id   segment
+                                                            :type :segment}
+                                                           {:id       operation
+                                                            :type     :operation
+                                                            :name     "mkAdv"
+                                                            :label    "Syntax.mkAdv/Conj->Adv->Adv->Adv"
+                                                            :category "Adv"
+                                                            :module   "Syntax"}
+                                                           {:id       arg2
+                                                            :type     :operation
+                                                            :name     "here_Adv"
+                                                            :label    "Syntax.here_Adv/Adv"
+                                                            :category "Adv"
+                                                            :module   "Syntax"}
+                                                           {:id       arg3
+                                                            :type     :operation
+                                                            :name     "there_Adv"
+                                                            :label    "Syntax.there_Adv/Adv"
+                                                            :category "Adv"
+                                                            :module   "Syntax"}])
+                             (update ::sg/relations concat [{:from  document-plan
+                                                             :to    segment
+                                                             :role  :segment
+                                                             :index 0}
+                                                            {:from  segment
+                                                             :to    operation
+                                                             :role  :instance
+                                                             :index 0}
+                                                            {:from     operation
+                                                             :to       (find-root dict-item-graph)
+                                                             :role     :arg
+                                                             :category "Conj"
+                                                             :index    0}
+                                                            {:from     operation
+                                                             :to       arg2
+                                                             :role     :arg
+                                                             :category "Adv"
+                                                             :index    1}
+                                                            {:from     operation
+                                                             :to       arg3
+                                                             :role     :arg
+                                                             :category "Adv"
+                                                             :index    2}]))]
+      (is (= ["Here and there."]
+             (map :text (generate-text semantic-graph {} "Eng")))))))
diff --git a/core/test/acc_text/nlg/graph/graph_test.clj b/core/test/acc_text/nlg/graph/graph_test.clj
index 7c18d83b5..01e63f27b 100644
--- a/core/test/acc_text/nlg/graph/graph_test.clj
+++ b/core/test/acc_text/nlg/graph/graph_test.clj
@@ -117,6 +117,6 @@
         white  (-> g (utils/find-nodes {:category "A"}) first)
         ;;fridge is not in the dict
         fridge (-> g (utils/find-nodes {:type :quote}) first)]
-    (is (= ["white"] (-> white second :forms)))
+    (is (= "white" (-> white second :label)))
     (is (= :dictionary-item (-> white second :type)))
     (is (= "fridge" (-> fridge second :value)))))
diff --git a/core/test/resources/context/amr-test.edn b/core/test/resources/context/amr-test.edn
index e79040238..a89bef959 100644
--- a/core/test/resources/context/amr-test.edn
+++ b/core/test/resources/context/amr-test.edn
@@ -1,331 +1,478 @@
-{:amr
- (#:acc-text.nlg.semantic-graph{:id "hERvMWwdMLUrgzAq",
-                                :name "amr-test",
-                                :category "Str",
-                                :relations
-                                ({:from :01,
-                                  :to :02,
-                                  :role :segment,
-                                  :index 0}
-                                 {:from :01,
-                                  :to :06,
-                                  :role :segment,
-                                  :index 1}
-                                 {:from :01,
-                                  :to :10,
-                                  :role :segment,
-                                  :index 2}
-                                 {:from :01,
-                                  :to :14,
-                                  :role :segment,
-                                  :index 3}
-                                 {:from :01,
-                                  :to :17,
-                                  :role :segment,
-                                  :index 4}
-                                 {:from :01,
-                                  :to :20,
-                                  :role :segment,
-                                  :index 5}
-                                 {:from :02,
-                                  :to :03,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :03,
-                                  :to :04,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N",
-                                  :name "item"}
-                                 {:from :04,
-                                  :to :05,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "Str"}
-                                 {:from :06,
-                                  :to :07,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :07,
-                                  :to :08,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N",
-                                  :name "item"}
-                                 {:from :08,
-                                  :to :09,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "Str"}
-                                 {:from :10,
-                                  :to :11,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :11,
-                                  :to :12,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N",
-                                  :name "item"}
-                                 {:from :12,
-                                  :to :13,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "Str"}
-                                 {:from :14,
-                                  :to :15,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :15,
-                                  :to :16,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N",
-                                  :name "item"}
-                                 {:from :17,
-                                  :to :18,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :18,
-                                  :to :19,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N",
-                                  :name "item"}
-                                 {:from :20,
-                                  :to :21,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :21,
-                                  :to :22,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N",
-                                  :name "item"}),
-                                :concepts
-                                ({:id :01, :type :document-plan}
-                                 {:id :02, :type :segment}
-                                 {:id :03,
-                                  :type :amr,
-                                  :name "zgmGHVJqlEiGlKbZ"}
-                                 {:id :04,
-                                  :type :amr,
-                                  :name "ParadigmsEng.mkN/Str->N"}
-                                 {:id :05,
-                                  :type :reference,
-                                  :name "item1"}
-                                 {:id :06, :type :segment}
-                                 {:id :07,
-                                  :type :amr,
-                                  :name "zgmGHVJqlEiGlKbZ"}
-                                 {:id :08,
-                                  :type :amr,
-                                  :name "ParadigmsEng.mkN/Str->N"}
-                                 {:id :09,
-                                  :type :reference,
-                                  :name "item2"}
-                                 {:id :10, :type :segment}
-                                 {:id :11,
-                                  :type :amr,
-                                  :name "zgmGHVJqlEiGlKbZ"}
-                                 {:id :12,
-                                  :type :amr,
-                                  :name "ParadigmsEng.mkN/Str->N"}
-                                 {:id :13,
-                                  :type :reference,
-                                  :name "item3"}
-                                 {:id :14, :type :segment}
-                                 {:id :15,
-                                  :type :amr,
-                                  :name "zgmGHVJqlEiGlKbZ"}
-                                 {:id :16,
-                                  :type :reference,
-                                  :name "item4"}
-                                 {:id :17, :type :segment}
-                                 {:id :18,
-                                  :type :amr,
-                                  :name "zgmGHVJqlEiGlKbZ"}
-                                 {:id :19,
-                                  :type :reference,
-                                  :name "item5"}
-                                 {:id :20, :type :segment}
-                                 {:id :21,
-                                  :type :amr,
-                                  :name "zgmGHVJqlEiGlKbZ"}
-                                 {:id :22,
-                                  :type :reference,
-                                  :name "item6"})}
-  #:acc-text.nlg.semantic-graph{:id "zgmGHVJqlEiGlKbZ",
-                                :name "amr-test",
-                                :category "Str",
-                                :relations
-                                ({:from :01,
-                                  :to :02,
-                                  :role :segment,
-                                  :index 0}
-                                 {:from :01,
-                                  :to :10,
-                                  :role :segment,
-                                  :index 1}
-                                 {:from :01,
-                                  :to :18,
-                                  :role :segment,
-                                  :index 2}
-                                 {:from :02,
-                                  :to :03,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :03,
-                                  :to :04,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "S"}
-                                 {:from :04,
-                                  :to :05,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "Tense",
-                                  :name "(Tense)"}
-                                 {:from :04,
-                                  :to :08,
-                                  :role :arg,
-                                  :index 3,
-                                  :category "Cl"}
-                                 {:from :08,
-                                  :to :09,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N"}
-                                 {:from :10,
-                                  :to :11,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :11,
-                                  :to :12,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "S"}
-                                 {:from :12,
-                                  :to :13,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "Tense",
-                                  :name "(Tense)"}
-                                 {:from :12,
-                                  :to :16,
-                                  :role :arg,
-                                  :index 3,
-                                  :category "Cl"}
-                                 {:from :16,
-                                  :to :17,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N"}
-                                 {:from :18,
-                                  :to :19,
-                                  :role :instance,
-                                  :index 0}
-                                 {:from :19,
-                                  :to :20,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "S"}
-                                 {:from :20,
-                                  :to :21,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "Tense",
-                                  :name "(Tense)"}
-                                 {:from :20,
-                                  :to :24,
-                                  :role :arg,
-                                  :index 3,
-                                  :category "Cl"}
-                                 {:from :24,
-                                  :to :25,
-                                  :role :arg,
-                                  :index 0,
-                                  :category "N"}),
-                                :concepts
-                                ({:id :01, :type :document-plan}
-                                 {:id :02, :type :segment}
-                                 {:id :03,
-                                  :type :amr,
-                                  :name "Syntax.mkText/S->Text"}
-                                 {:id :04,
-                                  :type :amr,
-                                  :name
-                                  "Syntax.mkS/(Tense)->(Ant)->(Pol)->Cl->S"}
-                                 {:id :05,
-                                  :type :amr,
-                                  :name "Syntax.futureTense/Tense"}
-                                 {:id :08,
-                                  :type :amr,
-                                  :name "Syntax.mkCl/N->Cl"}
-                                 {:id :09,
-                                  :type :reference,
-                                  :name "item"}
-                                 {:id :10, :type :segment}
-                                 {:id :11,
-                                  :type :amr,
-                                  :name "Syntax.mkText/S->Text"}
-                                 {:id :12,
-                                  :type :amr,
-                                  :name
-                                  "Syntax.mkS/(Tense)->(Ant)->(Pol)->Cl->S"}
-                                 {:id :13,
-                                  :type :amr,
-                                  :name "Syntax.pastTense/Tense"}
-                                 {:id :16,
-                                  :type :amr,
-                                  :name "Syntax.mkCl/N->Cl"}
-                                 {:id :17,
-                                  :type :reference,
-                                  :name "item"}
-                                 {:id :18, :type :segment}
-                                 {:id :19,
-                                  :type :amr,
-                                  :name "Syntax.mkText/S->Text"}
-                                 {:id :20,
-                                  :type :amr,
-                                  :name
-                                  "Syntax.mkS/(Tense)->(Ant)->(Pol)->Cl->S"}
-                                 {:id :21,
-                                  :type :amr,
-                                  :name "Syntax.presentTense/Tense"}
-                                 {:id :24,
-                                  :type :amr,
-                                  :name "Syntax.mkCl/N->Cl"}
-                                 {:id :25,
-                                  :type :reference,
-                                  :name "item"})}),
- :data {"product" "product", "fridge" "fridge"},
- :dictionary
- [#:acc-text.nlg.dictionary.item{:id
-                                 "ae1a289c-9f4a-471b-ae36-36c4089cc865",
-                                 :key "noise",
-                                 :category "N",
-                                 :language "Eng",
-                                 :forms [#:acc-text.nlg.dictionary.item.form{:value "noise"}
-                                         #:acc-text.nlg.dictionary.item.form{:value "noises"}]}
-  #:acc-text.nlg.dictionary.item{:id
-                                 "dcc836af-a876-423d-aa60-1caf1b403b6f",
-                                 :key "fridge",
-                                 :category "N",
-                                 :language "Eng",
-                                 :forms [#:acc-text.nlg.dictionary.item.form{:value "fridge"}
-                                         #:acc-text.nlg.dictionary.item.form{:value "fridges"}]}
-  #:acc-text.nlg.dictionary.item{:id
-                                 "41d0ddcd-9b82-4181-b3c2-63b93f5276dc",
-                                 :key "bill",
-                                 :category "N",
-                                 :language "Eng",
-                                 :forms [#:acc-text.nlg.dictionary.item.form{:value "bill"}
-                                         #:acc-text.nlg.dictionary.item.form{:value "bills"}]}
-  #:acc-text.nlg.dictionary.item{:id
-                                 "062ae949-c661-479a-ab77-a3e4b3242a03",
-                                 :key "product",
-                                 :category "N",
-                                 :language "Eng",
-                                 :forms [#:acc-text.nlg.dictionary.item.form{:value "product"}
-                                         #:acc-text.nlg.dictionary.item.form{:value "products"}]}]}
+{:amr        [#:acc-text.nlg.semantic-graph{:id          "oekHacwDHvSqGeDe"
+                                            :uid         "60dfe566-6f31-4784-92c2-1c05aa459f1a"
+                                            :name        "test-amr"
+                                            :kind        "AMR"
+                                            :category    "Str"
+                                            :description ""
+                                            :relations   ({:from  "E.Cz7r//uGRq=~0?jr__"
+                                                           :to    "Cn^#1B/Of%)mWqbjQ?MR"
+                                                           :role  :frame
+                                                           :index 0}
+                                                          {:from  "E.Cz7r//uGRq=~0?jr__"
+                                                           :to    "SL^=s|KW6c{S%-7BD16Y"
+                                                           :role  :frame
+                                                           :index 1}
+                                                          {:from  "E.Cz7r//uGRq=~0?jr__"
+                                                           :to    "n#5O1~QQeE=xV`?o:(T*"
+                                                           :role  :frame
+                                                           :index 2}
+                                                          {:from  "E.Cz7r//uGRq=~0?jr__"
+                                                           :to    "bzIV(}(2hO-EIX26Z4P["
+                                                           :role  :frame
+                                                           :index 3}
+                                                          {:from  "E.Cz7r//uGRq=~0?jr__"
+                                                           :to    "!Bg{)Tk8C#1:NBI+Sc9S"
+                                                           :role  :frame
+                                                           :index 4}
+                                                          {:from  "E.Cz7r//uGRq=~0?jr__"
+                                                           :to    "ofPHl?T~B)0Dmnd[7+c"
+                                                           :role  :frame
+                                                           :index 5}
+                                                          {:from     "Cn^#1B/Of%)mWqbjQ?MR"
+                                                           :to       "V@#2oHjr~V[aq.{1m74^"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Str"}
+                                                          {:from     "V@#2oHjr~V[aq.{1m74^"
+                                                           :to       "2PKj5Vq4ShFi!jxD7qyi"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "item"}
+                                                          {:from     "2PKj5Vq4ShFi!jxD7qyi"
+                                                           :to       "bcOge)8;%kBSapre}}kx"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "Str"
+                                                           :name     "Str"}
+                                                          {:from     "SL^=s|KW6c{S%-7BD16Y"
+                                                           :to       "TlCQ3fA]!ZM5PjZWpX*#"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Str"}
+                                                          {:from     "TlCQ3fA]!ZM5PjZWpX*#"
+                                                           :to       "(!T4eN@V/VIf26L6EFya"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "item"}
+                                                          {:from     "(!T4eN@V/VIf26L6EFya"
+                                                           :to       "|AfNOY(6:me`O1=Vb)J"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "Str"
+                                                           :name     "Str"}
+                                                          {:from     "n#5O1~QQeE=xV`?o:(T*"
+                                                           :to       "#/W]L-@]5gb67u.8)i?G"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Str"}
+                                                          {:from     "#/W]L-@]5gb67u.8)i?G"
+                                                           :to       ":~-!5.kW6D/VdB5.MhFO"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "item"}
+                                                          {:from     ":~-!5.kW6D/VdB5.MhFO"
+                                                           :to       "*)R-~o};AemRq$t7F@mr"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "Str"
+                                                           :name     "Str"}
+                                                          {:from     "bzIV(}(2hO-EIX26Z4P["
+                                                           :to       "hmh$9d;2#]h4Y:?KAy8Q"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Str"}
+                                                          {:from     "hmh$9d;2#]h4Y:?KAy8Q"
+                                                           :to       "P^?F|3!?O{=W`N?_Le|s"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "item"}
+                                                          {:from     "!Bg{)Tk8C#1:NBI+Sc9S"
+                                                           :to       "$C*vL)E$0EXtaI8ZxIOW"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Str"}
+                                                          {:from     "$C*vL)E$0EXtaI8ZxIOW"
+                                                           :to       "e)1}=8x{]]XZ0^i5.;eP"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "item"}
+                                                          {:from     "ofPHl?T~B)0Dmnd[7+c"
+                                                           :to       "2MiwWg2qiCA-Yt#Uezx|"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Str"}
+                                                          {:from     "2MiwWg2qiCA-Yt#Uezx|"
+                                                           :to       "Szn99q!DgFmxPNJbwP}!"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "item"})
+                                            :concepts    ({:id "E.Cz7r//uGRq=~0?jr__" :position 1 :type :document-plan}
+                                                          {:id "Cn^#1B/Of%)mWqbjQ?MR" :position 2 :type :frame :category "Str"}
+                                                          {:id       "V@#2oHjr~V[aq.{1m74^"
+                                                           :position 3
+                                                           :type     :amr
+                                                           :label    "test-amr"
+                                                           :name     "KsLmxlvwVnIWzuDt"
+                                                           :category "Str"}
+                                                          {:id       "2PKj5Vq4ShFi!jxD7qyi"
+                                                           :position 4
+                                                           :type     :operation
+                                                           :name     "mkN"
+                                                           :label    "ParadigmsEng.mkN/Str->N"
+                                                           :category "N"
+                                                           :module   "ParadigmsEng"}
+                                                          {:id       "bcOge)8;%kBSapre}}kx"
+                                                           :position 5
+                                                           :type     :reference
+                                                           :name     "item1"
+                                                           :label    "!WWAX2MM*.|o*@F5O*S%"
+                                                           :category "Str"}
+                                                          {:id "SL^=s|KW6c{S%-7BD16Y" :position 6 :type :frame :category "Str"}
+                                                          {:id       "TlCQ3fA]!ZM5PjZWpX*#"
+                                                           :position 7
+                                                           :type     :amr
+                                                           :label    "test-amr"
+                                                           :name     "KsLmxlvwVnIWzuDt"
+                                                           :category "Str"}
+                                                          {:id       "(!T4eN@V/VIf26L6EFya"
+                                                           :position 8
+                                                           :type     :operation
+                                                           :name     "mkN"
+                                                           :label    "ParadigmsEng.mkN/Str->N"
+                                                           :category "N"
+                                                           :module   "ParadigmsEng"}
+                                                          {:id       "|AfNOY(6:me`O1=Vb)J"
+                                                           :position 9
+                                                           :type     :reference
+                                                           :name     "item2"
+                                                           :label    "@AX6f7Yip4AISvW:SYLX"
+                                                           :category "Str"}
+                                                          {:id       "n#5O1~QQeE=xV`?o:(T*"
+                                                           :position 10
+                                                           :type     :frame
+                                                           :category "Str"}
+                                                          {:id       "#/W]L-@]5gb67u.8)i?G"
+                                                           :position 11
+                                                           :type     :amr
+                                                           :label    "test-amr"
+                                                           :name     "KsLmxlvwVnIWzuDt"
+                                                           :category "Str"}
+                                                          {:id       ":~-!5.kW6D/VdB5.MhFO"
+                                                           :position 12
+                                                           :type     :operation
+                                                           :name     "mkN"
+                                                           :label    "ParadigmsEng.mkN/Str->N"
+                                                           :category "N"
+                                                           :module   "ParadigmsEng"}
+                                                          {:id       "*)R-~o};AemRq$t7F@mr"
+                                                           :position 13
+                                                           :type     :reference
+                                                           :name     "item3"
+                                                           :label    "Uk;2S.jZ!ap`EyeztuL"
+                                                           :category "Str"}
+                                                          {:id       "bzIV(}(2hO-EIX26Z4P["
+                                                           :position 14
+                                                           :type     :frame
+                                                           :category "Str"}
+                                                          {:id       "hmh$9d;2#]h4Y:?KAy8Q"
+                                                           :position 15
+                                                           :type     :amr
+                                                           :label    "test-amr"
+                                                           :name     "KsLmxlvwVnIWzuDt"
+                                                           :category "Str"}
+                                                          {:id       "P^?F|3!?O{=W`N?_Le|s"
+                                                           :position 16
+                                                           :type     :reference
+                                                           :name     "item4"
+                                                           :label    "(#mn^Y7lkb(!5x++fi4"
+                                                           :category "N"}
+                                                          {:id       "!Bg{)Tk8C#1:NBI+Sc9S"
+                                                           :position 17
+                                                           :type     :frame
+                                                           :category "Str"}
+                                                          {:id       "$C*vL)E$0EXtaI8ZxIOW"
+                                                           :position 18
+                                                           :type     :amr
+                                                           :label    "test-amr"
+                                                           :name     "KsLmxlvwVnIWzuDt"
+                                                           :category "Str"}
+                                                          {:id       "e)1}=8x{]]XZ0^i5.;eP"
+                                                           :position 19
+                                                           :type     :reference
+                                                           :name     "item5"
+                                                           :label    "(w.f^GDgICn!`T;z~F=T"
+                                                           :category "N"}
+                                                          {:id       "ofPHl?T~B)0Dmnd[7+c"
+                                                           :position 20
+                                                           :type     :frame
+                                                           :category "Str"}
+                                                          {:id       "2MiwWg2qiCA-Yt#Uezx|"
+                                                           :position 21
+                                                           :type     :amr
+                                                           :label    "test-amr"
+                                                           :name     "KsLmxlvwVnIWzuDt"
+                                                           :category "Str"}
+                                                          {:id       "Szn99q!DgFmxPNJbwP}!"
+                                                           :position 22
+                                                           :type     :reference
+                                                           :name     "item6"
+                                                           :label    "XEz~vmS2P%YwKhK:f:Z%"
+                                                           :category "N"})}
+              #:acc-text.nlg.semantic-graph{:id          "KsLmxlvwVnIWzuDt"
+                                            :uid         "933c88bb-4d2f-43a2-a5fc-214179188760"
+                                            :name        "test-amr"
+                                            :kind        "RGL"
+                                            :category    "Str"
+                                            :description ""
+                                            :relations   ({:from  "Nh+=SQM6MEtDd1ne|3`:"
+                                                           :to    "{ffaz:/$16$0.S3v].w"
+                                                           :role  :frame
+                                                           :index 0}
+                                                          {:from  "Nh+=SQM6MEtDd1ne|3`:"
+                                                           :to    "]Z]#).?VPwHjWmI(HuX1"
+                                                           :role  :frame
+                                                           :index 1}
+                                                          {:from  "Nh+=SQM6MEtDd1ne|3`:"
+                                                           :to    "d]$~V4qkmbd4c)Utr.?"
+                                                           :role  :frame
+                                                           :index 2}
+                                                          {:from     "{ffaz:/$16$0.S3v].w"
+                                                           :to       "7:(h.Sl~To?a+r8[aCC"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Text"}
+                                                          {:from     "7:(h.Sl~To?a+r8[aCC"
+                                                           :to       "4O:;$+dz#dMr_!|qq7O"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "S"
+                                                           :name     "S"}
+                                                          {:from     "4O:;$+dz#dMr_!|qq7O"
+                                                           :to       ";qb?|R5@`TpUGu@*1:v$"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "Tense"
+                                                           :name     "(Tense)"}
+                                                          {:from     "4O:;$+dz#dMr_!|qq7O"
+                                                           :to       "bm6fQZ9).E+)gt|AF)MB"
+                                                           :role     :arg
+                                                           :index    3
+                                                           :category "Cl"
+                                                           :name     "Cl"}
+                                                          {:from     "bm6fQZ9).E+)gt|AF)MB"
+                                                           :to       "@?KlIqd)k]FH4EIdH-O}"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "N"}
+                                                          {:from     "]Z]#).?VPwHjWmI(HuX1"
+                                                           :to       "RH4k/iL:0*3yy[TiPMQ?"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Text"}
+                                                          {:from     "RH4k/iL:0*3yy[TiPMQ?"
+                                                           :to       "6=9Q.NI[?CNWz_3$JKw*"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "S"
+                                                           :name     "S"}
+                                                          {:from     "6=9Q.NI[?CNWz_3$JKw*"
+                                                           :to       "s{n|!ayvc~y[G8.-%:7k"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "Tense"
+                                                           :name     "(Tense)"}
+                                                          {:from     "6=9Q.NI[?CNWz_3$JKw*"
+                                                           :to       "kwmh9?`n0tZ(dColy7X-"
+                                                           :role     :arg
+                                                           :index    3
+                                                           :category "Cl"
+                                                           :name     "Cl"}
+                                                          {:from     "kwmh9?`n0tZ(dColy7X-"
+                                                           :to       "TT}^6p6px|.sZ@#i7lLk"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "N"}
+                                                          {:from     "d]$~V4qkmbd4c)Utr.?"
+                                                           :to       "Rb$IwK`0AvY{1}ZJ_qTr"
+                                                           :role     :instance
+                                                           :index    0
+                                                           :category "Text"}
+                                                          {:from     "Rb$IwK`0AvY{1}ZJ_qTr"
+                                                           :to       "1K_4O4^f2=*k({_?`JP9"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "S"
+                                                           :name     "S"}
+                                                          {:from     "1K_4O4^f2=*k({_?`JP9"
+                                                           :to       "nc(~8i#+}1@g+#jxO99H"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "Tense"
+                                                           :name     "(Tense)"}
+                                                          {:from     "1K_4O4^f2=*k({_?`JP9"
+                                                           :to       "]N_qVJvA%DeAfAR_!{ou"
+                                                           :role     :arg
+                                                           :index    3
+                                                           :category "Cl"
+                                                           :name     "Cl"}
+                                                          {:from     "]N_qVJvA%DeAfAR_!{ou"
+                                                           :to       "dKYdOD3wkQFLIm~n#:qH"
+                                                           :role     :arg
+                                                           :index    0
+                                                           :category "N"
+                                                           :name     "N"})
+                                            :concepts    ({:id "Nh+=SQM6MEtDd1ne|3`:" :position 1 :type :document-plan}
+                                                          {:id       "{ffaz:/$16$0.S3v].w"
+                                                           :position 2
+                                                           :type     :frame
+                                                           :category "Text"}
+                                                          {:id       "7:(h.Sl~To?a+r8[aCC"
+                                                           :position 3
+                                                           :type     :operation
+                                                           :name     "mkText"
+                                                           :label    "Syntax.mkText/S->Text"
+                                                           :category "Text"
+                                                           :module   "Syntax"}
+                                                          {:id       "4O:;$+dz#dMr_!|qq7O"
+                                                           :position 4
+                                                           :type     :operation
+                                                           :name     "mkS"
+                                                           :label    "Syntax.mkS/(Tense)->(Ant)->(Pol)->Cl->S"
+                                                           :category "S"
+                                                           :module   "Syntax"}
+                                                          {:id       ";qb?|R5@`TpUGu@*1:v$"
+                                                           :position 5
+                                                           :type     :operation
+                                                           :name     "futureTense"
+                                                           :label    "Syntax.futureTense/Tense"
+                                                           :category "Tense"
+                                                           :module   "Syntax"}
+                                                          {:id       "bm6fQZ9).E+)gt|AF)MB"
+                                                           :position 8
+                                                           :type     :operation
+                                                           :name     "mkCl"
+                                                           :label    "Syntax.mkCl/N->Cl"
+                                                           :category "Cl"
+                                                           :module   "Syntax"}
+                                                          {:id       "@?KlIqd)k]FH4EIdH-O}"
+                                                           :position 9
+                                                           :type     :reference
+                                                           :name     "item"
+                                                           :label    "{xBBu29jV6SY/Tq5#Eu"
+                                                           :category "N"}
+                                                          {:id       "]Z]#).?VPwHjWmI(HuX1"
+                                                           :position 10
+                                                           :type     :frame
+                                                           :category "Text"}
+                                                          {:id       "RH4k/iL:0*3yy[TiPMQ?"
+                                                           :position 11
+                                                           :type     :operation
+                                                           :name     "mkText"
+                                                           :label    "Syntax.mkText/S->Text"
+                                                           :category "Text"
+                                                           :module   "Syntax"}
+                                                          {:id       "6=9Q.NI[?CNWz_3$JKw*"
+                                                           :position 12
+                                                           :type     :operation
+                                                           :name     "mkS"
+                                                           :label    "Syntax.mkS/(Tense)->(Ant)->(Pol)->Cl->S"
+                                                           :category "S"
+                                                           :module   "Syntax"}
+                                                          {:id       "s{n|!ayvc~y[G8.-%:7k"
+                                                           :position 13
+                                                           :type     :operation
+                                                           :name     "pastTense"
+                                                           :label    "Syntax.pastTense/Tense"
+                                                           :category "Tense"
+                                                           :module   "Syntax"}
+                                                          {:id       "kwmh9?`n0tZ(dColy7X-"
+                                                           :position 16
+                                                           :type     :operation
+                                                           :name     "mkCl"
+                                                           :label    "Syntax.mkCl/N->Cl"
+                                                           :category "Cl"
+                                                           :module   "Syntax"}
+                                                          {:id       "TT}^6p6px|.sZ@#i7lLk"
+                                                           :position 17
+                                                           :type     :reference
+                                                           :name     "item"
+                                                           :label    "{xBBu29jV6SY/Tq5#Eu"
+                                                           :category "N"}
+                                                          {:id       "d]$~V4qkmbd4c)Utr.?"
+                                                           :position 18
+                                                           :type     :frame
+                                                           :category "Text"}
+                                                          {:id       "Rb$IwK`0AvY{1}ZJ_qTr"
+                                                           :position 19
+                                                           :type     :operation
+                                                           :name     "mkText"
+                                                           :label    "Syntax.mkText/S->Text"
+                                                           :category "Text"
+                                                           :module   "Syntax"}
+                                                          {:id       "1K_4O4^f2=*k({_?`JP9"
+                                                           :position 20
+                                                           :type     :operation
+                                                           :name     "mkS"
+                                                           :label    "Syntax.mkS/(Tense)->(Ant)->(Pol)->Cl->S"
+                                                           :category "S"
+                                                           :module   "Syntax"}
+                                                          {:id       "nc(~8i#+}1@g+#jxO99H"
+                                                           :position 21
+                                                           :type     :operation
+                                                           :name     "presentTense"
+                                                           :label    "Syntax.presentTense/Tense"
+                                                           :category "Tense"
+                                                           :module   "Syntax"}
+                                                          {:id       "]N_qVJvA%DeAfAR_!{ou"
+                                                           :position 24
+                                                           :type     :operation
+                                                           :name     "mkCl"
+                                                           :label    "Syntax.mkCl/N->Cl"
+                                                           :category "Cl"
+                                                           :module   "Syntax"}
+                                                          {:id       "dKYdOD3wkQFLIm~n#:qH"
+                                                           :position 25
+                                                           :type     :reference
+                                                           :name     "item"
+                                                           :label    "{xBBu29jV6SY/Tq5#Eu"
+                                                           :category "N"})}]
+ :data       {"product" "product" "fridge" "fridge"}
+ :readers    #{}
+ :dictionary [#:acc-text.nlg.dictionary.item{:id       "product_N_Eng"
+                                             :key      "product"
+                                             :category "N"
+                                             :language "Eng"
+                                             :forms    [#:acc-text.nlg.dictionary.item.form{:id       "abf4cde1-7aa5-424d-b284-80ed867b685c"
+                                                                                            :value    "product"
+                                                                                            :default? true}
+                                                        #:acc-text.nlg.dictionary.item.form{:id       "b97d7f7d-1ef7-4698-9942-905bff024ea0"
+                                                                                            :value    "products"
+                                                                                            :default? true}]}
+              #:acc-text.nlg.dictionary.item{:id       "noise_N_Eng"
+                                             :key      "noise"
+                                             :category "N"
+                                             :language "Eng"
+                                             :forms    [#:acc-text.nlg.dictionary.item.form{:id       "8bf50c07-4fa8-40dc-89b5-db9b186924d4"
+                                                                                            :value    "noise"
+                                                                                            :default? true}
+                                                        #:acc-text.nlg.dictionary.item.form{:id       "f02103a9-d646-4108-8781-cbe53ac057a3"
+                                                                                            :value    "noises"
+                                                                                            :default? true}]}
+              #:acc-text.nlg.dictionary.item{:id       "fridge_N_Eng"
+                                             :key      "fridge"
+                                             :category "N"
+                                             :language "Eng"
+                                             :forms    [#:acc-text.nlg.dictionary.item.form{:id       "d5faf79e-3b8d-492d-bbfa-a063e4068853"
+                                                                                            :value    "fridge"
+                                                                                            :default? true}
+                                                        #:acc-text.nlg.dictionary.item.form{:id       "83ef7b95-420f-441c-a299-4c60cf19ca86"
+                                                                                            :value    "fridges"
+                                                                                            :default? true}]}]}
diff --git a/core/test/resources/semantic-graphs/amr-test.edn b/core/test/resources/semantic-graphs/amr-test.edn
index 410b3f1a4..87981e4b0 100644
--- a/core/test/resources/semantic-graphs/amr-test.edn
+++ b/core/test/resources/semantic-graphs/amr-test.edn
@@ -1,25 +1,89 @@
-#:acc-text.nlg.semantic-graph{:relations ({:from :01 :to :02 :role :segment :index 0}
-                                          {:from :02 :to :03 :role :instance :index 0}
-                                          {:from :03 :to :04 :role :arg :index 0 :category "Str" :name "item1"}
-                                          {:from :03 :to :05 :role :arg :index 1 :category "Str" :name "item2"}
-                                          {:from :03 :to :06 :role :arg :index 2 :category "Str" :name "item3"}
-                                          {:from :03 :to :07 :role :arg :index 3 :category "N" :name "item4"}
-                                          {:from :03 :to :08 :role :arg :index 4 :category "N" :name "item5"}
-                                          {:from :03 :to :09 :role :arg :index 5 :category "N" :name "item6"})
-                              :concepts  ({:id :01 :type :document-plan}
-                                          {:id :02 :type :segment}
-                                          {:id :03 :type :amr :name "hERvMWwdMLUrgzAq"}
-                                          {:id    :04
-                                           :type  :dictionary-item
-                                           :name  "41d0ddcd-9b82-4181-b3c2-63b93f5276dc"
-                                           :label "bill"
-                                           :category "N"}
-                                          {:id :05 :type :quote :value "door"}
-                                          {:id :06 :type :data :name "product"}
-                                          {:id    :07
-                                           :type  :dictionary-item
-                                           :name  "ae1a289c-9f4a-471b-ae36-36c4089cc865"
-                                           :label "noise"
-                                           :category "N"}
-                                          {:id :08 :type :quote :value "interior"}
-                                          {:id :09 :type :data :name "fridge"})}
\ No newline at end of file
+#:acc-text.nlg.semantic-graph{:id          "PYcOTyZKuefDNQeT"
+                              :uid         "21ba062c-b50f-47d3-908e-812687762ffd"
+                              :name        "test-amr"
+                              :kind        "Document"
+                              :category    "Str"
+                              :description ""
+                              :relations   ({:from  "3(=+`_V3%UyMxP3-:CjP"
+                                             :to    "!VDZbrjX{gDT1LgqD7qm"
+                                             :role  :segment
+                                             :index 0}
+                                            {:from  "!VDZbrjX{gDT1LgqD7qm"
+                                             :to    "lm60?h@F)0n+OqgAT@Ej"
+                                             :role  :instance
+                                             :index 0}
+                                            {:from     "lm60?h@F)0n+OqgAT@Ej"
+                                             :to       "qE@bA6abG8ui8TyE!U$v"
+                                             :role     :arg
+                                             :index    0
+                                             :category "Str"
+                                             :name     "item1"}
+                                            {:from     "lm60?h@F)0n+OqgAT@Ej"
+                                             :to       "1Z`fA`2UY9WSy)80-pWH"
+                                             :role     :arg
+                                             :index    1
+                                             :category "Str"
+                                             :name     "item2"}
+                                            {:from     "lm60?h@F)0n+OqgAT@Ej"
+                                             :to       "[mw:[9Z#)$8v6$M@4uTl"
+                                             :role     :arg
+                                             :index    2
+                                             :category "Str"
+                                             :name     "item3"}
+                                            {:from     "lm60?h@F)0n+OqgAT@Ej"
+                                             :to       "3Moqn(#A!SP3:P(ReHqW"
+                                             :role     :arg
+                                             :index    3
+                                             :category "N"
+                                             :name     "item4"}
+                                            {:from     "lm60?h@F)0n+OqgAT@Ej"
+                                             :to       "G_XgP*[pmI39v@I|=2|n"
+                                             :role     :arg
+                                             :index    4
+                                             :category "N"
+                                             :name     "item5"}
+                                            {:from     "lm60?h@F)0n+OqgAT@Ej"
+                                             :to       "K+SK7m3TmL5/(Zrkp(V"
+                                             :role     :arg
+                                             :index    5
+                                             :category "N"
+                                             :name     "item6"})
+                              :concepts    ({:id "3(=+`_V3%UyMxP3-:CjP" :position 1 :type :document-plan}
+                                            {:id "!VDZbrjX{gDT1LgqD7qm" :position 2 :type :segment}
+                                            {:id       "lm60?h@F)0n+OqgAT@Ej"
+                                             :position 3
+                                             :type     :amr
+                                             :label    "test-amr"
+                                             :name     "oekHacwDHvSqGeDe"
+                                             :category "Str"}
+                                            {:id       "qE@bA6abG8ui8TyE!U$v"
+                                             :position 4
+                                             :type     :quote
+                                             :value    "bill"
+                                             :category "Str"}
+                                            {:id       "1Z`fA`2UY9WSy)80-pWH"
+                                             :position 5
+                                             :type     :quote
+                                             :value    "door"
+                                             :category "Str"}
+                                            {:id       "[mw:[9Z#)$8v6$M@4uTl"
+                                             :position 6
+                                             :type     :data
+                                             :name     "product"
+                                             :category "Str"}
+                                            {:id       "3Moqn(#A!SP3:P(ReHqW"
+                                             :position 7
+                                             :type     :dictionary-item
+                                             :name     "noise_N_Eng"
+                                             :label    "noise"
+                                             :category "N"}
+                                            {:id       "G_XgP*[pmI39v@I|=2|n"
+                                             :position 8
+                                             :type     :quote
+                                             :value    "interior"
+                                             :category "Str"}
+                                            {:id       "K+SK7m3TmL5/(Zrkp(V"
+                                             :position 9
+                                             :type     :data
+                                             :name     "fridge"
+                                             :category "Str"})}
diff --git a/core/test/resources/syntax/SimpleBody.gf b/core/test/resources/syntax/SimpleBody.gf
index 03585d3a2..6a3dc9da9 100644
--- a/core/test/resources/syntax/SimpleBody.gf
+++ b/core/test/resources/syntax/SimpleBody.gf
@@ -1,4 +1,4 @@
-incomplete concrete SimpleBody of Simple = open Syntax, Grammar, SimpleLex, ParadigmsEng in {
+incomplete concrete SimpleBody of Simple = open Syntax, Grammar, SimpleLex, MorphoEng, ResEng, ParadigmsEng in {
     lincat
         DocumentPlan01, Segment02, Frame03, Frame04 = Str ;
         Operation11 = N ;