added centroid calculation in Snowball
fixed bugs in context splitting