code: private static void doTransform(Tree t) {
  
      if (t.value().startsWith("QP")) {
        //look at the children
        List<Tree> children = t.getChildrenAsList();
        if (children.size() >= 3 && children.get(0).isPreTerminal()) {
          //go through the children and check if they match the structure we want
          String child1 = children.get(0).value();
          String child2 = children.get(1).value();
          String child3 = children.get(2).value();
          if((child3.startsWith("CD") || child3.startsWith("DT")) &&
             (child1.startsWith("RB") || child1.startsWith("JJ") || child1.startsWith("IN")) &&
             (child2.startsWith("IN") || child2.startsWith("JJ"))) {
            transformQP(t);
          }
        }
      /* --- to be written or deleted
      } else if (t.value().startsWith("NP")) {
        //look at the children
        List<Tree> children = t.getChildrenAsList();
        if (children.size() >= 3) {
  
        }
      ---- */
      } else if (t.isPhrasal()) {
        for (Tree child : t.getChildrenAsList()) {
          doTransform(child);
        }
      }
    }
docs: /*
  Given a tree t, if this tree contains a QP of the form
  QP (RB IN CD|DT ...)   well over, more than
  QP (JJR IN CD|DT ...)  fewer than
  QP (IN JJS CD|DT ...)  at least
  
  it will transform it