public static void downcaseWords(HeadTreeNode tree) { if (tree.isPreterminal()) { if (tree.headWord().tag() != traceTag) { Word headWord = tree.headWord(); headWord.setOriginalWord(headWord.word()); headWord.setWord(Symbol.add(headWord.word().toString().toLowerCase()));
public static void downcaseWords(Sexp tree) { Treebank treebank = Language.treebank(); if (treebank.isPreterminal(tree)) return; if (tree.isList()) { SexpList treeList = tree.list(); int treeListLen = treeList.length(); for (int i = 1; i < treeListLen; i++) { Sexp currChild = treeList.get(i); if (treebank.isPreterminal(currChild)) { Word word = treebank.makeWord(currChild); word.setWord(Symbol.add(word.word().toString().toLowerCase())); treeList.set(i, treebank.constructPreterminal(word)); } else { downcaseWords(currChild); }
  public static void downcaseWords(HeadTreeNode tree) {    if (tree.isPreterminal()) {      if (tree.headWord().tag() != traceTag) {	Word headWord = tree.headWord();	headWord.setOriginalWord(headWord.word());	headWord.setWord(Symbol.add(headWord.word().toString().toLowerCase()));      }    }    else {      downcaseWords(tree.headChild());      for (Iterator mods = tree.preMods().iterator(); mods.hasNext(); )	downcaseWords((HeadTreeNode)mods.next());      for (Iterator mods = tree.postMods().iterator(); mods.hasNext(); )	downcaseWords((HeadTreeNode)mods.next());    }  }