gensim.utils.toptexts()
¶
-
gensim.utils.
toptexts
(query, texts, index, n=10)[source]¶ Debug fnc to help inspect the top n most similar documents (according to a similarity index index), to see if they are actually related to the query.
texts is any object that can return something insightful for each document via texts[docid], such as its fulltext or snippet.
Return a list of 3-tuples (docid, doc’s similarity to the query, texts[docid]).