contentintelpy 0.1.2__py3-none-any.whl → 0.1.4__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.
@@ -5,36 +5,15 @@ import importlib
5
5
  import sys
6
6
 
7
7
  def _show_welcome_hint():
8
- """Shows a one-time setup hint if core optional dependencies are missing."""
8
+ """Shows a concise setup hint if core optional dependencies are missing."""
9
9
  try:
10
10
  importlib.import_module("transformers")
11
11
  except ImportError:
12
- # ANSI escape codes for color
12
+ # Yellow warning for import-time awareness
13
13
  YELLOW = "\033[93m"
14
14
  RESET = "\033[0m"
15
- BOLD = "\033[1m"
16
-
17
- # Core [core] extra is missing
18
- print(f"\n{YELLOW}{'═'*60}")
19
- print(f"{BOLD}Welcome to ContentIntelPy!{RESET}{YELLOW}")
20
- print("═"*60)
21
- print("You've installed the base package. To unlock the full power of")
22
- print("the Content Intelligence Pipeline, install the extras below:")
23
-
24
- print(f"\n{BOLD}📦 FULL INSTALLATION (Recommended){RESET}{YELLOW}")
25
- print(" pip install \"contentintelpy[core,ner,translation,summarization]\"")
26
-
27
- print(f"\n{BOLD}🛠️ CAPABILITIES BY EXTRA:{RESET}{YELLOW}")
28
- print(" [core] -> Sentiment, Classification, Keywords, Language Detection")
29
- print(" [ner] -> Entity Recognition (Person, Org, Location)")
30
- print(" [translation] -> Multi-language NLLB & Argos Support")
31
- print(" [summarization]-> Abstractive (BART) & Extractive (Sumy) Summary")
32
-
33
- print(f"\n{BOLD}💡 GETTING STARTED:{RESET}{YELLOW}")
34
- print(" import contentintelpy as ci")
35
- print(" pipeline = ci.create_default_pipeline()")
36
- print(" result = pipeline.run({'text': 'Your text here'})")
37
- print(f"{'═'*60}{RESET}\n")
15
+ print(f"{YELLOW}⚠️ [ContentIntelPy] Optional ML dependencies are missing. Features like Translation/NER will be disabled.")
16
+ print(f"� Check README.md or run: pip install \"contentintelpy[core,ner,translation,summarization]\"{RESET}")
38
17
 
39
18
  # Run hint on first import if in an interactive session
40
19
  if sys.stdout.isatty():
@@ -11,6 +11,10 @@ def ensure_dependency(module_name: str, extra_name: str):
11
11
  try:
12
12
  return importlib.import_module(module_name)
13
13
  except (ImportError, ModuleNotFoundError):
14
- msg = f"Missing optional dependency '{module_name}'. To use this feature, please install it using: pip install \"contentintelpy[{extra_name}]\""
14
+ RED = "\033[91m"
15
+ RESET = "\033[0m"
16
+ msg = f"{RED}Missing optional dependency '{module_name}'. To use this feature, please install it using: pip install \"contentintelpy[{extra_name}]\"{RESET}"
15
17
  logger.error(msg)
16
- raise ImportError(msg) from None
18
+ # We strip the ANSI codes from the raised exception so it doesn't look messy in logs/tracebacks
19
+ clean_msg = f"Missing optional dependency '{module_name}'. Run: pip install \"contentintelpy[{extra_name}]\""
20
+ raise ImportError(clean_msg) from None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: contentintelpy
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Production-grade NLP library for unified content intelligence.
5
5
  Author-email: Ronit Fulari <ronitfulari31@gmail.com>
6
6
  License: MIT
@@ -56,16 +56,22 @@ Install the base library:
56
56
  pip install contentintelpy
57
57
  ```
58
58
 
59
- ### Optional Dependencies (Recommended)
60
- Since the library uses heavy ML models, you should install the specific components you need:
59
+ ### 🧠 Capability Extras (Recommended)
60
+ `contentintelpy` uses optional "extras" to keep the base installation lightweight. Depending on which features you need, use the following commands:
61
61
 
62
- ```bash
63
- # For all core features
64
- pip install "contentintelpy[core,ner,translation,summarization]"
62
+ | Feature | Target Extras | Install Command |
63
+ | :--- | :--- | :--- |
64
+ | **All Features** | `core,ner,translation,summarization` | `pip install "contentintelpy[core,ner,translation,summarization]"` |
65
+ | **Search & Keywords** | `core` | `pip install "contentintelpy[core]"` |
66
+ | **Entity Extraction** | `ner` | `pip install "contentintelpy[ner]"` |
67
+ | **Translation** | `translation` | `pip install "contentintelpy[translation]"` |
68
+ | **Summarization** | `summarization` | `pip install "contentintelpy[summarization]"` |
65
69
 
