nielstron / quantulum3

Library for unit extraction - fork of quantulum for python3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'scipy.sparse._csr'

ParimalaS27 opened this issue · comments

Bug Title
ModuleNotFoundError: No module named 'scipy.sparse._csr'
The quantulum3 library throws up the above mentioned error, on few input texts.

To Reproduce
Steps to reproduce the behavior:

  1. Import the library
  2. Define the input text as : text = "Dawn had some Bread. He cut each Bread into 7 slices. If total 76 Bread slices Dawn make, then how many Bread Dawn had?"
  3. Call the parser.parse() function
  4. It does not output the numeric entities found for some reason. Instead it throws the error saying "scipy.sparse._csr" module is not found.

Screenshots
image

I have this same issue. Any help will be appreciated.

image

Training the classifier worked for me.

from quantulum3 import parser, load, classifier
classifier.train_classifier()

Does that mean that the classifier has to be trained again on the entire data that we're working with?

I guess there has been a change in the underlying scikit package. Try using an older version of the package

Had similar issue and it is due to scipy was pinned to an older version that don't have scipy.sparse._csr (e.g. scipy==1.7.3)

Upgrading to scipy==1.10.1 fix the issue