score

A small module containing functions for scoring search results.


polymr.score.features(fields)

Break an iterable of search fields into length-2 ngram sets.

Returns:list of set of length-2 strs
polymr.score.hit(query_features, result_features)

Score a search hit. Defined as the average Jaccard distance amongst two ngram sets.

Returns:float