@@ -380,9 +380,7 @@ def _build_complete_vocabulary(self) -> None:
380380 for word , domains in enhanced_vocab .items ():
381381 if word not in self ._keyword_map and domains :
382382 first_concept = next (iter (domains ))
383- self ._keyword_map [word ] = self ._keyword_map .get (
384- first_concept , Dimension .WISDOM
385- )
383+ self ._keyword_map [word ] = self ._keyword_map .get (first_concept , Dimension .WISDOM )
386384
387385 for dimension , words in coding_vocab .items ():
388386 for word in words :
@@ -488,9 +486,7 @@ def _empty_result(self) -> SemanticResult:
488486 empty_coords = Coordinates (0.0 , 0.0 , 0.0 , 0.0 )
489487 return SemanticResult (
490488 coordinates = empty_coords ,
491- distance_from_anchor = self .vocab .get_distance (
492- self .ANCHOR_POINT , empty_coords
493- ),
489+ distance_from_anchor = self .vocab .get_distance (self .ANCHOR_POINT , empty_coords ),
494490 semantic_clarity = 0.0 ,
495491 concept_count = 0 ,
496492 confidence = 0.0 ,
@@ -510,9 +506,7 @@ def _calculate_cluster_metrics(
510506 wisdom_sum += coords .wisdom
511507
512508 n = len (coords_list )
513- centroid = Coordinates (
514- love_sum / n , justice_sum / n , power_sum / n , wisdom_sum / n
515- )
509+ centroid = Coordinates (love_sum / n , justice_sum / n , power_sum / n , wisdom_sum / n )
516510
517511 # Calculate distances and cohesion
518512 distances = [self .vocab .get_distance (c , centroid ) for c in coords_list ]
@@ -558,9 +552,7 @@ def __init__(self, vocab_manager: VocabularyManager, analyzer: SemanticAnalyzer)
558552 self .vocab = vocab_manager
559553 self .analyzer = analyzer
560554
561- def infer_unknown_meaning (
562- self , unknown_word : str , context_words : List [str ]
563- ) -> SemanticResult :
555+ def infer_unknown_meaning (self , unknown_word : str , context_words : List [str ]) -> SemanticResult :
564556 """Optimized meaning inference"""
565557 context_result = self .analyzer .analyze_concept_cluster (context_words )
566558
@@ -609,8 +601,7 @@ def analyze_entity_posture(
609601
610602 # Weighted combination (70% recent, 30% historical)
611603 combined_coords = Coordinates (
612- love = (actions_result .coordinates .love * 0.7 )
613- + (history_result .coordinates .love * 0.3 ),
604+ love = (actions_result .coordinates .love * 0.7 ) + (history_result .coordinates .love * 0.3 ),
614605 justice = (actions_result .coordinates .justice * 0.7 )
615606 + (history_result .coordinates .justice * 0.3 ),
616607 power = (actions_result .coordinates .power * 0.7 )
@@ -621,9 +612,7 @@ def analyze_entity_posture(
621612
622613 return self ._determine_posture (combined_coords , entity_name , entity_type )
623614
624- def _determine_posture (
625- self , coords : Coordinates , entity_name : str , entity_type : str
626- ) -> Dict :
615+ def _determine_posture (self , coords : Coordinates , entity_name : str , entity_type : str ) -> Dict :
627616 """Optimized posture determination"""
628617 distance = self .vocab .get_distance (self .ANCHOR_POINT , coords )
629618 clarity = self .vocab .get_semantic_clarity (coords )
@@ -651,9 +640,7 @@ def _determine_posture(
651640 if distance < 0.5 :
652641 posture_type = "Balanced Leadership (Harmonized)"
653642 elif distance > 1.5 :
654- posture_type = (
655- f"Chaotic / Destabilized ({ dominant_dim .value .title ()} Focus)"
656- )
643+ posture_type = f"Chaotic / Destabilized ({ dominant_dim .value .title ()} Focus)"
657644
658645 return {
659646 "entity_name" : entity_name ,
@@ -704,9 +691,7 @@ def analyze_ice(
704691 )
705692
706693 # Calculate ICE metrics
707- avg_disharmony = (
708- intent_context_dist + intent_exec_dist + context_exec_dist
709- ) / 3.0
694+ avg_disharmony = (intent_context_dist + intent_exec_dist + context_exec_dist ) / 3.0
710695 ice_coherence = max (0.0 , 1.0 - (avg_disharmony / 2.0 ))
711696
712697 avg_dist_from_anchor = (
@@ -721,9 +706,7 @@ def analyze_ice(
721706 ) / 2.0
722707
723708 # Calculate ICE coordinate
724- ice_coord = self ._calculate_ice_coordinate (
725- intent_result , context_result , execution_result
726- )
709+ ice_coord = self ._calculate_ice_coordinate (intent_result , context_result , execution_result )
727710
728711 # LJPW Baseline-enhanced disharmony metrics
729712 # Use coupling-aware metrics for intent-execution alignment
@@ -778,21 +761,15 @@ def analyze_ice(
778761 "intent_composite_score" : intent_result .composite_score ,
779762 "execution_composite_score" : execution_result .composite_score ,
780763 },
781- "ice_harmony_level" : self ._determine_ice_harmony_level (
782- ice_coherence , ice_balance
783- ),
764+ "ice_harmony_level" : self ._determine_ice_harmony_level (ice_coherence , ice_balance ),
784765 }
785766
786767 def _calculate_ice_coordinate (
787768 self , intent : SemanticResult , context : SemanticResult , execution : SemanticResult
788769 ) -> Coordinates : # noqa: E501
789770 """Calculate ICE coordinate from components"""
790771 return Coordinates (
791- love = (
792- intent .coordinates .love
793- + context .coordinates .love
794- + execution .coordinates .love
795- )
772+ love = (intent .coordinates .love + context .coordinates .love + execution .coordinates .love )
796773 / 3 ,
797774 justice = (
798775 intent .coordinates .justice
@@ -801,9 +778,7 @@ def _calculate_ice_coordinate(
801778 )
802779 / 3 ,
803780 power = (
804- intent .coordinates .power
805- + context .coordinates .power
806- + execution .coordinates .power
781+ intent .coordinates .power + context .coordinates .power + execution .coordinates .power
807782 )
808783 / 3 ,
809784 wisdom = (
@@ -928,14 +903,10 @@ def __init__(self, config: Optional[Dict] = None):
928903 self .semantic_analyzer = SemanticAnalyzer (self .vocabulary , self .ANCHOR_POINT )
929904
930905 # Build specialized sub-engines
931- self .inference_engine = MathematicalInferenceEngine (
932- self .vocabulary , self .semantic_analyzer
933- )
906+ self .inference_engine = MathematicalInferenceEngine (self .vocabulary , self .semantic_analyzer )
934907 self .ice_analyzer = ICEAnalyzer (self .vocabulary , self .semantic_analyzer )
935908 self .phi_optimizer = PhiOptimizer (self .vocabulary , self .semantic_analyzer )
936- self .geopolitical_analyzer = GeopoliticalAnalyzer (
937- self .vocabulary , self .semantic_analyzer
938- )
909+ self .geopolitical_analyzer = GeopoliticalAnalyzer (self .vocabulary , self .semantic_analyzer )
939910
940911 def get_engine_version (self ) -> str :
941912 return self .ENGINE_VERSION
@@ -993,9 +964,7 @@ def perform_ice_analysis(
993964 execution_words : List [str ],
994965 ) -> Dict :
995966 """Perform ICE framework analysis"""
996- return self .ice_analyzer .analyze_ice (
997- intent_words , context_words , execution_words
998- )
967+ return self .ice_analyzer .analyze_ice (intent_words , context_words , execution_words )
999968
1000969 def perform_phi_optimization (self , concepts : List [str ]) -> Dict :
1001970 """Perform phi-enhanced optimization"""
0 commit comments