The simplest thing to do would be to use the weighting and the length of the string to determine a number of random transpositions (swaps) to perform among letters/characters in the text. If a string has 20 characters, then a weighting of 1 would result in one transposition (thus changing two letters, 10% of the string), while a weight of 10 would result in 10 transpositions (changing 20 letters, 100% of the length of the string, though if the swaps are truly random you can't enforce that each letter is only ever transposed once). For a string with 100 characters, a weight of 1 is 5 swaps, a weight of 10 is 50 swaps.
If swaps directly proportional to the length of the string and the weighting isn't garbling the string enough at the high end, or too much at the low end, try a nonlinear conversion between weight and number of swaps. Try squaring the weight and performing swaps proportional to that percentage of the string's characters. Try squaring the number of characters, multiplying by 1/(11-weight), and performing that many swaps.