dictionary: rework hyphenated word parsing to be testable