phonemeset: split out writing phoneme features into a helper function