Rule Application
Rule Application
Match & Apply
- For each node in graph:
- Find all matching rules (rules where
matches(node)= true) - Sort by confidence (highest first)
- Apply transformations
- Update node with target role
Confidence Adjustment
Base confidence modified by context:
final_confidence = base_confidence
+ 0.1 (if explicit type annotation)
+ 0.1 (if docstring/comment present)
+ 0.05 (if consistent naming)
- 0.2 (if weak heuristic only)
- 0.15 (if type mismatch)
Result clamped to [0.0, 1.0].