Task: Text Categorization
Input (English): During this dynasty, Prince Li Shimin ordered his brothers' deaths in the Xuanwu Gate Incident. One of its rulers' hatred of Yeon Gaesomun prompted one of its invasions of Goguryeo. This dynasty saw the appointment of jiedishi lords, a notable one of whom captured Luoyang in a power struggle with Yang Guozhong. The aftermath of that rebellion by An Lushan influenced Du Fu's poetry during this dynasty. One monarch of this dynasty apocryphally ordered court visitors to give oral sex and started out as one of Emperor Taizong's concubines. For 10 points, name this Chinese dynasty that succeeded the Sui and established a sprawling civil service under Empress Wu.
Output (English): History