/** * Returns a lexicalized Tree whose Labels are CategoryWordTag instances, all corresponds to the * input tree. */ public static Tree lexicalize(Tree t, HeadFinder hf) { Function<Tree, Tree> a = TreeFunctions.getLabeledTreeToCategoryWordTagTreeFunction(); Tree t1 = a.apply(t); t1.percolateHeads(hf); return t1; }