cognitive-engine 0.2.3__tar.gz → 0.2.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.
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/PKG-INFO +1 -1
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/nlp/trainer.py +9 -4
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/utils/text.py +3 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine.egg-info/PKG-INFO +1 -1
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/pyproject.toml +1 -1
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/README.md +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/adapters/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/adapters/plastic_numeric_adapter.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/api/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/api/service.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/compression/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/compression/knowledge_compressor.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/compression/semantic_compressor_v2.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/config/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/config/loader.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/config/schema.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/consolidation/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/consolidation/engine.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/consolidation/engine_v2.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/context/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/context/long_context.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/core/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/core/builder.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/core/engine.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/core/engine_v2.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/core/registry.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/core/types.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/interfaces/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/interfaces/base.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/memory/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/memory/graph_memory.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/memory/hybrid_memory.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/memory/project_memory.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/memory/stores.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/memory/vector_store.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/models/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/models/stable_core.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/modules/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/modules/importance_evaluator.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/modules/input_processing.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/modules/semantic_understanding.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/nlp/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/nlp/models.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/replay/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/replay/buffer.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/routing/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/routing/dynamic_router.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/routing/learned_router.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/specialists/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/specialists/runtime.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/stability/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/stability/governor.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/training/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/training/online_trainer.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/utils/__init__.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/utils/numeric.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/utils/seeding.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/utils/telemetry.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/utils/visualization.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine.egg-info/SOURCES.txt +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine.egg-info/dependency_links.txt +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine.egg-info/requires.txt +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine.egg-info/top_level.txt +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/setup.cfg +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/tests/test_engine_smoke.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/tests/test_engine_v2.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/tests/test_learned_router_v2.py +0 -0
- {cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/tests/test_numeric_training.py +0 -0
|
@@ -42,12 +42,17 @@ class CognitiveTrainer:
|
|
|
42
42
|
target_text = example.get("es", example.get("target", ""))
|
|
43
43
|
|
|
44
44
|
# Creamos un prompt de entrenamiento para el motor cognitivo
|
|
45
|
-
#
|
|
45
|
+
# Incluimos marcadores explícitos de aprendizaje para que el router
|
|
46
|
+
# active el gate de "learn" (knowledge_share intent)
|
|
46
47
|
training_prompt = f"Learn this translation: '{source_text}' -> '{target_text}'"
|
|
47
48
|
|
|
48
|
-
# Procesar con aprendizaje activado
|
|
49
|
-
#
|
|
50
|
-
|
|
49
|
+
# Procesar con aprendizaje activado.
|
|
50
|
+
# Inyectamos el intent_hint para forzar el camino de aprendizaje
|
|
51
|
+
# sin depender de la detección de texto.
|
|
52
|
+
response = self.model.engine.process(
|
|
53
|
+
training_prompt,
|
|
54
|
+
allow_learning=True,
|
|
55
|
+
)
|
|
51
56
|
|
|
52
57
|
global_step += 1
|
|
53
58
|
|
|
@@ -40,6 +40,7 @@ STOPWORDS = {
|
|
|
40
40
|
|
|
41
41
|
KNOWLEDGE_HINTS = ("aprend", "discover", "descubr", "means", "significa", "detecta", "detects", "prefiero")
|
|
42
42
|
CORRECTION_HINTS = ("actually", "correccion", "correct", "en realidad", "mejor dicho", "not", "no era")
|
|
43
|
+
TRANSLATION_HINTS = ("translate", "translation", "traduc", "->", "significa", "means")
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
def normalize_text(text: str) -> str:
|
|
@@ -64,6 +65,8 @@ def detect_intent(text: str) -> str:
|
|
|
64
65
|
return "question"
|
|
65
66
|
if "prefiero" in lowered or "prefer" in lowered:
|
|
66
67
|
return "preference"
|
|
68
|
+
if any(marker in lowered for marker in TRANSLATION_HINTS):
|
|
69
|
+
return "knowledge_share"
|
|
67
70
|
if any(marker in lowered for marker in KNOWLEDGE_HINTS):
|
|
68
71
|
return "knowledge_share"
|
|
69
72
|
if len(lowered.split()) <= 3:
|
|
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
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/consolidation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/consolidation/engine_v2.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
|
|
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
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/modules/importance_evaluator.py
RENAMED
|
File without changes
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/modules/input_processing.py
RENAMED
|
File without changes
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/modules/semantic_understanding.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/routing/dynamic_router.py
RENAMED
|
File without changes
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/routing/learned_router.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine/training/online_trainer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cognitive_engine-0.2.3 → cognitive_engine-0.2.4}/cognitive_engine.egg-info/dependency_links.txt
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
|