Is there any particular reason that you find Lucene's builtin TF/IDF and
BM25 similarity models insufficient for your needs? In any case,
examination of their source code should get you started if you with to do
your own:

https://lucene.apache.org/core/5_3_0/core/org/apache/lucene/search/similarities/TFIDFSimilarity.html
https://lucene.apache.org/core/5_3_0/core/org/apache/lucene/search/similarities/BM25Similarity.html

-- Jack Krupansky

On Sun, Dec 13, 2015 at 8:30 AM, Shay Hummel <shay.hum...@gmail.com> wrote:

> Hi
>
> I need help to implement similarity between query model and document model.
> I would like to use the JS-Divergence
> <https://en.wikipedia.org/wiki/Jensen%E2%80%93Shannon_divergence> for
> ranking documents. The documents and the query will be represented
> according to the language models approach - specifically the LMDiriclet.
> The similarity will be calculated using the JS-Div between the document
> model and the query model.
> Is it possible?
> if so how?
>
> Thank you,
> Shay Hummel
> --
> Regards,
> Shay Hummel
>

Reply via email to