encoder: allow to encode keywords

Fixes #6