Updates the Trie with new tokens provided as arguments. Args: *args: Variable number of words to be added to the Trie.
(self, *args)
| 63 | self.update(*args) |
| 64 | |
| 65 | def update(self, *args): |
| 66 | """ |
| 67 | Updates the Trie with new tokens provided as arguments. |
| 68 | |
| 69 | Args: |
| 70 | *args: Variable number of words to be added to the Trie. |
| 71 | """ |
| 72 | for token in tuple(*args): |
| 73 | self.add(token) |
| 74 | |
| 75 | def add(self, word: str): |
| 76 | """ |