Legacy Modernization Through AI-Driven Transformation Models