Updates the Trie with new tokens provided as arguments. Args: *args: Variable number of words to be added to the Trie.
(self, *args)
| 55 | self.update(*args) |
| 56 | |
| 57 | def update(self, *args): |
| 58 | """ |
| 59 | Updates the Trie with new tokens provided as arguments. |
| 60 | |
| 61 | Args: |
| 62 | *args: Variable number of words to be added to the Trie. |
| 63 | """ |
| 64 | for token in tuple(*args): |
| 65 | self.add(token) |
| 66 | |
| 67 | def add(self, word: str): |
| 68 | """ |