A 43-year-old man has been sentenced to 18 years and 10 months in prison for kidnapping, raping, and attempting to murder his former partner.