!752 static S wordToRemove = "the"; p { S input = "[this is [the] sentence] [we are talking about [all [the time]]]"; Lisp in = nlParse(input); print(input); print("s/" + wordToRemove + "//"); print(nlUnparse(removeWord(wordToRemove, in))); } static Lisp removeWord(S word, Lisp in) { if (in.isLeaf() && eqic(in.head, word)) ret lisp("[]"); Lisp lisp = new Lisp(in.head); for (int i = 0; i < in.size(); i++) { Lisp translated = removeWord(word, in.get(i)); if (!translated.is("[]", 0)) lisp.add(translated); } ret lisp; }