contentintelpy 0.1.2__tar.gz → 0.1.4__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.
Files changed (29) hide show
  1. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/PKG-INFO +15 -9
  2. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/README.md +14 -8
  3. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/__init__.py +4 -25
  4. contentintelpy-0.1.4/contentintelpy/utils/lazy_import.py +20 -0
  5. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy.egg-info/PKG-INFO +15 -9
  6. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/pyproject.toml +1 -1
  7. contentintelpy-0.1.2/contentintelpy/utils/lazy_import.py +0 -16
  8. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/LICENSE +0 -0
  9. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/classification_node.py +0 -0
  10. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/keyword_extract_node.py +0 -0
  11. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/language_node.py +0 -0
  12. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/location_node.py +0 -0
  13. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/ner_node.py +0 -0
  14. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/sentiment_node.py +0 -0
  15. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/summarization_node.py +0 -0
  16. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/nodes/translation_node.py +0 -0
  17. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/pipeline/base_node.py +0 -0
  18. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/pipeline/context.py +0 -0
  19. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/pipeline/pipeline.py +0 -0
  20. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/services/ner_service.py +0 -0
  21. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/services/sentiment_service.py +0 -0
  22. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/services/summarization_service.py +0 -0
  23. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/services/translation_service.py +0 -0
  24. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy/utils/model_registry.py +0 -0
  25. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy.egg-info/SOURCES.txt +0 -0
  26. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy.egg-info/dependency_links.txt +0 -0
  27. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy.egg-info/requires.txt +0 -0
  28. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/contentintelpy.egg-info/top_level.txt +0 -0
  29. {contentintelpy-0.1.2 → contentintelpy-0.1.4}/setup.cfg +0 -0
@@ -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**
@@ -24,16 +24,22 @@ Install the base library:
24
24
  pip install contentintelpy
25
25
  ```
26
26
 
27
- ### Optional Dependencies (Recommended)
28
- Since the library uses heavy ML models, you should install the specific components you need:
27
+ ### 🧠 Capability Extras (Recommended)
28
+ `contentintelpy` uses optional "extras" to keep the base installation lightweight. Depending on which features you need, use the following commands:
29
29
 
30
- ```bash
31
- # For all core features
32
- pip install "contentintelpy[core,ner,translation,summarization]"
30
+ | Feature | Target Extras | Install Command |
31
+ | :--- | :--- | :--- |
32
+ | **All Features** | `core,ner,translation,summarization` | `pip install "contentintelpy[core,ner,translation,summarization]"` |
33
+ | **Search & Keywords** | `core` | `pip install "contentintelpy[core]"` |
34
+ | **Entity Extraction** | `ner` | `pip install "contentintelpy[ner]"` |
35
+ | **Translation** | `translation` | `pip install "contentintelpy[translation]"` |
36
+ | **Summarization** | `summarization` | `pip install "contentintelpy[summarization]"` |
33
37
 
34
- # For development
35
- pip install "contentintelpy[dev]"
36
- ```
38
+ > [!TIP]
39
+ > **Minimal Install**: If you only need language detection and simple text processing, you only need `pip install contentintelpy`.
40
+
41
+ > [!IMPORTANT]
42
+ > **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.
37
43
 
38
44
  > [!IMPORTANT]
39
45
  > **spaCy Model Requirement**
@@ -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():
@@ -0,0 +1,20 @@
1
+ import importlib
2
+ import logging
3
+
4
+ logger = logging.getLogger("contentintelpy.utils")
5
+
6
+ def ensure_dependency(module_name: str, extra_name: str):
7
+ """
8
+ Attempts to import a module. If it fails, raises an ImportError with a
9
+ helpful message directing the user to install the appropriate optional extra.
10
+ """
11
+ try:
12
+ return importlib.import_module(module_name)
13
+ except (ImportError, ModuleNotFoundError):
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}"
17
+ logger.error(msg)
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**
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "contentintelpy"
7
- version = "0.1.2"
7
+ version = "0.1.4"
8
8
  description = "Production-grade NLP library for unified content intelligence."
9
9
  authors = [
10
10
  { name = "Ronit Fulari", email = "ronitfulari31@gmail.com" },
@@ -1,16 +0,0 @@
1
- import importlib
2
- import logging
3
-
4
- logger = logging.getLogger("contentintelpy.utils")
5
-
6
- def ensure_dependency(module_name: str, extra_name: str):
7
- """
8
- Attempts to import a module. If it fails, raises an ImportError with a
9
- helpful message directing the user to install the appropriate optional extra.
10
- """
11
- try:
12
- return importlib.import_module(module_name)
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}]\""
15
- logger.error(msg)
16
- raise ImportError(msg) from None
File without changes
File without changes