A Lima man has been sentenced to 12 to 16 years in prison for a 2022 attack on his ex-girlfriend.