Man sentenced for assaulting a police officer