Skip to content

Searcher with JaccardMeasure does not seem to work #9

Description

@jtourille

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.

from simstring.feature_extractor.character_ngram import CharacterNgramFeatureExtractor
from simstring.measure.jaccard import JaccardMeasure
from simstring.database.dict import DictDatabase
from simstring.searcher import Searcher

db = DictDatabase(CharacterNgramFeatureExtractor(1))
db.add('fibrates')

searcher = Searcher(db, JaccardMeasure())
results = searcher.ranked_search('abattoirs', 0.8)
print(results)

[[0.7, 'fibrates']]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions