Automatically merge and consolidate similar patterns
Automatically consolidates similar patterns using Levenshtein distance detection. Use this to clean up redundant patterns after sessions, but run manually with caution as it's irreversible.
/plugin marketplace add h315uk3/as_you/plugin install h315uk3-as-you@h315uk3/as_youExecute similar pattern merging.
Detects patterns with Levenshtein distance below threshold and automatically consolidates them. All scores (TF-IDF, PMI, time decay, composite) are recalculated after merging.
Execution:
Merge logic:
Notes:
if [ ! -f scripts/pattern_merger.py ]; then
echo "❌ pattern_merger.py not found"
exit 1
fi
echo "🔄 Starting pattern merge..."
echo ""
# Execute merge
MERGE_OUTPUT=$(python3 scripts/pattern_merger.py 2>&1)
MERGE_STATUS=$?
# Display results
echo "$MERGE_OUTPUT"
if [ $MERGE_STATUS -eq 0 ]; then
echo ""
echo "✅ Merge completed"
echo ""
echo "💡 To view updated scores:"
echo " /as-you:show-scores"
else
echo ""
echo "❌ Error occurred during merge"
exit 1
fi