semantica.core is the coordination layer for the framework:
Semanticaorchestrator coordinates the full KG construction pipeline from a YAML configConfigManagerloads YAML config with deep-merge, validation, and environment variable overridesPluginRegistryenables dynamic component registration and loading at runtimeLifecycleManagermanages startup/shutdown with health monitoring and lifecycle hooks
What You Get
Semantica
High-level orchestrator: coordinates the full KG construction pipeline from a single
config.yaml. Entry point for application-level deployments.ConfigManager
YAML config with deep-merge,
SEMANTICA_ env var overrides, and dot-notation nested key access. Keeps secrets out of source files.LifecycleManager
Ordered startup/shutdown hooks, health monitoring, and a 6-state machine. Essential for long-running services like FastAPI apps.
PluginRegistry
Register custom ingestors, parsers, exporters, or any component. Load them by name at runtime: no imports required.
Exported Classes
| Class | Role |
|---|---|
Semantica | Orchestration entry point: coordinates the full KG construction pipeline |
ConfigManager | YAML config loading, deep-merge, validation, and env var overrides |
LifecycleManager | Startup/shutdown state machine with health monitoring and lifecycle hooks |
PluginRegistry | Dynamic plugin discovery, registration, and loading |
method_registry | Global MethodRegistry instance: register and dispatch custom orchestration methods |
Semantica (Orchestration)
Semantica is the high-level entry point that coordinates the full KG construction pipeline:
Core Methods
| Method | Description |
|---|---|
initialize() | Initialize all framework components |
build_knowledge_base(sources, **kwargs) | Orchestrate full KG construction pipeline |
run_pipeline(pipeline, data) | Execute an existing Pipeline instance |
get_status() | Return system health and current state |
shutdown(graceful=True) | Graceful shutdown: waits for in-flight operations |
ConfigManager
Centralized config loading with deep-merge and environment variable overrides:YAML Configuration
SEMANTICA_):
Use double underscores (__) to produce a dot separator for nested key access. The implementation strips the SEMANTICA_ prefix, lowercases the result, and replaces __ with . before calling set_nested_value() on the config dict.
LifecycleManager
Manages framework state with a defined state machine and ordered startup/shutdown hooks: State machine:UNINITIALIZED → INITIALIZING → READY → RUNNING → STOPPING → STOPPED
PluginRegistry
Register custom components that participate in the full pipeline: provenance tracking, retry policies, and parallel execution included:MethodRegistry
Register custom orchestration methods and dispatch them by name:When to Use Core vs. Individual Modules
| Scenario | Recommended Approach |
|---|---|
| Single extraction task | from semantica.semantic_extract import NERExtractor |
| Build a knowledge graph | from semantica.kg import GraphBuilder |
| Multi-step pipeline | from semantica.pipeline import Pipeline |
| App-level lifecycle + config | from semantica.core import Semantica, ConfigManager |
| Custom dispatch / plugins | from semantica.core import method_registry, PluginRegistry |
Pipeline
Pipeline execution and step orchestration.
Utils
Shared utilities used by Core internally.
Getting Started
Learn the basics before using Core.
LLMs
Configure LLM providers via ConfigManager.
