streamlit-octostar-utils 2.11a8__tar.gz → 2.11a10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/PKG-INFO +1 -1
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/pyproject.toml +1 -1
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/nlp/language.py +3 -2
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/nlp/ner.py +2 -2
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/LICENSE +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/README.md +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/celery.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/nifi.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/core/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/core/dict.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/core/filetypes.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/core/timestamp.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/nlp/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/octostar/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/octostar/client.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/octostar/context.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/octostar/permissions.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/ontology/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/ontology/expand_entities.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/ontology/validation.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/style/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/style/common.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/threading/__init__.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
- {streamlit_octostar_utils-2.11a8 → streamlit_octostar_utils-2.11a10}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
@@ -3,7 +3,8 @@ from typing import Optional
|
|
3
3
|
|
4
4
|
import py3langid as langid
|
5
5
|
|
6
|
-
from iso639 import Lang
|
6
|
+
from iso639 import Lang
|
7
|
+
from iso639.exceptions import InvalidLanguageValue
|
7
8
|
|
8
9
|
FLAIR_MODELS = {
|
9
10
|
"en": "flair/ner-english-large",
|
@@ -55,7 +56,7 @@ def is_language_available(language: Optional[str], type: str) -> bool:
|
|
55
56
|
try:
|
56
57
|
lang_code = language_to_alpha2(language)
|
57
58
|
|
58
|
-
except
|
59
|
+
except InvalidLanguageValue:
|
59
60
|
lang_code = language
|
60
61
|
|
61
62
|
match type:
|
@@ -292,7 +292,7 @@ def build_presidio_analyzer(language: str, engine_type: str = "spacy", model=Non
|
|
292
292
|
registry.add_recognizer(flair_recognizer)
|
293
293
|
|
294
294
|
default_registry = RecognizerRegistry()
|
295
|
-
default_registry.load_predefined_recognizers()
|
295
|
+
default_registry.load_predefined_recognizers(languages=[language])
|
296
296
|
|
297
297
|
flair_handled_entities = {"PERSON", "LOC", "ORG"}
|
298
298
|
|
@@ -310,7 +310,7 @@ def build_presidio_analyzer(language: str, engine_type: str = "spacy", model=Non
|
|
310
310
|
)
|
311
311
|
|
312
312
|
else:
|
313
|
-
registry.load_predefined_recognizers()
|
313
|
+
registry.load_predefined_recognizers(languages=[language])
|
314
314
|
|
315
315
|
if model is None:
|
316
316
|
raise ValueError("SpaCy model name must be provided")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|