- results are as good as your recognizers and as your NER models!Look at the example below - we downloaded the small model for Spanish (12MB) and it no longer performs as well as the medium version (40MB):# ! python -m spacy download es_core_news_smfor model in ["es_core_news_sm", "es_core_news_md"]:    nlp_config = {        "nlp_engine_name": "spacy",        "models": [            {"lang_code": "es", "model_name": model},        ],    }    anonymizer = PresidioReversibleAnonymizer(        analyzed_fields=["PERSON"],        languages_config=nlp_config,    )    print(        f"Model: {model}. Result: {anonymizer.anonymize('Me llamo Sof√≠a', language='es')}"    )    Model: es_core_news_sm. Result: Me llamo Sof√≠a    Model: es_core_news_md. Result: Me llamo Lawrence DavisIn many cases, even the larger models from spaCy will not be sufficient - there are already other, more complex and better methods of detecting named entities, based on transformers. You can read more about this here.PreviousReversible anonymizationNextQA with private data protectionUse caseOverviewQuickstartUsage with other frameworksLanguage detectionlangdetectfasttextAdvanced usageCustom labels in NER modelCustom language-specific operatorsLimitationsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Open In Colab
Open In Colab ->: - results are as good as your recognizers and as your NER models!Look at the example below - we downloaded the small model for Spanish (12MB) and it no longer performs as well as the medium version (40MB):# ! python -m spacy download es_core_news_smfor model in ["es_core_news_sm", "es_core_news_md"]:    nlp_config = {        "nlp_engine_name": "spacy",        "models": [            {"lang_code": "es", "model_name": model},        ],    }    anonymizer = PresidioReversibleAnonymizer(        analyzed_fields=["PERSON"],        languages_config=nlp_config,    )    print(        f"Model: {model}. Result: {anonymizer.anonymize('Me llamo Sof√≠a', language='es')}"    )    Model: es_core_news_sm. Result: Me llamo Sof√≠a    Model: es_core_news_md. Result: Me llamo Lawrence DavisIn many cases, even the larger models from spaCy will not be sufficient - there are already other, more complex and better methods of detecting named entities, based on transformers. You can read more about this here.PreviousReversible anonymizationNextQA with private data protectionUse caseOverviewQuickstartUsage with other frameworksLanguage detectionlangdetectfasttextAdvanced usageCustom labels in NER modelCustom language-specific operatorsLimitationsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.