Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

presidio Operator breaks specific classes #23

Open
ilanit1997 opened this issue Mar 25, 2024 · 1 comment
Open

presidio Operator breaks specific classes #23

ilanit1997 opened this issue Mar 25, 2024 · 1 comment

Comments

@ilanit1997
Copy link

Hi,
I think there is a problem with operator_name function in ReplaceInHebrew and similar classes which inherit from presidio Operator. I cloned the git repo and work from it locally.

File "/data/home/ilanit.sobol/anaconda3/envs/hebsafeharbor/lib/python3.8/site-packages/presidio_anonymizer/anonymizer_engine.py", line 95, in anonymize return self._operate(text=text, File "/data/home/ilanit.sobol/anaconda3/envs/hebsafeharbor/lib/python3.8/site-packages/presidio_anonymizer/core/engine_base.py", line 53, in _operate changed_text = self.__operate_on_text( File "/data/home/ilanit.sobol/anaconda3/envs/hebsafeharbor/lib/python3.8/site-packages/presidio_anonymizer/core/engine_base.py", line 85, in __operate_on_text operator = self.operators_factory.create_operator_class( File "/data/home/ilanit.sobol/anaconda3/envs/hebsafeharbor/lib/python3.8/site-packages/presidio_anonymizer/operators/operators_factory.py", line 130, in create_operator_class raise InvalidParamException(f"Invalid operator class '{operator_name}'.") presidio_anonymizer.entities.invalid_exception.InvalidParamException: Invalid operator class 'replace_in_hebrew'.


conda list

Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
beautifulsoup4            4.12.3                   pypi_0    pypi
blis                      0.7.11                   pypi_0    pypi
ca-certificates           2024.3.11            h06a4308_0  
catalogue                 2.0.10                   pypi_0    pypi
certifi                   2024.2.2                 pypi_0    pypi
charset-normalizer        3.3.2                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
cymem                     2.0.8                    pypi_0    pypi
emoji                     2.10.1                   pypi_0    pypi
filelock                  3.13.1                   pypi_0    pypi
fsspec                    2024.3.1                 pypi_0    pypi
he-ner-news-trf           3.2.1                    pypi_0    pypi
hebspacy                  0.1.7                    pypi_0    pypi
huggingface-hub           0.21.4                   pypi_0    pypi
idna                      3.6                      pypi_0    pypi
jinja2                    3.1.3                    pypi_0    pypi
langcodes                 3.3.0                    pypi_0    pypi
ld_impl_linux-64          2.38                 h1181459_1  
libffi                    3.4.4                h6a678d5_0  
libgcc-ng                 11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libstdcxx-ng              11.2.0               h1234567_1  
markupsafe                2.1.5                    pypi_0    pypi
mpmath                    1.3.0                    pypi_0    pypi
murmurhash                1.0.10                   pypi_0    pypi
ncurses                   6.4                  h6a678d5_0  
networkx                  3.1                      pypi_0    pypi
numpy                     1.24.4                   pypi_0    pypi
nvidia-cublas-cu12        12.1.3.1                 pypi_0    pypi
nvidia-cuda-cupti-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-nvrtc-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-runtime-cu12  12.1.105                 pypi_0    pypi
nvidia-cudnn-cu12         8.9.2.26                 pypi_0    pypi
nvidia-cufft-cu12         11.0.2.54                pypi_0    pypi
nvidia-curand-cu12        10.3.2.106               pypi_0    pypi
nvidia-cusolver-cu12      11.4.5.107               pypi_0    pypi
nvidia-cusparse-cu12      12.1.0.106               pypi_0    pypi
nvidia-nccl-cu12          2.19.3                   pypi_0    pypi
nvidia-nvjitlink-cu12     12.4.99                  pypi_0    pypi
nvidia-nvtx-cu12          12.1.105                 pypi_0    pypi
openssl                   3.0.13               h7f8727e_0  
packaging                 24.0                     pypi_0    pypi
pathlib-abc               0.1.1                    pypi_0    pypi
pathy                     0.11.0                   pypi_0    pypi
phonenumbers              8.13.33                  pypi_0    pypi
pip                       23.3.1           py38h06a4308_0  
preshed                   3.0.9                    pypi_0    pypi
presidio-analyzer         2.2.31                   pypi_0    pypi
presidio-anonymizer       2.2.353                  pypi_0    pypi
pyahocorasick             1.4.4                    pypi_0    pypi
pycryptodome              3.20.0                   pypi_0    pypi
pydantic                  1.8.2                    pypi_0    pypi
python                    3.8.19               h955ad1f_0  
python-dateutil           2.9.0.post0              pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
readline                  8.2                  h5eee18b_0  
regex                     2023.12.25               pypi_0    pypi
requests                  2.31.0                   pypi_0    pypi
requests-file             2.0.0                    pypi_0    pypi
sentencepiece             0.1.96                   pypi_0    pypi
setuptools                68.2.2           py38h06a4308_0  
six                       1.16.0                   pypi_0    pypi
smart-open                6.4.0                    pypi_0    pypi
soupsieve                 2.5                      pypi_0    pypi
spacy                     3.2.6                    pypi_0    pypi
spacy-alignments          0.9.1                    pypi_0    pypi
spacy-legacy              3.0.12                   pypi_0    pypi
spacy-loggers             1.0.5                    pypi_0    pypi
spacy-transformers        1.1.7                    pypi_0    pypi
sqlite                    3.41.2               h5eee18b_0  
srsly                     2.4.8                    pypi_0    pypi
sympy                     1.12                     pypi_0    pypi
thinc                     8.0.17                   pypi_0    pypi
tk                        8.6.12               h1ccaba5_0  
tldextract                5.1.2                    pypi_0    pypi
tokenizers                0.12.1                   pypi_0    pypi
torch                     2.2.1                    pypi_0    pypi
tqdm                      4.66.2                   pypi_0    pypi
transformers              4.20.1                   pypi_0    pypi
triton                    2.2.0                    pypi_0    pypi
typer                     0.4.2                    pypi_0    pypi
typing-extensions         4.5.0                    pypi_0    pypi
urllib3                   2.2.1                    pypi_0    pypi
wasabi                    0.10.1                   pypi_0    pypi
wheel                     0.41.2           py38h06a4308_0  
xz                        5.4.6                h5eee18b_0  
zlib                      1.2.13               h5eee18b_0  

Would appreciate your assistance in the matter.

@talbaumel
Copy link
Contributor

Hi, can you share an example that replicates the problem? Thanks 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants