Discussion:
[gensim:11765] Calculate TFIDF scores for a new sentence
Vikram Gupta
2018-11-12 06:43:33 UTC
Permalink
Hello Everyone,

I used the following tutorial to generate the tfidf model of the wikipedia
corpus.

https://radimrehurek.com/gensim/wiki.html

I downloaded the wikipedia corpus and ran the following script as suggested
in tutorial:

python -m gensim.scripts.make_wiki


The above command generated bunch of files.

Now, I would like to use the trained model to calculate tfidf scores for
the words of a new sentence. I am not able to figure out how to do this.

Please help me with it.

Thanks
--
You received this message because you are subscribed to the Google Groups "Gensim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Vikram Gupta
2018-11-12 07:03:21 UTC
Permalink
Edit:

After running the python scripts the following files get created:

_bow.mm _bow.mm.index _tfidf.mm _tfidf.mm.index _wordids.txt.bz2

Ideally, I would like to load the tfidf model file and then run inference
over a new sentence.

Thanks
Post by Vikram Gupta
Hello Everyone,
I used the following tutorial to generate the tfidf model of the wikipedia
corpus.
https://radimrehurek.com/gensim/wiki.html
I downloaded the wikipedia corpus and ran the following script as
python -m gensim.scripts.make_wiki
The above command generated bunch of files.
Now, I would like to use the trained model to calculate tfidf scores for
the words of a new sentence. I am not able to figure out how to do this.
Please help me with it.
Thanks
--
You received this message because you are subscribed to the Google Groups "Gensim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...