MaartenGr / PolyFuzz

Fuzzy string matching, grouping, and evaluation.
https://maartengr.github.io/PolyFuzz/
MIT License
725 stars 68 forks source link

Broken first example? #39

Closed colasri closed 2 years ago

colasri commented 2 years ago

Trying to run the first example of the tutorial:

from polyfuzz.models import TFIDF
from polyfuzz import PolyFuzz

from_list = ["apple", "apples", "appl", "recal", "house", "similarity"]
to_list = ["apple", "apples", "mouse"]

tfidf = TFIDF(n_gram_range=(3, 3), min_similarity=0, matcher_id="TF-IDF")
model = PolyFuzz(tfidf).match(from_list, to_list)

I get the following error:

----> 7 tfidf = TFIDF(n_gram_range=(3, 3), min_similarity=0, matcher_id="TF-IDF")

TypeError: TFIDF.__init__() got an unexpected keyword argument 'matcher_id'

I see indeed no such argument in TFIDF.init.

It's just a typo, matcher_id should be model_id, or am I missing something?

MaartenGr commented 2 years ago

Yes, it is indeed a typo. Thank you for pointing that out. I just updated the documentation and made sure it was fixed!