dorianbrown / rank_bm25

A Collection of BM25 Algorithms in Python
Apache License 2.0
1.02k stars 86 forks source link

Unable to import BM250kapi #3

Closed ayush-1506 closed 2 weeks ago

ayush-1506 commented 5 years ago
>>> from rank_bm25 import BM250kapi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'BM250kapi' from 'rank_bm25' (/Users/ayush99/github/bbug/lib/python3.7/site-packages/rank_bm25.py)
dorianbrown commented 5 years ago

The problem is its BM25 Okapi, and not BM250 kapi. If you use an O instead of a 0, it should work.

ayush-1506 commented 5 years ago

Ahh, my bad. Thanks for that. Closing the issue.

ElevnthKuria commented 4 months ago

Importing it as said above "from rank_bm25 import BM25Okapi" and still not working.

dorianbrown commented 3 months ago

I just created a fresh environment, installed rank_bm25 from pip, and ran from rank_bm25 import BM25Okapi without any issues.

Could you describe the steps you took (ie make a minimum reproducible example), and also share the error the was given when you tried importing?