66
- # For development
67
- pip install "contentintelpy[dev]"
68
- ```
70
+ > [!TIP]
71
+ > **Minimal Install**: If you only need language detection and simple text processing, you only need `pip install contentintelpy`.
72
+
73
+ > [!IMPORTANT]
74
+ > **GPU Support**: If you have an NVIDIA GPU, installing `torch` manually with CUDA support before installing the extras will significantly speed up Translation and Classification.
69
75
 
70
76
  > [!IMPORTANT]
71
77
  > **spaCy Model Requirement**
@@ -1,4 +1,4 @@
1
- contentintelpy/__init__.py,sha256=IJ4z3kvR8_86gq9Fa7ksahp4l9gtjEb37VwAmgShTyw,3667
1
+ contentintelpy/__init__.py,sha256=cQkzOULSS0r-jaSIF15tjYypuAJ9ez3T6LnEaZpat44,2678
2
2
  contentintelpy/nodes/classification_node.py,sha256=ivfAHdYXZU-5eVbtgxD94_TiRHcq-mJg4ukOc7KqwXU,2116
3
3
  contentintelpy/nodes/keyword_extract_node.py,sha256=o-OTOdkdEIYnd_ZczdAjwJkWnjzlKLa28WnEZCKy_og,3024
4
4
  contentintelpy/nodes/language_node.py,sha256=sKRa65kLrb1IRYGrkT82tu8LgdhIXdN5EwhUrH6pSqI,1971
@@ -14,10 +14,10 @@ contentintelpy/services/ner_service.py,sha256=7-sEAqxYRpVksd-sZ5CPgAq3HfVeeb0OaR
14
14
  contentintelpy/services/sentiment_service.py,sha256=Yc6u0l8m_uN5ZxgUMr9DQziwi50cMlTZuaAOS8A7pJc,1130
15
15
  contentintelpy/services/summarization_service.py,sha256=XK3vAGGoQS1dXxaO4nKjyrFlWwN_wZKY2qFNcDJ9IIM,748
16
16
  contentintelpy/services/translation_service.py,sha256=6yNLLJ7mAE7ptHvprX1JUoUN-65Ot7ZdTszqqxMY1TA,1191
17
- contentintelpy/utils/lazy_import.py,sha256=km1_WmFYKBGJwNbB1lEJSiix3Rnr1RwMbW7MbrMtqf4,661
17
+ contentintelpy/utils/lazy_import.py,sha256=izXzPtoTUfkd6ee_7QFqE-IARd5NBe2_W6-pCbS2e2o,956
18
18
  contentintelpy/utils/model_registry.py,sha256=e8KK1AiZ1jJvsxNwapQjNLKiCeETZd8gWJKaoO-Bl_E,5823
19
- contentintelpy-0.1.2.dist-info/licenses/LICENSE,sha256=lZ8hT4isGfdFVxdD7gDRnt3RJqyrkO1L5GseyN3A9hM,1092
20
- contentintelpy-0.1.2.dist-info/METADATA,sha256=z8mAMVVDPNahQxlGzHQxHZiS_c3cNDRPTs3-4zniDHY,4324
21
- contentintelpy-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
22
- contentintelpy-0.1.2.dist-info/top_level.txt,sha256=sxoE-r2-frUi3qwADEiYcFFxZW5hMI1Mjw87hcGMulQ,15
23
- contentintelpy-0.1.2.dist-info/RECORD,,
19
+ contentintelpy-0.1.4.dist-info/licenses/LICENSE,sha256=lZ8hT4isGfdFVxdD7gDRnt3RJqyrkO1L5GseyN3A9hM,1092
20
+ contentintelpy-0.1.4.dist-info/METADATA,sha256=D5jLyccG6ZShV24EdaKnzAaFaoHy1_0IsdX0pMLhkhs,5085
21
+ contentintelpy-0.1.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
22
+ contentintelpy-0.1.4.dist-info/top_level.txt,sha256=sxoE-r2-frUi3qwADEiYcFFxZW5hMI1Mjw87hcGMulQ,15
23
+ contentintelpy-0.1.4.dist-info/RECORD,,