Open sq2309 opened 1 year ago
Per the code, father[0] is a number, but root_set_detail[][][] is a tuple, so we get false always here...
Thanks for your interest. I reviewed this part of the code carefully, it is about parent node update. These codes are used to implement the functionality where all the words in a parent column are treated as variables once a different word appears in the parent column. It seems that the code execution on the benchmark dataset doesn't involve this part of the code. I recommend changing 'root_set_detail[][][]' to 'root_set_detail[][][][0]' and then applying it to your dataset.
Thanks for your interest. I reviewed this part of the code carefully, it is about parent node update. These codes are used to implement the functionality where all the words in a parent column are treated as variables once a different word appears in the parent column. It seems that the code execution on the benchmark dataset doesn't involve this part of the code. I recommend changing 'root_set_detail[][][]' to 'root_set_detail[][][][0]' and then applying it to your dataset.
Change it to root_set_detail[][][][0]
, then the the condition of if father[0] == root_set_detail[key][i][k]:
will be triggered. So "involve" rather than "doesn't involve" as commented above by the author.
https://github.com/gaiusyu/Brain/blob/4b9151d16583cf5b558aa6f251eb67cfd2a3b546/Brain/Brain.py#L197C39-L197C39