Extract rules and their frequences from treebank