Alleged stalker sentenced to nine months in jail