I have a file where the input is in the format described below in the input code. "word" "frq" and "word_meanings" would correspond to columns 1, 2, and 3. In column 1 there are words, in column 2 there are numbers, and in column 3 there are meanings for the words. I want to pair the meanings in column 3 with each other so that in the output they are in the same row if they have the same "word" for column 1. I also want to use the number in the "frq" column to decide how these meanings are paired with one another. I have a file where the input is in the format