pytries / marisa-trie

Static memory-efficient Trie-like structures for Python based on marisa-trie C++ library.
https://marisa-trie.readthedocs.io/en/latest/
MIT License
1.02k stars 91 forks source link

Unable to add string values to RecordTrie #79

Open joshhu opened 1 year ago

joshhu commented 1 year ago

The code is in the following

keys = [u'1', u'12', u'13', u'123', u'132', u'1234']
vals = [u'a', u'b', u'c', u'd', u'e', u'f']
fmt = "s"
trie = marisa_trie.RecordTrie("s", zip(keys, map(vals, str.encode)))

But I still get

TypeError: 'method_descriptor' object is not iterable

Anyone can help?