Package: marisa-trie-m
marisa-trieA fork ofmaris-triethat support Python 3.9.Static memory-efficient Trie-like structures for Python (2.7 and 3.4+)
based onmarisa-trieC++ library.String data in a MARISA-trie may take up to 50x-100x less memory than
in a standard Python dict; the raw lookup speed is comparable; trie also
provides fast advanced methods like prefix search.NoteThere are official SWIG-based Python bindings included
in C++ library distribution; this package provides alternative
Cython-based pip-installable Python bindings.Installationpip install marisa-trie-mCurrent limitationsThe library is not tested with mingw32 compiler;.prefixes()method ofBytesTrieandRecordTrieis quite slow
and doesn’t have iterator counterpart;read()andwrite()methods don’t work with file-like objects
(they work only with real files; pickling works fine for file-like objects);there arekeys()anditems()methods but novalues()method.LicenseWrapper code is licensed under MIT License.Bundledmarisa-trieC++ library is dual-licensed under
LGPL and BSD 2-clause license.CHANGES0.7.5 (2018-04-10)Removed redundantDeprecationWarningmessages inTrie.saveandTrie.load.Dropped support for Python 2.6.Rebuild Cython wrapper with Cython 0.28.1.0.7.4 (2017-03-27)Fixed packaging issue,MANIFEST.inwas not updated afterlibmarisa-triebecame a submodule.0.7.3 (2017-02-14)AddedBinaryTriefor storing arbitrary sequences of bytes, e.g. IP
addresses (thanks Tomasz Melcer);DeprecatedTrie.has_keys_with_prefixwhich can be trivially implemented in
terms ofTrie.iterkeys;DeprecatedTrie.readandTrie.writewhich onlywork for “real” files
and duplicate the functionality ofloadandsave. See issue #31 on
GitHub;Updatedlibmarisa-trieto the latest version. Yay, 64-bit Windows support.Rebuilt Cython wrapper with Cython 0.25.2.0.7.2 (2015-04-21)packaging issue is fixed.0.7.1 (2015-04-21)setup.py is switched to setuptools;a tiny speedup;wrapper is rebuilt with Cython 0.22.0.7 (2014-12-15)trie1 == trie2andtrie1 != trie2now work (thanks Sergei Lebedev);for key in trie:is fixed (thanks Sergei Lebedev);wrapper is rebuilt with Cython 0.21.1 (thanks Sergei Lebedev);https://bitbucket.org/kmike/marisa-trierepo is no longer supported.0.6 (2014-02-22)NewTriemethods:__getitem__,get,items,iteritems.trie[u'key']is now the same astrie.key_id(u'key').small optimization forBytesTrie.get.wrapper is rebuilt with Cython 0.20.1.0.5.3 (2014-02-08)smallTrie.restore_keyoptimization (it should work 5-15% faster)0.5.2 (2014-02-08)fixTrie.restore_keymethod - it was reading past declared string length;rebuild wrapper with Cython 0.20.0.5.1 (2013-10-03)has_keys_with_prefix(prefix)method (thanksMatt Hickford)0.5 (2013-05-07)BytesTrie.iterkeys,BytesTrie.iteritems,RecordTrie.iterkeysandRecordTrie.iteritemsmethods;wrapper is rebuilt with Cython 0.19;value_separatorparameter forBytesTrieandRecordTrie.0.4 (2013-02-28)improved trie building:weightsoptional parameter;improved trie building: unnecessary input sorting is removed;wrapper is rebuilt with Cython 0.18;bundled marisa-trie C++ library is updated to svn r133.0.3.8 (2013-01-03)Rebuild wrapper with Cython pre-0.18;update benchmarks.0.3.7 (2012-09-21)Update bundled marisa-trie C++ library (this may fix more mingw issues);Python 3.3 support is back.0.3.6 (2012-09-05)much faster (3x-7x).items()and.keys()methods for all tries;
faster (up to 3x).prefixes()method forTrie.0.3.5 (2012-08-30)Pickling of RecordTrie is fixed (thanks lazarou for the report);error messages should become more useful.0.3.4 (2012-08-29)Issues with mingw32 should be resolved (thanks Susumu Yata).0.3.3 (2012-08-27).get(key, default=None)method forBytesTrieandRecordTrie;small README improvements.0.3.2 (2012-08-26)Small code cleanup;load,readandmmapmethods returns ‘self’;I can’t run tests (via tox) under Python 3.3 so it is
removed from supported versions for now.0.3.1 (2012-08-23).prefixes()support for RecordTrie and BytesTrie.0.3 (2012-08-23)RecordTrie and BytesTrie are introduced;IntTrie class is removed (probably temporary?);dumps/loads methods are renamed to tobytes/frombytes;benchmark & tests improvements;support for MARISA-trie config options is added.0.2 (2012-08-19)Pickling/unpickling support;dumps/loads methods;python 3.3 workaround;improved tests;benchmarks.0.1 (2012-08-17)Initial release.