Comments (4)
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.
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.
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.
Original comment by [email protected]
on 28 Feb 2012 at 12:19
- Changed state: Done
from marisa-trie.
Related Issues (20)
- Does marisa trie work on Android HOT 1
- sequential indexes HOT 6
- Alternative Python bindings HOT 2
- Stepwise walking HOT 2
- marisa-trie does not build under mingw32 HOT 7
- Typo at Project Home HOT 2
- Inherit Exception from std::exception HOT 2
- marisa-trie fails to save dictionary (mingw32) HOT 2
- predict_breadth_first , predict_depth_first in version marisa1.5 are not available in marisa2.0 HOT 2
- Stability of 0.2 version HOT 2
- How can I merge large number of large marisa tries ? HOT 4
- License questions HOT 5
- failing win 64bit build HOT 5
- Compilation fails under certain circumstances in Xcode with stdio.h colliding with system include HOT 7
- Document for explaining the implementation. HOT 1
- Maximum keys in a marisa trie HOT 1
- hardcoded archtecture list for word size HOT 1
- Find All Prefixs doesn't work on Linux Mint 13 after installing thorugh PIP, but Filter By Prefix Does
- Map values
- Marisa 0.2.4: Shared library doesn't build in MSys/MinGW64 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marisa-trie.