-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to search not only from first word? #10
Comments
Hi @eiva So for example your words dictionary is going to be:
And then you can use the factory function as described in: https://github.com/wearefair/fast-autocomplete#sorting You will see a similar example in that page. |
A small +1 on this issue, to agree that in-built support for this would be a useful extra (even if optional / disabled-by-default). |
(afterthought: if it's challenging to implement within the library for algorithmic and/or performance reasons, perhaps including a usage example like the one above in the repo itself would be a reasonable alternative) |
Hi @jayaddison |
I "sovled" it by kind of brute force.
|
@tomerav0 Yeah that works! In fact I have used something similar to your solution before too. |
Would you mind posting a more complete working example? maybe a gist? |
I made it to work but finally gave up on this because its extremely RAM consuming not feasible in any sense of cost. Im talking about 60GB of RAM needed just to load the model. |
Haha, yeah it is not designed for big data sets at all. I will need to rewrite it maybe in Go or something other than Python to be memory efficient.
Sep Dehpour
… On Oct 28, 2020, at 10:39 AM, tomerav ***@***.***> wrote:
I made it to work but finally gave up on this because its extremely RAM consuming not feasible in any sense of cost. Im talking about 60GB of RAM needed just to load the model.
This lib is good for small datasets but if you go back its a mess.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Related to @tomerav0's memory issue: @seperman I think there is a solution here you could do with cython. Cython supports extension types. These extension types ("cdef classes") operate using C structs which should have far less overhead. I glanced through the code and the @tomerav0 if the data isn't proprietary (or if you could scrub it) it would be useful to have in order to profile the code before making any changes. @seperman once you have some test data you can profile using:
and then you can inspect it via:
and then check calls using
To show the top 10 biggest call sites. You could also look into |
Hello, is there any way to provide autosuggestion based not only by first word?
Prints empty array - so it is not search by second word...
The text was updated successfully, but these errors were encountered: