nl_tokens: Returns an array of n different variants of the input string str . The variants are computed by randomly rotating one random character .
pl_tokens: function computeInputVariants ( str , n ) { var variants = [ str ] ; for ( var i = 1 ; i < n ; i ++ ) { var pos = Math . floor ( Math . random ( ) * str . length ) ; var chr = String . fromCharCode ( ( str . charCodeAt ( pos ) + Math . <mask> ( Math . random ( ) * 128 ) ) % 128 ) ; variants [ i ] = str . substring ( 0 , pos ) + chr + str . substring ( pos + 1 , str . length ) ; } return variants ; }