Code to unwind the PTB encoding for AMR