Code to get and construct the POS dictionary