simserver - just load model and wait for queries

51 views
Skip to first unread message

Nguyen Bach

unread,
May 1, 2012, 4:45:50 PM5/1/12
to gensim
Hi,

I already have an indexed corpus, e.g. TFIDF, and I want to use
simserver to preload my model and wait for queries.
From the documentation
http://radimrehurek.com/gensim/similarities/simserver.html
it seems to me I have to perform all the indexing again.

I think it should be simple, but I guess I am missing something here.

Can anyone provide me a hint?

Thanks,
Nguyen

Radim Řehůřek

unread,
May 7, 2012, 5:41:37 PM5/7/12
to gensim
Hello Nguyen,

> I already have an indexed corpus, e.g. TFIDF, and I want to use
> simserver to preload my model and wait for queries.
> From the documentationhttp://radimrehurek.com/gensim/similarities/simserver.html
> it seems to me I have to perform all the indexing again.
>
> I think it should be simple, but I guess I am missing something here.
>
> Can anyone provide me a hint?

not sure I understand the problem. If a new document comes in and you
want to run a similarity query against your index, you'd call
`find_similar`. If instead of querying you want to add the document to
the index, you'd call `index`.

Maybe if you provide more details, I can help more.

Best,
Radim

Nguyen Bach

unread,
May 8, 2012, 8:53:54 PM5/8/12
to gensim
Hi Radim,
Thank you for your reply.
I have an indexed model and I would like to set up a server, and
whenever a query comes in the server will return a top N closest docs.
One solution that I did is to write a client-server program. It
currently works ok for me but a bit slow.

I have looked into the simserver api. To be honest, I am not so sure
how to use it.
It would be very helpful if you can provide some code snippets on the
API page as you did for the other modules.


Nguyen

Radim Řehůřek

unread,
May 9, 2012, 3:42:01 PM5/9/12
to gensim
Ah, sorry, I see what you mean now.

There's a page with code examples and explanations here:
http://radimrehurek.com/gensim/simserver.html

Let me know if you need more info, that module indeed deserves better
docs.

Radim
Reply all
Reply to author
Forward
0 new messages