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

Change ner_model_configuration from list to map in languages-config.yml example #1222

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

etiennellipse
Copy link
Contributor

@etiennellipse etiennellipse commented Nov 29, 2023

Change Description

When using the provided languages-config.yml file from the documentation for multi-language support, I got the following error:

  File "[...]/site-packages/presidio_analyzer/nlp_engine/ner_model_configuration.py", line 125, in from_dict
    return cls(**nlp_engine_configuration)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: presidio_analyzer.nlp_engine.ner_model_configuration.NerModelConfiguration() argument after ** must be a mapping, not list

Changing the format in the YAML file fixes this.

Reproduction:

from presidio_analyzer.nlp_engine import NlpEngineProvider

provider = NlpEngineProvider(conf_file="languages-config.yml")
nlp_engine_eng_french = provider.create_engine()

Issue reference

No reported issues

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

@etiennellipse etiennellipse changed the title Change ner_model_configuration from list to map Change ner_model_configuration from list to map in languages-config.yml example Nov 29, 2023
@omri374
Copy link
Contributor

omri374 commented Nov 30, 2023

Thanks! Good catch

@omri374
Copy link
Contributor

omri374 commented Nov 30, 2023

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@omri374 omri374 merged commit 2b7f8b9 into microsoft:main Nov 30, 2023
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

Successfully merging this pull request may close these issues.

2 participants