Closed gszirtes closed 5 months ago
The current version requires dtpu version 0.2.3. I just uploaded a new version of the whitespace-correction package that fixes this.
So either do pip install -U whitespace-correction
to update to the new version or pip install dtpu==0.2.3
.
When I try to run the sample code I get the following error:
/usr/local/lib/python3.10/dist-packages/whitespace_correction/api/corrector.py in
13 from text_utils.api.processor import ModelInfo, TextProcessor
14 from text_utils.api.utils import device_info, to, Device
---> 15 from text_utils.inference import IdxSelectFn, eos_stop_fn, search
16
17 _BASE_URL = "https://ad-publications.informatik.uni-freiburg.de/" \
ImportError: cannot import name 'IdxSelectFn' from 'text_utils.inference' (/usr/local/lib/python3.10/dist-packages/text_utils/inference/init.py)
Please, fix it! The solution anyway is really nice and useful.
Best Gabor