Task: Text Categorization
Input (English): Late in his reign, this emperor constructed a secret central police force headed by Count Pergen, who also designed the education system under him. Around the same time, in a very sickly condition, this emperor commanded an army that famously confused the word Halt! for Allah! on the eve of battle, resulting in his infantry attacking his cavalry, firing shots in a drunken stupor. His first wife Isabella of Parma died of smallpox long before that blunder in the Battle of Karansebes. His quarrels with Pope Pius VI originated when he attempted to dissolve all contemplative monasteries in his kingdom, though hes better known for issuing the Patent of Religious Toleration and edicts on freedom of the press. For 10 points, name this emperor who also abolished serfdom after succeeding Maria Theresa as Holy Roman Emperor.
Output (English): History