mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
refactor: distribute imports to relevant cells in conflict detection notebook
This commit is contained in:
@@ -48,14 +48,6 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from semantica.conflicts import (\n",
|
||||
" ConflictDetector,\n",
|
||||
" ConflictResolver,\n",
|
||||
" SourceTracker,\n",
|
||||
" ConflictAnalyzer,\n",
|
||||
" InvestigationGuideGenerator,\n",
|
||||
" ResolutionStrategy\n",
|
||||
")\n",
|
||||
"import json\n",
|
||||
"from datetime import datetime"
|
||||
]
|
||||
@@ -152,6 +144,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from semantica.conflicts import SourceTracker\n\n",
|
||||
"source_tracker = SourceTracker()\n",
|
||||
"\n",
|
||||
"print(\"Registering sources...\")\n",
|
||||
@@ -201,6 +194,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from semantica.conflicts import ConflictDetector\n\n",
|
||||
"# Initialize detector with our populated source tracker\n",
|
||||
"detector = ConflictDetector(source_tracker=source_tracker)\n",
|
||||
"\n",
|
||||
@@ -251,6 +245,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from semantica.conflicts import ConflictAnalyzer\n\n",
|
||||
"analyzer = ConflictAnalyzer()\n",
|
||||
"analysis = analyzer.analyze_conflicts(conflicts)\n",
|
||||
"\n",
|
||||
@@ -287,6 +282,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from semantica.conflicts import ConflictResolver, ResolutionStrategy\n\n",
|
||||
"resolver = ConflictResolver()\n",
|
||||
"\n",
|
||||
"# CRITICAL: Link the source tracker to the resolver.\n",
|
||||
@@ -325,6 +321,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from semantica.conflicts import InvestigationGuideGenerator\n\n",
|
||||
"guide_generator = InvestigationGuideGenerator()\n",
|
||||
"\n",
|
||||
"# Generate a guide for the first conflict (birth_date)\n",
|
||||
@@ -381,4 +378,4 @@
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user