South Korea has surged past France in stock market value, propelled by gains in technology shares riding the global boom in artificial intelligence.