 
 (defn parse
   "return a list of all possible parse trees for a string or a sequence of tokens.
-   If the input is a string, then use a language-independent tokenizer to turn the string into a sequence of tokens.
-   In the latter case, the tokens are assumed to be produced by splitting a string in 
-   some language-dependent way."
-  ([input model & [parse-with-truncate original-input]]
+   If the input is a string, then use a language-independent tokenizer
+  to turn the string into a sequence of tokens.  In the latter case,
+  the tokens are assumed to be produced by splitting a string in some
+  language-dependent way. If parse-with-truncate is false, then at
+  each step of parsing the input, the entire tree will be preserved
+  rather than just the immediate parents of the root node. Preserving
+  the entire tree costs about 20% time than truncating it."
+  ([input model & {:keys [parse-with-truncate original-input]}]
    (let [parse-with-truncate
          (cond (= parse-with-truncate false)
                false

  "return a human-readable string of a phrase structure tree. leaves of the tree are printed
   by calling the supplied _fo_ function"
  (let [head-first? (get-in tree [:first] :none)
        pred (get-in tree [:synsem :sem :pred])
        cat (str (get-in tree [:synsem :cat]) "")]
    (if (= true (get-in tree [:phrasal]))
      (do (log/debug (str "fo-ps: rule at top of tree: " (get-in tree [:rule])))

      (and (= :none (get-in tree [:head] :none))
           (= :none (get-in tree [:comp] :none))
           (not (= :none (get-in tree [:rule] :none))))
      (str "[" (get-in tree [:rule])
           " '" (fo tree) "']")

      (= head-first? :none)
      (str " '" (fo tree) "'")

      (= head-first? :comp)
      (str "[" (get-in tree [:rule]) " "
