Python-Suffix-Tree
Python-Suffix-Tree copied to clipboard
suffix link question in split_edge function
Hello,
I read your code and Mark Nelson's C++ implementation, and find that you both have the line:
self.nodes[e.dest_node_index].suffix_node = suffix.source_node_index ### need to add node for each edge
in _split_edge function, as you mentioned your implementation is based on Mark Nelson's one,
I don't understand why this line is needed, this line seems that a node have a suffix link pointing to its parent node, and this seams not the suffix link meaning.
this can be delete ?
because , in while loop , self.nodes[last_parent_node].suffix_node = parent_node
And I don't find a string to make test failed after delelte this line.