contentintelpy 0.1.1__tar.gz → 0.1.2__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.
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/PKG-INFO +1 -1
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/__init__.py +38 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/pipeline/context.py +4 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy.egg-info/PKG-INFO +1 -1
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/pyproject.toml +1 -1
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/LICENSE +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/README.md +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/classification_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/keyword_extract_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/language_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/location_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/ner_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/sentiment_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/summarization_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/nodes/translation_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/pipeline/base_node.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/pipeline/pipeline.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/services/ner_service.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/services/sentiment_service.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/services/summarization_service.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/services/translation_service.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/utils/lazy_import.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/utils/model_registry.py +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy.egg-info/SOURCES.txt +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy.egg-info/dependency_links.txt +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy.egg-info/requires.txt +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy.egg-info/top_level.txt +0 -0
- {contentintelpy-0.1.1 → contentintelpy-0.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
from .pipeline.pipeline import Pipeline
|
|
2
2
|
from .pipeline.context import PipelineContext
|
|
3
3
|
from .pipeline.base_node import Node
|
|
4
|
+
import importlib
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
def _show_welcome_hint():
|
|
8
|
+
"""Shows a one-time setup hint if core optional dependencies are missing."""
|
|
9
|
+
try:
|
|
10
|
+
importlib.import_module("transformers")
|
|
11
|
+
except ImportError:
|
|
12
|
+
# ANSI escape codes for color
|
|
13
|
+
YELLOW = "\033[93m"
|
|
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")
|
|
38
|
+
|
|
39
|
+
# Run hint on first import if in an interactive session
|
|
40
|
+
if sys.stdout.isatty():
|
|
41
|
+
_show_welcome_hint()
|
|
4
42
|
|
|
5
43
|
# Import Nodes for the default pipeline
|
|
6
44
|
from .nodes.language_node import LanguageDetectionNode
|
|
@@ -22,6 +22,10 @@ class PipelineContext:
|
|
|
22
22
|
self._data["errors"] = {}
|
|
23
23
|
self._data["errors"][node_name] = error_message
|
|
24
24
|
|
|
25
|
+
def has_errors(self) -> bool:
|
|
26
|
+
"""Check if any errors have been logged in the current context."""
|
|
27
|
+
return len(self._data.get("errors", {})) > 0
|
|
28
|
+
|
|
25
29
|
def to_dict(self) -> Dict[str, Any]:
|
|
26
30
|
"""Return the raw dictionary state."""
|
|
27
31
|
return self._data
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "contentintelpy"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "Production-grade NLP library for unified content intelligence."
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Ronit Fulari", email = "ronitfulari31@gmail.com" },
|
|
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
|
{contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/services/summarization_service.py
RENAMED
|
File without changes
|
{contentintelpy-0.1.1 → contentintelpy-0.1.2}/contentintelpy/services/translation_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|