looking for something similiar to
http://code.google.com/p/templatemaker/
but for ruby...
basically comparing a variety of sample of random strings (100) and extracting only unique strings...
looking for something similiar to
http://code.google.com/p/templatemaker/
but for ruby...
basically comparing a variety of sample of random strings (100) and extracting only unique strings...
You can put all the strings in an array and find the uniq one, like sp
string_array = ['string1', 'string2', 'string3', 'string4', 'string1', 'string1', 'string4' ]
unique_strngs = string_array.uniq
#=> ['string1', 'string2', 'string3', 'string4']
I don't know of anything that already exists but it shouldn't be that difficult to write something.
As far as I can tell, something along the following lines should work:
I'm sure there are issues with this algorithm as it won't work exactly as in the supplied link but it is a start. I just chucked it together.
But as far as I know there's nothing already available in Ruby to do this.