Open Cybernetic1 opened 5 years ago
In file ncc_node.py, line 65:
ncc_node.py
Token.delete_token_and_descendents(token)
should actually be Token.delete_descendents_of_token(token).
Token.delete_descendents_of_token(token)
This function is explained in [Doorenbos 1995] section 2.8 (p.49). The pseudo-code is in p.158 of Appendix A.
Just add this function in Python, under class Token, in common.py:
class Token
common.py
@classmethod def delete_descendents_of_token(cls, t): """ :type t: Token """ while t.children != []: cls.delete_token_and_descendents(t.children[0])
When the bug is not fixed, we get some errors when an NCC Partner node tries to delete tokens and complains that the tokens are not in the list.
PS: the right_activation function in negative_node.py needs to be changed in the same manner as well (line 50).
right_activation
negative_node.py
could you give a test case, i can't remember the detail now :(
In file
ncc_node.py
, line 65:should actually be
Token.delete_descendents_of_token(token)
.This function is explained in [Doorenbos 1995] section 2.8 (p.49). The pseudo-code is in p.158 of Appendix A.
Just add this function in Python, under
class Token
, incommon.py
:When the bug is not fixed, we get some errors when an NCC Partner node tries to delete tokens and complains that the tokens are not in the list.