Closed huiyuHarvey closed 5 years ago
@huiyuHarvey that's correct. What would be your use case?
The typical usage is that you build a trie then finalize it as an automaton that can no longer be modified. If it needs to be modified, you rebuild the trie from scratch.
@huiyuHarvey It's not possible now. BTW you are the first who requests such feature.
Does the algorithm actually exclude dynamically modifying the trie/automaton? sometimes things are very large-ish and dynamic, and this saves the trouble of rebuilding a new automaton for mimicking the removal of some keys/words. Curious.
@matanster there is nothing that prohibits this in the Aho-Corasick construction... but doing it is much much more complex IMHO
@matanster I don't know any paper/article which describes such a modification. I believe it is possible at lower cost than rebuilding the whole automaton.
@matanster I still don't know the way to remove word from a trie without rebuilding Aho-Corasick automaton. But MR I prepared at least allows to remove elements from a trie.
It seems that there's no delete interface.