Included function to map a list of token ids to a list of term ids