Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
route spaCy model loads through process cache
Accute92f04bc01a325
diff --git a/semantica/split/methods.py b/semantica/split/methods.pyindex 8c338dc6..f2b3f525 100644--- a/semantica/split/methods.py+++ b/semantica/split/methods.py@@ -93,6 +93,7 @@ from ..utils.exceptions import ProcessingErrorfrom ..utils.helpers import safe_importfrom ..utils.logging import get_loggerfrom .semantic_chunker import Chunk+from ..semantic_extract.methods import load_spacy_modellogger = get_logger("split_methods")@@ -336,7 +337,7 @@ def split_by_sentences(# Try spaCy firstif SPACY_AVAILABLE and kwargs.get("use_spacy", True):try:- nlp = spacy.load("en_core_web_sm")+ nlp = load_spacy_model("en_core_web_sm")doc = nlp(text)sentences = [sent.text for sent in doc.sents]except Exception:diff --git a/semantica/split/semantic_chunker.py b/semantica/split/semantic_chunker.pyindex 079ba976..5d712627 100644--- a/semantica/split/semantic_chunker.py+++ b/semantica/split/semantic_chunker.py@@ -35,6 +35,8 @@ from ..utils.exceptions import ProcessingErrorfrom ..utils.helpers import safe_importfrom ..utils.logging import get_loggerfrom ..utils.progress_tracker import get_progress_tracker+from ..semantic_extract.methods import load_spacy_model+spacy, SPACY_AVAILABLE = safe_import("spacy")@@ -79,7 +81,8 @@ class SemanticChunker:if SPACY_AVAILABLE:model_name = config.get("model", "en_core_web_sm")try:- self.nlp = spacy.load(model_name)+ # self.nlp = spacy.load(model_name)+ self.nlp = load_spacy_model(model_name)except OSError:self.logger.warning(f"spaCy model {model_name} not found. Using fallback chunking."