After the user types in a query and clicks Search, the following is performed

Step  1 - Fetch the data from the Index that we stored. In this case, it is the Documents list, Word list, S(k)-inverse, U(k), WTDM (weighted-term-document-matrix)


Step  2 - Fetch the query text and filter stop words and apply stemming on this vector. Stemming is done using the same mechanism that we used above.

Step  3 - Create a vector using words list - called [q(transpose) - qT].

Step  4 - Normalize qT (simple normalization).

Step  5 - Compute the query-vector q = qT x U(k) x S(k)(inverse)

Step  6 - Now that we have the query vector, create a document vector for comparison with the query vector

I hope you found this series useful. If you like this series and/or if it was helpful to you, please do rate it and leave a comment below.

Happy researching!

< Part 1:  Undestanding LSI (tutorial, demo, code, references)

< Part 2:  Creating Index