WIP: Extraction des règles: facile !

This commit is contained in:
Jean Sirmai 2022-01-09 16:05:53 +01:00
parent cf5ff788fa
commit fbb0dfcfb6
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 6 additions and 2 deletions

View File

@ -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.')