-
Hi, we are trying to create a Docker container that supports Spanish and Catalan. The Dockerfile is as follows:
Here is the default.yaml:
However, we can't get the
Example request:
Response:
But it doesn't detect the 12345678Z NIF number. We attempted to modify the
docker logs:
How can we create a Docker container that supports Spanish, Catalan, and also uses the EsNifRecognizer without running into these issues? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
We'll look into this. From a first glance it looks like the recognizers aren't loaded correctly. Have you tried the same configuration outside the Docker in Python by any chance? using the |
Beta Was this translation helpful? Give feedback.
-
No, we haven't tried because we are not interested in making it work outside of Docker, as our .NET platform does not use Python. We have tried numerous configurations and reviewed the documentation to get the container working with English, Spanish, and Catalan, but the EsNifRecognizer never works. We simply need a container that can support Spanish and Catalan but also have the EsNifRecognizer working. Any ideas or example? Why the "language is not supported by registry"? |
Beta Was this translation helpful? Give feedback.
-
Please try the following conf file and let me know if it works. supported_languages:
- es
- ca
default_score_threshold: 0.4
recognizer_registry:
supported_languages:
- es
- ca
global_regex_flags: 26
recognizers:
- name: CreditCardRecognizer
supported_languages:
- language: es
context: [tarjeta, credito, visa, mastercard, cc, amex, discover, jcb, diners, maestro, instapayment]
- language: ca
context: [tarjeta, credito, visa, mastercard, cc, amex, discover, jcb, diners, maestro, instapayment]
type: predefined
- name: EsNifRecognizer
supported_languages:
- es
type: predefined
- name: EsNieRecognizer
supported_languages:
- es
type: predefined
nlp_configuration:
nlp_engine_name: spacy
models:
- lang_code: es
model_name: es_core_news_lg
- lang_code: ca
model_name: ca_core_news_lg
ner_model_configuration:
model_to_presidio_entity_mapping:
PER: PERSON
PERSON: PERSON
NORP: NRP
FAC: LOCATION
LOC: LOCATION
GPE: LOCATION
LOCATION: LOCATION
ORG: ORGANIZATION
ORGANIZATION: ORGANIZATION
low_confidence_score_multiplier: 0.4
labels_to_ignore:
- ORGANIZATION
- CARDINAL
- EVENT
- LANGUAGE
- LAW
- MONEY
- ORDINAL
- PERCENT
- PRODUCT
- QUANTITY
- WORK_OF_ART
- DATE_TIME It includes all the configuration, so you can only pass the What's likely happening is that the conf file loading failed for some reason, and it reverted to the default. The logger is logging a warning in this case, but the logs aren't exposed to the user. (This is my assumption). Please try it it out and let me know if it works. |
Beta Was this translation helpful? Give feedback.
-
After much struggling with the configuration files, with the help of an AI I was able to obtain this error from
And thanks to this, I learned that we also needed to modify the |
Beta Was this translation helpful? Give feedback.
After much struggling with the configuration files, with the help of an AI I was able to obtain this error from
poetry gunicorn
: