Task: Text Categorization
Input (English): This politys intervention in Korea resulted in a victory at the Battle of Baekgang, propping up the Silla kingdom. Its second ruler consolidated its power by defeating Dou Jiande at the Battle of Hulao, purged his relatives at the Xuanwu Gate incident, and conquered the Eastern Tujue tribe with the help of his advisor Li Jing. Apart from Taizong, its early rulers included the founder, Emperor Gaozu, and it was the first dynasty to open the Imperial Examination to all male citizens. Difficulties faced by it included the Anshi rebellion, led by a Sogdian Turk named An Lushan, as well as a defeat at the Battle of the Talas River at the hands of the Abbasid Caliphate. Founded by a Central Asian governor, name this Chinese dynasty that followed the Sui and preceded the Song.
Output (English): History