created CategoryEncoder and added CategoryEncoderTest

fixes #82