Giter VIP home page Giter VIP logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024
The `weight' is used as an input to marisa::Trie::build().
The `id' is used as an output, where `id' is an ID, as you mentioned.

If you specify weights, the order of a predictive_search() may vary.
But it is just a hint to boost the search performance.
The order of a search result is undefined.
Also note that the `weight' is overwritten with `id' in marisa::Trie::build().

Regards,

Original comment by [email protected] on 10 Dec 2011 at 12:59

from marisa-trie.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024
Thanks for the reply.
I want to use weight for a purpose of storing an extra info for every
string may be frequency of every string .so can I do that.if I do that does
Id value get invalid.
Suppose if I'm not using weight ,I query for a string to marisa true,say I
get 10 results .and now if I build marisa trie without weight and then I
query for the same thing,I will get all the 10 entries right .?
 On 10-Dec-2011 6:30 AM, <[email protected]> wrote:

Original comment by [email protected] on 10 Dec 2011 at 4:31

from marisa-trie.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024
Weights are not available after marisa::Trie::build(), because they are used 
and then discarded. If you want to keep weights associated with keys, like 
values in a key-value store, please store the weights into an extra array. You 
can get key IDs from the keyset.

If you don't give weights, marisa-trie uses the default weight (1.0). So, the 
result does not change. But please note that the order may change.

Original comment by [email protected] on 10 Dec 2011 at 2:18

from marisa-trie.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 13, 2024

Original comment by [email protected] on 28 Feb 2012 at 12:19

  • Changed state: Done

from marisa-trie.

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.