streamlit-octostar-utils 0.2.14__py3-none-any.whl → 0.2.15a1__py3-none-any.whl

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.
@@ -10,12 +10,12 @@ def detect_language(text, min_confidence=None):
10
10
  detected_lang, confidence = detector.classify(text)
11
11
  if min_confidence and confidence < min_confidence:
12
12
  return None, confidence
13
- detected_lang = re.sub("[^A-Za-z]", "", detected_lang).lower()
14
- detected_lang = Lang(detected_lang).name.lower()
13
+ detected_lang = to_name(detected_lang)
15
14
  return detected_lang, confidence
16
15
 
17
16
  def to_name(alpha2):
18
- return Lang(alpha2).name.lower()
17
+ return Lang(alpha2).name
19
18
 
20
19
  def to_alpha2(name):
20
+ name = re.sub(r'\b\w+', lambda m: m.group(0).capitalize(), name)
21
21
  return Lang(name).pt1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamlit-octostar-utils
3
- Version: 0.2.14
3
+ Version: 0.2.15a1
4
4
  Summary:
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -20,7 +20,7 @@ streamlit_octostar_utils/core/threading/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEkt
20
20
  streamlit_octostar_utils/core/threading/key_queue.py,sha256=7CJpj0gvZMQd8eC5wKQi3Ak5SQQ4zQ1OPTs_OP_kD20,2255
21
21
  streamlit_octostar_utils/core/timestamp.py,sha256=a3s4xfm1nctLzYsHOJxqoWIDTdbNY_yN1OByl8ahLc8,383
22
22
  streamlit_octostar_utils/nlp/__init__.py,sha256=BtlYDZK_xaEbc7Ju_7MznXbCVPZcdLn26xwR9qf_UhM,336
23
- streamlit_octostar_utils/nlp/language.py,sha256=7WzBH8_iUrx7iy6sazlaf3-3ocTZlaUI_V49er5THRw,661
23
+ streamlit_octostar_utils/nlp/language.py,sha256=07J7MMLzhRI3kZM-CLfUhRD0dP81wL1a5Z0w0PQf4pg,645
24
24
  streamlit_octostar_utils/nlp/ner.py,sha256=saE7A251JcAr6bFDGzRuSfXeqqRh5xbWRhgWbiKGeDM,13258
25
25
  streamlit_octostar_utils/octostar/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
26
  streamlit_octostar_utils/octostar/client.py,sha256=NUvHe9asd65g4-hJ4CuUvUns-9dNWes1XZRJlO9eAAc,1690
@@ -36,7 +36,7 @@ streamlit_octostar_utils/threading/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzp
36
36
  streamlit_octostar_utils/threading/async_task_manager.py,sha256=q7N6YZwUvIYMzkSHmsJNheNVCv93c03H6Hyg9uH8pvk,4747
37
37
  streamlit_octostar_utils/threading/session_callback_manager.py,sha256=LvZVP4g6tvKtYmI13f2j1sX_7hm61Groqp5xJine9_k,3973
38
38
  streamlit_octostar_utils/threading/session_state_hot_swapper.py,sha256=6eeCQI6A42hp4DmW2NQw2rbeR-k9N8DhfBKQdN_fbLU,811
39
- streamlit_octostar_utils-0.2.14.dist-info/METADATA,sha256=BVCRMBWjt-cwPQeIuOhFQMXQeg7srSN7iheTIh_NnkQ,2330
40
- streamlit_octostar_utils-0.2.14.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
41
- streamlit_octostar_utils-0.2.14.dist-info/licenses/LICENSE,sha256=dkwVPyV03fPHHtERnF6RnvRXcll__tud9gWca1RcgnQ,1073
42
- streamlit_octostar_utils-0.2.14.dist-info/RECORD,,
39
+ streamlit_octostar_utils-0.2.15a1.dist-info/METADATA,sha256=PYRBMbizq2Q4ewZRcfgA-9GJSHjkwHHdWWvFF4RzmAo,2332
40
+ streamlit_octostar_utils-0.2.15a1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
41
+ streamlit_octostar_utils-0.2.15a1.dist-info/licenses/LICENSE,sha256=dkwVPyV03fPHHtERnF6RnvRXcll__tud9gWca1RcgnQ,1073
42
+ streamlit_octostar_utils-0.2.15a1.dist-info/RECORD,,