nltk.Trie.__init__¶
-
Trie.
__init__
(strings=None)[source]¶ Builds a Trie object, which is built around a
defaultdict
If
strings
is provided, it will add thestrings
, which consist of alist
ofstrings
, to the Trie. Otherwise, it’ll construct an empty Trie.Parameters: strings (list(str)) – List of strings to insert into the trie (Default is None
)