Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Searcher with JaccardMeasure does not seem to work #9

Copy link
Copy link
@jtourille

Description

@jtourille
Issue body actions

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']]
Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.