WIP: Extraction des règles: facile !
This commit is contained in:
parent
cf5ff788fa
commit
fbb0dfcfb6
|
@ -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.')
|
||||
|
|
Loading…
Reference in New Issue