 
 (defn over [grammar left right]
   "opportunity for additional logging before calling the real (over)"
+  (log/debug (str "parse/over: grammar: " (count grammar) " left: " (type left) "; right: " (type right)))
   (over/over grammar left right))
 
 (defn create-ngram-map [args left ngrams grammar split-at x]

     (create-unigram-map args (+ 1 index)))))

(defn create-bigram-map [args index grammar]
  (if (< (+ 1 index) (count args))
    (let [left-side (subvec args index (+ 1 index))
          right-side (subvec args (+ 1 index) (+ 2 index))]
      (merge
       {[index (+ 2 index)]
        (over/over grammar left-side right-side)}
       (create-bigram-map args (+ index 1) grammar)))
    (create-unigram-map args 0)))


(defn parse [arg lexicon lookup grammar]
  "return a list of all possible parse trees for a string or a list of lists of maps (a result of looking up in a dictionary a list of tokens from the input string)"
  (cond (string? arg)
        (let [tokens (toks arg lexicon lookup)]
          (log/debug (str "tokens: " (count tokens)))
          (parse tokens lexicon lookup grammar))

        (and (vector? arg)
             (empty? (rest arg)))
