Observe that the HFE sentences can be regarded as binary trees annotated with syntax tags augmented with swap/straight suffixes.
the structures of these binary trees can be learnable by using an off-the-shelf grammar learning algorithm.