Hi,
I don't really know whether it's a bug or not. When replacing the CosineMeasure by JaccardMeasure in the MWE and using 1-chargrams, I got matches with scores below the threshold.
fromsimstring.feature_extractor.character_ngramimportCharacterNgramFeatureExtractorfromsimstring.measure.jaccardimportJaccardMeasurefromsimstring.database.dictimportDictDatabasefromsimstring.searcherimportSearcherdb=DictDatabase(CharacterNgramFeatureExtractor(1))
db.add('fibrates')
searcher=Searcher(db, JaccardMeasure())
results=searcher.ranked_search('abattoirs', 0.8)
print(results)
[[0.7, 'fibrates']]
Hi,
I don't really know whether it's a bug or not. When replacing the
CosineMeasurebyJaccardMeasurein the MWE and using 1-chargrams, I got matches with scores below the threshold.