fixed output encoding to utf-8 without bom
fixed number of sentences bug in estimation code