diff --git a/src/show_tree.py b/src/show_tree.py index f17d5d7..5967f33 100644 --- a/src/show_tree.py +++ b/src/show_tree.py @@ -8,7 +8,7 @@ for pre, fill, node in RenderTree(tree): treestr = u"%s%s" % (pre, node.id) print(treestr.ljust(0)) -print('\ntype: ', type(tree)) +print('\ntype: ', type(tree)) print('path: ', tree.path) print('children: ', tree.children) print('descendants[0]: ', tree.descendants[0]) @@ -26,7 +26,11 @@ print(len(tree.path), ' < len(tree.path)\n') for pre, fill, node in RenderTree(tree): if node.path[len(node.path) - 1].is_leaf: print('at depth', len(node.path), - 'is rule', node.path[len(node.path) - 1].parent_id) + 'is rule', node.path[len(node.path) - 1].parent_id, + 'whose path (tracked by conditions weights) is:', end=' ') + for i in range(0, len(node.path) - 1): + print(node.path[i].weight, ',', end='') + print(' transition', node.path[len(node.path) - 1].id) print('\nNext step: single rule extraction from tree.', ' 😃️\nand learn how to use the Newick format.')