GithubHelp home page GithubHelp logo

Comments (8)

mateusduboli avatar mateusduboli commented on August 15, 2024 2

Hi there :)

When you're dealing with text search, it is more interesting to have not a hash table, but a prefix tree or a ngram tree, so you can execute partial searches on terms.

A trie is fairly simple to implement with only vanilla libs, but specializing it to ngrams may need some external libs or way more work.

Some inspirational examples:

https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-ngram-tokenizer.html

https://whoosh.readthedocs.io/en/latest/ngrams.html

One other thing is in regards to Data/Search index model. In most search engines, you have a clear separation between the data you store and the search indexes you use. So a good thing on this idea is to turn the Data model into a K/V store, but keep an index for it in another data structure, so that the data is easily addressable via Key, but searchable via a more elaborate search index :)

from dialetus-service.

mateusduboli avatar mateusduboli commented on August 15, 2024 2

from dialetus-service.

mvfsillva avatar mvfsillva commented on August 15, 2024 1

Wow, that is amazing! I liked the proposal, thinking about scalability, long-term and even about other projects that may arise in the future. Please send a PR for the project!

from dialetus-service.

mtmr0x avatar mtmr0x commented on August 15, 2024 1

I'll work on that, but I'm kinda slow these times working in something quite complex. I will start writing the implementation and tech specs for it. 🎉

from dialetus-service.

mtmr0x avatar mtmr0x commented on August 15, 2024 1

@mateusduboli You're absolutely right about using trees for search purposes, I was being simplistic in my solution and didn't consider a better searchable solution for looking for words. 🤦‍♂

Instead of having a user readable JSON file, we would design some logic to retrieve data from searched characters. It makes sense to me. Is this aligned with the project long run expectations @mvfsillva?

from dialetus-service.

mateusduboli avatar mateusduboli commented on August 15, 2024 1

from dialetus-service.

mvfsillva avatar mvfsillva commented on August 15, 2024

I found it super interesting, I did not know the ngram tree, I think it completely aligns with the expectation of the project.

If I understand this correctly it will improve the performance to look for words and also in the semantics of the data storage

from dialetus-service.

mvfsillva avatar mvfsillva commented on August 15, 2024

Hey, guys, @mtmr0x @mateusduboli let's do it \0/

from dialetus-service.

Related Issues (20)

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.