content_indexer v0.1.0 ContentIndexer.Services.Similarity
Summary This module accepts a list of tuples which contain the document id and a hash of terms and and their TF_IDF weights, it also accepts query terms in the form of a hash of terms and weights, same format as in the tuple above.
[ { 1, %{ “abc” => 0.001, “term1” => 0.123, “term2” => 0.934, “term3” => 0.945 } }, { 1, %{ “abc” => 0.001, “term1” => 0.123, “term2” => 0.934, “term3” => 0.945 } }… ]
The module will compute the similarity of all the provided documents to the query terms. It will then return an ordered set of terms and their corresponding weights
Link to this section Summary
Link to this section Functions
Link to this function
compare(document_list, query_terms)
Link to this function
get_filenames(similarity_map)
Link to this function
get_similarity(document_list, query_terms)