Context-Aware Rule Mining Using a Dynamic Transformer-Based Framework