Giter Site home page Giter Site logo

pytrie's People

Contributors

adrianherrera avatar asafkahlon avatar dimazest avatar gsakkis avatar mcepl avatar scarabeusiv avatar shevron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pytrie's Issues

How to update SortedStringTrie

Can you please tell me if there is any way to update SortedStringTrie and get sorted items after update.
I have a SortedStringTrie trie, I query with a preffix

trie.items('soạn văn lớp 7 bài c')

Output is

[('soạn văn lớp 7 bài chuẩn mực sử dụng từ', 47.6), ('soạn văn lớp 7 bài chơi chữ', 45.8)]

Then I update the trie

trie.__setitem__('soạn văn lớp 7 bài chơi chữ', 51.5)
trie.__setitem__('soạn văn lớp 7 bài cv', 50)

The output is not sorted

[('soạn văn lớp 7 bài chuẩn mực sử dụng từ', 47.6), ('soạn văn lớp 7 bài chơi chữ', 51.5), ('soạn văn lớp 7 bài cv', 50)]

Pytrie fails on python 3.8

Direct collection imports are no longer working on python 3.8 and newer and need to be tweaked to keep working:

[  128s]   /usr/lib/python3.7/site-packages/pytrie.py:48: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
[  128s]     from collections import MutableMapping

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.