Task: Text Categorization
Input (English): This politician ran for attorney general of his home state after earlier joining the Barnburners in his party in bolting following the Democrats nomination of Lewis Cass for president in the election of 1848. In one post this man held, he successfully investigated and destroyed the corrupt Canal Ring, and he later willed part of his fortune alongside the resources of the Astor and Lenox families to help create the New York Public Library. In his run for the presidency, voting irregularities in South Carolina, Florida and Louisiana caused both parties to dispute the election results in those states, and Florida sent two different sets of electors to the electoral college. He lost his bid for the presidency after David Davis rejected an invitation to join the Electoral Commission, which replaced Davis with Joseph Bradley, a Republican Supreme Court Justice. The winner of the popular vote in the election of 1876, for 10 points, name this man who nevertheless lost his bid for the presidency to Rutherford Hayes.
Output (English): History